Rosanswers logo


I have been trying to use a physics engine to do experiments instead of my real robot. As I was connecting MoveIt with the physics engine, one problem that I encountered was that move group is not changing the joint states according to my robot in simulation.

All joint states are published with correct names to the topic "/yumi/joint_states", and I have joint_state_publisher and robot_state_publisher launched as well.

<node name="yumi_joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
  <rosparam param="source_list">["/yumi/joint_states"]</rosparam>
<node name="yumi_robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"/>

Just in case that the move group did not subscribe to the joint states correctly, I echoed "/move_group/monitored_planning_scene/robot_state/joint_state". By manipulating the robot in the physics engine, I am affirmative that the joint states fed into MoveIt are from the physics engine. Here is a sample result of the echo command:

seq: 0
  secs: 1611415632
  nsecs: 622175931
frame_id: "yumi_base_link"
name: [yumi_joint_1_l, yumi_joint_2_l, yumi_joint_7_l, yumi_joint_3_l, yumi_joint_4_l, yumi_joint_5_l,
    yumi_joint_6_l, gripper_l_joint, gripper_l_joint_m, yumi_joint_1_r, yumi_joint_2_r,
    yumi_joint_7_r, yumi_joint_3_r, yumi_joint_4_r, yumi_joint_5_r, yumi_joint_6_r,
    gripper_r_joint, gripper_r_joint_m]
position: [6.463619115493202e-07, -0.039591364562511444, 0.04112724959850311, 0.009112260304391384, 8.23559503260185e-07, 0.01217526476830244, -3.0866064548717986e-07, 0.0, 0.0, -3.3755272852431517e-06, -0.03959168866276741, -0.04112748056650162, 0.009136912412941456, 5.3803930200047034e-08, 0.012184608727693558, 3.047164298664029e-09, 0.0, 0.0]
velocity: []
effort: []

However, the robot in RVIZ always returns to its default shape after executing trajectories. And I don't see robot moving in RVIZ when I move it in the physics engine as well.

Has anybody worked on connecting MoveIt with real robots? Is there anything else I need to do to get the joint states updated in MoveIt?

I am using ROS melodic on Ubuntu 18.04.

Any idea is appreciated! Thanks!

Originally posted by Henning Luo on ROS Answers with karma: 58 on 2021-01-23

Post score: 0

Original comments

Comment by fvd on 2021-01-27:
Please clarify what "echo command" you are using, how you are starting up MoveIt (which launch files?), and any other details that might be relevant from your setup.

Comment by fvd on 2021-01-27:
Also, you say "the robot in Rviz always returns to its default shape after executing trajectories". Can the trajectories be executed? Does the robot in your physics engine move when you do? Are there errors in your terminal when you execute a trajectory?

Comment by gvdhoorn on 2021-02-02:
out of curiosity: which "physics engine" are you using?

Comment by Henning Luo on 2021-04-01:
I was using Unity3D. Sorry for the late reply. Hope this helps.


1 Answer 1


Rosanswers logo

Just realised that the joint states from the physics engine is faulty, they were transformed from rad to deg twice and hence all the joint states were close to zero, which led to the weird behaviour.

Originally posted by Henning Luo with karma: 58 on 2021-02-01

This answer was ACCEPTED on the original site

Post score: 1

Original comments

Comment by fvd on 2021-02-01:
Thanks for updating your question.


Your Answer

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