moveit2 icon indicating copy to clipboard operation
moveit2 copied to clipboard

[moveit_ros.current_state_monitor]: Didn't receive robot state (joint angles) with recent timestamp within 10.000000 seconds.

Open Divyam-uga opened this issue 1 year ago • 3 comments

Hello Everyone,

@peterdavidfagan I have set up a Gazebo simulation with 2 UR manipulators and I'm attempting to control one UR robot using moveit_py. I've followed the necessary configuration steps from "moveit2_tutorials", and I am also setting 'use_sim_time' to true in Gazebo and all related nodes. However, I'm encountering an issue where 'current_state_monitor.cpp' is not receiving joint_angles with recent timestamps.

I've verified that joint states are being published in the correct sim time using "ros2 topic echo /joint_states" and "ros2 topic echo /clock", but it seems that the requested time reflects my PC's total run time instead of the current simulation time step. I tried several ways to set the 'use_sim_time' param to true globally before initializing 'moveit_py' but it's not working out.

Any guidance on resolving this would be greatly appreciated.

Thank you.

Error message: Screenshot from 2024-07-12 11-06-16

'ur_sort.py': Screenshot from 2024-07-12 11-11-31

Divyam-uga avatar Jul 12 '24 18:07 Divyam-uga

I guess you are using gazebo by adding use_sim_time: True in the moveit config dict you'll be able to get to monitor planning running but it will fetch another error

terminate called after throwing an instance of 'rclcpp::exceptions::InvalidParameterValueException'
  what():  parameter 'qos_overrides./clock.subscription.durability' could not be set: 
Aborted (core dumped)

Python code

moveit_config_dict.update({'use_sim_time' : True})

ron007d avatar Jul 31 '24 05:07 ron007d

This issue is being labeled as stale because it has been open 45 days with no activity. It will be automatically closed after another 45 days without follow-ups.

github-actions[bot] avatar Sep 16 '24 12:09 github-actions[bot]

I experience the same problem when using the moveit_servo servo_node in combination with Gazebo simulation. I launch all nodes with the 'use_sim_time' set to True, however the current_state_monitor still seems to use wall time. Did you found a solution?

Jelmerdw avatar Oct 15 '24 07:10 Jelmerdw

This issue is being labeled as stale because it has been open 45 days with no activity. It will be automatically closed after another 45 days without follow-ups.

github-actions[bot] avatar Nov 29 '24 13:11 github-actions[bot]

This issue was closed because it has been stalled for 45 days with no activity.

github-actions[bot] avatar Jan 14 '25 12:01 github-actions[bot]

Faced the same issue: Didn't receive robot state (joint angles) with recent timestamp within 1.000000 seconds. Requested time 1750447117.563005, but latest received state has time 250.872000.

It worked when I added the use_sim_time to the moveit_config dict, moveit_args["use_sim_time"] = use_sim_time instead of passing it as a sperate parameter to the node.

parameters=[
            moveit_args,
            {"use_sim_time": use_sim_time},
        ],

Not sure why this works, but I would guess the MoveItPy class just takes in the one parameter and expects everything to be in there. Checking the param values for use_sim_time for the node and the internal moveitpy node tipped me off (the first one returned true and the second one was false). Hope this helps!

FarStryke21 avatar Jun 20 '25 19:06 FarStryke21