Robotics StackExchange | Archived questions

Rviz moveit plugin show current robot state

Hey,

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

Asked by Mork on 2016-04-01 09:20:43 UTC

Comments

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

Asked by gvdhoorn on 2016-04-01 10:09:18 UTC

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?

Asked by Mork on 2016-04-01 10:49:04 UTC

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.

Asked by gvdhoorn on 2016-04-01 11:19:19 UTC

Thanks a lot, that was it!!

Asked by Mork on 2016-04-06 05:05:25 UTC

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

Asked by jarvisschultz on 2016-04-06 08:34:29 UTC

Answers

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.

Asked by jarvisschultz on 2016-04-01 11:51:07 UTC

Comments

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

Asked by Mork on 2016-04-06 10:10:41 UTC