I have a Gazebo simulation running with a spawned robot. I also have initialized two trajectory-based controllers using JointEffortInterface for Gazebo-ROS plugin - arm_controller
and gripper_controller
. I am using MoveIt Group Commander for these two controllers.
I suspect these controllers are shut down at some point in time of the simulation and throw the following error when trying to read /joint_states
topic:
[ERROR]: Didn't receive robot state (joint angles) with recent timestamp within 1 seconds.
Check clock synchronization if your are running ROS across multiple machines!
Is there a way I can check if these controllers are enabled and running at any time during the simulation?
when trying to read /joint_states topic
I would guess the error there is with whatever is supposed to be publishing the/joint_states
topic (I would think this should be Gazebo) and not with the thing subscribing to the topic (the controllers). First thing I would do is look atrostopic info /joint_states
and see what the publisher is. $\endgroup$rosparam set /use_sim_time true
before running your simulations. Remember that nodes/services won't pick up that parameter if you set it after starting them, so be sure to restart any nodes/services after setting/use_sim_time true
. $\endgroup$/move_group
node was not able to access the/joint_states
topic. Your point about the issue being with the publisher got me thinking - thanks! $\endgroup$use_sim_time
parameter setTrue
. Thanks again for providing the explanation on its usage! $\endgroup$