Rosanswers logo

Hello everyone,

I have the following problem: I successfully configured moveit for my robot. Now I want my rviz visualization to follow the robot movement, hence when the robot moves, it shoult move as well.

What I do:

I have a joint_states topic on which the current joint states are published. Then I feed these into a robot_state_publisher calculating tf for my robot.

But it moveit/rviz seems not to care. I can plan and execute (send to controller) my movements from rviz but no matter what the joint states are, the visualization never moves.

So what am I missing? Is there something special I should have took care of?

Thank you for your time, Marcel

Originally posted by Marcel Usai on ROS Answers with karma: 200 on 2014-11-25

Post score: 1


1 Answer 1


Rosanswers logo


Did you make sure that you don't have the fake jointstatepublisher running? Usually it get's launched in the headless mode automatically via the demo.launch. If you have two authorities (the fake one and the real one) running at the same time, you'll see the robot "flicker" or "jump around" in Rviz, since the messages are coming in at the same time.

If that's not the case, I'd start checking each intermediate step:

rostopic echo /jointstates
# Are the jointstates changing when you move the robot?
# Are the tf's changing?

If that's still the case, make sure that you are listening to the correct planning scene in rviz (usually move_group/monitored_planning_scene). Also, you can display the current transforms in Rviz and see if they are changing/moving.

If everything of this works out, then, uhm, maybe somethings wrong with your urdf? Just report the different results, and I'll have a look.



Originally posted by Rabe with karma: 683 on 2014-11-25

This answer was ACCEPTED on the original site

Post score: 4

Original comments

Comment by Marcel Usai on 2014-11-27:
Thanks for your quick answer! I could test it just a few minutes ago though... It seemed that I was listening to the wrong planning scene topic in rviz. After changing it, it works perfectly fine!

Comment by RicoJ on 2020-12-10:
Hi guys, awesome discussion. In addition to what Rabe said, another thing might help is checking out your TF frames one by one with rosrun rqt_tf_tree rqt_tf_tree while doing rosrun tf tf_echo YOUR_ROBOT_BASE YOUR_ROBOT_TIP. I found my bug this way.


Your Answer

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