-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simulation time in replay mode #317
Comments
Hi @JulioPlaced, Although I have previously thought about this issue I have never looked in depth into replaying bag files storing raw sensor packets. Your question definitely sheds light on the issue. This is probably why I kept the |
Hello @Samahu. Yes, |
Yeah that makes sense |
Hi, |
When replaying a recorded bag (using
replay.launch.xml
), the deserialized packets will be assigned the current ROS time instead of the simulated time (available in/clock
topic). This causes the deserialized points/IMU to be desynchronized from other topics in the bag.As far as we understand, even with
use_sim_time=true
, the call torclcpp::Clock(RCL_ROS_TIME).now()
(used here) is not able to subscribe to/clock
itself; therefore it always returns the current ROS time. In ROS2 the simulation time (from/clock
) is only accessible from a node, e.g. usingnode->now()
.Screenshots
Desynchronization example between GPS (with recorded time), clock (simulated time) and deserialized ouster points (using current ROS time)
We've coded a workaround that passes the node from
os_cloud_node.cpp
to theLidarPacketHandler
andImuPacketHandler
classes, but we're wondering if this issue has been identified or addressed before. Otherwise we're happy to share it.Platform:
The text was updated successfully, but these errors were encountered: