Ask Your Question
1

How to get robot position in gazebo?

asked 2016-09-28 02:46:26 -0600

chenlee gravatar image

I want get the robot position(something like the coordinate x,y,z) , I know that hector_gazebo_plugins can do this,but I don't know how to use the API,did something more simple to get the robot position in gazebo?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-11-13 07:29:39 -0600

The answer here applies to your use case, if you are interested in getting the robot pose as a ROS message.

edit flag offensive delete link more
0

answered 2016-11-13 04:07:16 -0600

Ajith kumar gravatar image

Simple. Use GetPose utility. For eg:

gazebo::math::Pose pose = this->model->gazebo::physics::ModelState::GetPose();

You can convert it into your preferred coordinate system through simple transformation.

edit flag offensive delete link more

Comments

1

Can you post an example here? I am a new guy and don't know how to finish this. Thanks!

littleghost gravatar imagelittleghost ( 2018-06-07 05:19:45 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2016-09-28 02:46:26 -0600

Seen: 3,603 times

Last updated: Nov 13 '16