ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Getting the location of a moving animation actor in Gazebo

asked 2021-04-13 11:15:28 -0600

Zak gravatar image

Hi, I created an actor in Gazebo which moves following a trajectory of waypoints. I would like to know how to get the location of the actor using python. Is there a better way to move an object in simulation, like creating a model from scratch? I am using ROS Melodic, Ubuntu 18.04 Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-04-13 12:39:11 -0600

bach gravatar image

updated 2021-04-13 12:47:34 -0600

Hi,

about how to guide the actor, you should have a look to the Actor plugin or better to the AutonomousActorPlugin. They are written in C++, but you should be able to use them at least.

About the pose, actually in C++ Gazebo API there exists a method WorldPose(). I didn't find similar API in Phyton, but you can read the gazebo_msgs/ModelStates topics that contains poses of all model in your simulation.

Hope I helped you.

edit flag offensive delete link more

Comments

Hi, Thank you for your answer! I am going to try this.

Zak gravatar image Zak  ( 2021-04-14 06:59:42 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2021-04-13 11:15:28 -0600

Seen: 939 times

Last updated: Apr 13 '21