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

Rviz moveit plugin show current robot state

asked 2016-04-01 09:20:43 -0500

Mork gravatar image


we are trying to integrate our custom robot into the Moveit! framework. We are able to create and execute plans on the real robot using the rviz moveit motion planning plugin.

However, the shown robot state is not updated live in Rviz. When we manually move the robot, the visual representation in Rviz does not move at all, although the joint states are published correctly. We have to reset Rviz or the plugin to make it show the current state. I.e. it looks like it's taking a snapshot of the robot state at rviz startup and doesn't update it later.

If we activate the Robot Model plugin in Rviz, the shown representation moves correctly according to the real robot movement.

Are we doing something wrong or is the Rviz moveit plugin somehow assuming that the robot can only be moved by trajectory commands?

Best regards Mark

edit retag flag offensive close merge delete


Is this the actual robot model that you're looking at, or the MoveIt Start / Goal state visualisation?

gvdhoorn gravatar image gvdhoorn  ( 2016-04-01 10:09:18 -0500 )edit

I think so, since the Start and Goal states are green/orange and the actual robot model is gray, isn't it?

Btw. when we publish the joint states, we leave the header.frame_id and the velocity/effort arrays empty. Is that ok?

Mork gravatar image Mork  ( 2016-04-01 10:49:04 -0500 )edit

Yes, that sounds like you got the visualisation setup ok.

re: joint states: yes, that is ok. frame_id is only used for messages that can be related to a Cartesian frame, which joint state by definition cannot be. And for everything you don't have the data for, leave the field empty.

gvdhoorn gravatar image gvdhoorn  ( 2016-04-01 11:19:19 -0500 )edit

Thanks a lot, that was it!!

Mork gravatar image Mork  ( 2016-04-06 05:05:25 -0500 )edit

Great! I moved my comment to an answer so that your question now shows up as having an answer.

jarvisschultz gravatar image jarvisschultz  ( 2016-04-06 08:34:29 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-04-01 11:51:07 -0500

I've had this problem when listening to the wrong topic under the Planning Scene Topic entry of the MotionPlanning display type. My current setup has both a /planning_scene and a /move_group/monitored_planning_scene available. The robot state is only correct if I select the second topic.

edit flag offensive delete link more


That was it, the problem is solved, thank you!

Mork gravatar image Mork  ( 2016-04-06 10:10:41 -0500 )edit

Question Tools



Asked: 2016-04-01 09:20:43 -0500

Seen: 2,209 times

Last updated: Apr 01 '16