Closed khansel01 closed 1 year ago
Hi @khansel01 What you are saying makes sense for your configuration, but it's not good in general because there's no available simulated ZED sensors in Gazebo that can be used with the ZED node. I suggest you modify the source code according to your requirements, that's the advantage of the open source code.
Thanks @Myzhar for the reply. I agree that it isn't good in general.
I got it to work by using the ROS timestamp (ROS:Time:now()
) instead of the stereo-labs one (sl_tools::slTime2Ros(mZed.getTimestamp(sl::TIME_REFERENCE::CURRENT))
) in the zed-wrapper.
I also found the following issue that answered my questions about why we use the Stereolab time stamp and do not use the ROS timestamp in general.
Preliminary Checks
Proposal
Hello all,
I use the ZED2 camera mounted on a robot head to get stereo vision. I have adjusted the URDF files accordingly, and everything is running smoothly.
For testing, I wanted to check the tf tree. Therefore I started gazebo and launched the zed-wrapper and rviz. The robot is displayed correctly and no error message appears in the tf tree. However, when I try to project data, e.g. a point cloud or images into the base frame, I see the following error message:
The problem is caused because Gazebo uses its own clock while ZED still uses wall time. Therefore, the ZED point cloud expects a transformation from
zed2_left_camera_frame
tobase_link
at wall time1678458888.237012675
. However, the base link comes from the pavilion simulation at ROS time42.9120000
.I solved the problem by adding a sim_true flag that uses the ROS time in the
zed-wrapper-node
. Like you did with themSvoMode
when playing back loggedsvo
data.I am curious if it is possible that
zed_ros_nodelt
(called fromzed-wrapper-node
) subscribes to the ROS clock in general. When we work on a real robot, the ROS time corresponds to the wall clock time, and everything works smoothly. However, when we work in simulation, e.g., when testing, the simulator time is used.Would you mind sharing why you do not use the ROS::time in general?
Use-Case
Testing of implemented algorithms in the simulation, which also require ZED data, but without starting the real robot.
Anything else?
No response