[ros-users] Programmatically get ModelState from Gazebo

John Hsu johnhsu at willowgarage.com
Tue Apr 26 00:47:36 UTC 2011


Hi Ian,
see attached simple python script for example, with pr2 running (roslaunch
pr2_gazebo pr2_empty_world.launch),
$ ./gms.py pr2 world
returnd x position  -0.00678816834842

Also, can you please re-post your question on answers.ros.org?  I think
that's where things should be these days.

Thanks,
John


On Mon, Apr 25, 2011 at 4:27 PM, Ian Jones <ianaldenjones at gmail.com> wrote:

> Thanks for the reply, it worked as far as compilation went but I am still
> not positive at how to get at the data further in ModelState.  For example I
> want to get Pose data more specifically position (x,y,z).  Position is
> nested inside of pose which is nested inside ModelState, So if i wanted to
> just get the robots current x position, what sort of call would i need?
> Thank you for your time.
>  Ian
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20110425/ef232a2b/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gms.py
Type: text/x-python
Size: 829 bytes
Desc: not available
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20110425/ef232a2b/attachment-0004.py>


More information about the ros-users mailing list