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

How to make rviz model follow joint states with MoveIt?

asked 2014-11-25 07:09:30 -0600

Marcel Usai gravatar image

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2014-11-25 09:06:04 -0600

Rabe gravatar image

Hey,

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?
rosrun tf tf_echo YOUR_ROBOT_BASE YOUR_ROBOT_TIP
# 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.

Cheers,

Rabe

edit flag offensive delete link more

Comments

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!

Marcel Usai gravatar image Marcel Usai  ( 2014-11-27 04:48:57 -0600 )edit

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.

RicoJ gravatar image RicoJ  ( 2020-12-10 21:03:21 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-11-25 07:09:30 -0600

Seen: 2,449 times

Last updated: Nov 25 '14