How to update robot_state of moveit move_group

asked 2017-08-21 11:55:56 -0500

Marcel Usai gravatar image

updated 2017-08-29 07:34:24 -0500


I want to update the moveit move_group robot state because it does not get updated automatically. I either want to fix that or set it manually.

As I understood it, the robot state should be updated automatically when the setup is correct. I have set up my robot with the setup_assistant and the move_group node subscribes to the joint_states topic. The joint names published and known to the move_group node are the same. Do I need to set up something special?

When I run my setup and move the robot, the current robot_state does not change. However, the joint_states do reflect the correct state and in RViz it is visualized.

Any help appreciated!


This is my MoveIt setup: rosgraph from rqt_graph


My moveit setup had no error, I had an error reading the robot_state :/

edit retag flag offensive close merge delete


Please add a screenshot/png version of what your rqt_graph looks like while you have your MoveIt launch files running.

This sounds like MoveIt is subscribing to your JointState publisher, but isn't receiving any msgs.

gvdhoorn gravatar image gvdhoorn  ( 2017-08-21 14:19:58 -0500 )edit

Thank you for your help! I updated my post with the rqt_graph screenshot.

Marcel Usai gravatar image Marcel Usai  ( 2017-08-22 03:50:42 -0500 )edit

I don't know what your Edit2 means exactly, but in any case: please post your solution as an answer and accept that. We don't close questions like that here on ROS Answers if at all possible.

gvdhoorn gravatar image gvdhoorn  ( 2017-08-30 03:04:43 -0500 )edit

It means, the robot state is set fine, there never was an issue. Why shouldn't someone close his question since it is not relevant if there was no error?

Marcel Usai gravatar image Marcel Usai  ( 2017-08-30 07:53:42 -0500 )edit

There was a question, otherwise you wouldn't have posted one.

It's always better to post answers - even if they appear trivial to you - and then accept your own answer as that will show clearly that the question was answered. Future readers can then immediately see what is going on.

gvdhoorn gravatar image gvdhoorn  ( 2017-08-30 07:56:19 -0500 )edit

If you've figured out that updating the robot state was not an issue, but something else was, then it would be good to post that as the answer. Some future reader might observe the same things as you did (not updating of robot) and your answer could help them rule some things out.

gvdhoorn gravatar image gvdhoorn  ( 2017-08-30 07:57:52 -0500 )edit

I cannot reopen my question with <200 points, so I guess it can't be helped.

Marcel Usai gravatar image Marcel Usai  ( 2017-08-30 08:01:19 -0500 )edit

I understand this. But my fault was not reading the robot state correctly (wrong indexing). There was no error with anything related to the setup. Can you reopen my question? I could answer it then.

Marcel Usai gravatar image Marcel Usai  ( 2017-08-30 08:05:30 -0500 )edit