Closed rhaschke closed 1 year ago
Why, in first place, do you need the TF buffer in MuJoCo. The only usage is here: https://github.com/ubi-agni/mujoco_ros_pkgs/blob/cc244877bd2584ff1fd41b807679c2d769970174/mujoco_ros/src/mujoco_sim.cpp#L2436
... to transform setModelState
requests not given in world
frame.
By the way, this API should use std_msgs::Header
for the reference frame (because you also need a timestamp together with the reference frame!)
Occasionally
TF_OLD_DATA
andTF_REPEATED_DATA
warnings are still thrown:
Maybe I found a solution to that: https://github.com/ros/geometry2/pull/542. Please report any left-over warnings!
Looks good to me.
There were two remaining issues:
reset_ctrls
wasn't initialized sometimes: https://github.com/ubi-agni/mujoco_ros_pkgs/blob/d4463dbf7ac5b7224c8f35ff8a341e39e27dfc39/mujoco_ros_control/src/mujoco_ros_control_plugin.cpp#L159robot_hw_sim_->writeSim()
: https://github.com/ubi-agni/mujoco_ros_pkgs/blob/d4463dbf7ac5b7224c8f35ff8a341e39e27dfc39/mujoco_ros_control/src/mujoco_ros_control_plugin.cpp#L175-L176I didn't manage to fix those yet. This seems to be a timing issue (of course). When compiling with
Debug
mode instead ofRelWithDebInfo
the error vanishes. All those messages originate from therobot_state_publisher
processing the latestjoint_states
message before the time reset. But I don't see a reason (and evidence) that this message (and the triggered TF msgs) are published twice!