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

How do I get full RobotState from MoveIt? (in python)

asked 2013-09-04 23:43:06 -0600

liborw gravatar image

updated 2013-09-04 23:47:36 -0600

How do I get full RobotState from MoveIt? I could use /joint_states topic but there are more publishers of that, I would have to aggregate it somehow. There must be a simpler way, or am I wrong?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-09-04 23:56:11 -0600

bit-pirate gravatar image

You can use the get_planning_scene service to query information about the various parts of MoveIt's planning scene.

Here is the detailed description:

PS: For some reason that service was first not available for me. I had to manually add this capability in the move_group.launch:

<param name="capabilities" value="move_group/MoveGroupCartesianPathService                                                            [...]
                                  move_group/MoveGroupGetPlanningSceneService" />
edit flag offensive delete link more

answered 2013-09-05 00:33:56 -0600

isucan gravatar image

Another option is to use the CurrentStateMonitor class:

Which allows you to monitor the current state easily.

Another way is to use the MoveGroupInterface class: and calling getCurrentJointValues(). This function is a bit slow, as it will wait for a little while to receive messages so it can construct a full state. I recommend the first option if you need to get the state multiple times.

edit flag offensive delete link more


I just saw the in python bit. I am working on a way to get a RobotState message (should be in today or tomorrow). At the moment, in RobotCommander you can call get_joint and get_link, which will give you some information about the state (joint position, transforms)

isucan gravatar image isucan  ( 2013-09-05 00:36:11 -0600 )edit

Question Tools

1 follower


Asked: 2013-09-04 23:43:06 -0600

Seen: 1,220 times

Last updated: Sep 05 '13