Robot position in moveit2 does not correspond to robot position in gazebo

In the introduction, after the second command “ros2 launch test_moveit_config moveit_rviz.launch.py”, movit2 is opened as described , but the robot position does not correspond to robot position in gazebo. In moveit2 all joint values is null (tab joints) while on the topic /joint_states (coming from gazebo) we have : the second and sixth axis are at -pi/2.
The tutorial cannot be continued. Any idea what I’m doing wrong?

At the top of the the simulation window there are a few buttons. One will reset the positions, the other will restart it. Try restarting the simulation.

after restarting the simulation, gazebo and moveit2 positions are the same, now the problem is when i choose the home position as target goal and click on “plan and execute” the robot in gazebo does not move.
output of the first term :
[move_group-1] [INFO] [1696952527.378426638] [moveit_move_group_default_capabilities.move_action_capability]: Received request
[move_group-1] [INFO] [1696952527.378755838] [moveit_move_group_default_capabilities.move_action_capability]: executing…
[move_group-1] [INFO] [1696952527.378926926] [moveit_move_group_default_capabilities.move_action_capability]: Combined planning and execution request received for MoveGroup action. Forwarding to planning and execution pipeline.
[move_group-1] [INFO] [1696952527.381472946] [moveit_ros.plan_execution]: Planning attempt 1 of atmost 1
[move_group-1] [INFO] [1696952527.381503589] [moveit_move_group_capabilities_base.move_group_capability]: Using planning pipeline ‘ompl’
[move_group-1] [INFO] [1696952527.383726197] [moveit.ompl_planning.model_based_planning_context]: Planner configuration ‘ur_manipulator’ will use planner ‘geometric::RRTConnect’. Additional configuration parameters will be set when the planner is constructed.
[move_group-1] [WARN] [1696952527.542894839] [moveit_trajectory_processing.time_optimal_trajectory_generation]: Joint acceleration limits are not defined. Using the default 1 rad/s^2. You can define acceleration limits in the URDF or joint_limits.yaml.
[move_group-1] [INFO] [1696952527.554210053] [moveit.plugins.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-1] [INFO] [1696952527.554926855] [moveit.plugins.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-1] [INFO] [1696952527.555404688] [moveit_ros.trajectory_execution_manager]: Validatingtrajectory with allowed_start_tolerance 0.01
[move_group-1] [INFO] [1696952527.555840894] [moveit_ros.trajectory_execution_manager]: Starting trajectory execution …
[move_group-1] [INFO] [1696952527.555898769] [moveit.plugins.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-1] [INFO] [1696952527.555927764] [moveit.plugins.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-1] [INFO] [1696952527.556131247] [moveit.simple_controller_manager.follow_joint_trajectory_controller_handle]: sending trajectory to joint_trajectory_controller
[move_group-1] [WARN] [1696952596.903894510] [tf2_buffer]: Detected jump back in time. Clearing TFbuffer.
[move_group-1] [WARN] [1696952596.903951638] [tf2_buffer]: Detected jump back in time. Clearing TFbuffer.
the second term :
[move_group-1] [INFO] [1696952527.378426638] [moveit_move_group_default_capabilities.move_action_capability]: Received request
[move_group-1] [INFO] [1696952527.378755838] [moveit_move_group_default_capabilities.move_action_capability]: executing…
[move_group-1] [INFO] [1696952527.378926926] [moveit_move_group_default_capabilities.move_action_capability]: Combined planning and execution request received for MoveGroup action. Forwarding to planning and execution pipeline.
[move_group-1] [INFO] [1696952527.381472946] [moveit_ros.plan_execution]: Planning attempt 1 of atmost 1
[move_group-1] [INFO] [1696952527.381503589] [moveit_move_group_capabilities_base.move_group_capability]: Using planning pipeline ‘ompl’
[move_group-1] [INFO] [1696952527.383726197] [moveit.ompl_planning.model_based_planning_context]: Planner configuration ‘ur_manipulator’ will use planner ‘geometric::RRTConnect’. Additional configuration parameters will be set when the planner is constructed.
[move_group-1] [WARN] [1696952527.542894839] [moveit_trajectory_processing.time_optimal_trajectory_generation]: Joint acceleration limits are not defined. Using the default 1 rad/s^2. You can define acceleration limits in the URDF or joint_limits.yaml.
[move_group-1] [INFO] [1696952527.554210053] [moveit.plugins.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-1] [INFO] [1696952527.554926855] [moveit.plugins.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-1] [INFO] [1696952527.555404688] [moveit_ros.trajectory_execution_manager]: Validatingtrajectory with allowed_start_tolerance 0.01
[move_group-1] [INFO] [1696952527.555840894] [moveit_ros.trajectory_execution_manager]: Starting trajectory execution …
[move_group-1] [INFO] [1696952527.555898769] [moveit.plugins.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-1] [INFO] [1696952527.555927764] [moveit.plugins.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-1] [INFO] [1696952527.556131247] [moveit.simple_controller_manager.follow_joint_trajectory_controller_handle]: sending trajectory to joint_trajectory_controller
[move_group-1] [WARN] [1696952596.903894510] [tf2_buffer]: Detected jump back in time. Clearing TFbuffer.
[move_group-1] [WARN] [1696952596.903951638] [tf2_buffer]: Detected jump back in time. Clearing TFbuffer.

Hello @pzanne ,

Did this error get solved for you?

Hello Alberto,

Not for the moment, If you have an idea to resolve the problem, it’s well come.

Here are my observations:

  • the /joint_states topic is only refreshed for about 30 seconds, after which it stops.
  • it’s the same for the controller_manager: if you execute the ‘ros2 control list_controllers’ command within 30 seconds, you get a reply listing the loaded controllers, but after that there’s no reply.
    I’m tempted to conclude that the gazebo simulation only works for about 30 seconds and crashes after that, but I don’t understand why.

@pzanne I think I’ve found out the problem here. I will try to solve it today and let you know ASAP.

Hello @pzanne ,

This should be fixed. Have you been able to test it again?

Hello,
I just tested it and now everything works
Thanks

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.