0
$\begingroup$

Rosanswers logo

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?


Originally posted by liborw on ROS Answers with karma: 801 on 2013-09-04

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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: http://docs.ros.org/api/moveit_msgs/html/srv/GetPlanningScene.html

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" />

Originally posted by bit-pirate with karma: 2062 on 2013-09-04

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$
0
$\begingroup$

Rosanswers logo

Another option is to use the CurrentStateMonitor class: http://moveit.ros.org/doxygen/classplanning__scene__monitor_1_1CurrentStateMonitor.html

Which allows you to monitor the current state easily.

Another way is to use the MoveGroupInterface class: http://moveit.ros.org/doxygen/classmoveit_1_1planning__interface_1_1MoveGroup.html 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.


Originally posted by isucan with karma: 1055 on 2013-09-05

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by isucan on 2013-09-05:
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)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.