I need to use the Odometry topic /zed/zed_node/odom
I see the frame_id of this topic is by default ‘odom’ and child_frame_id is 'zed_camera_link’.
When I start my ZED2i with a downward tilt, eg. 45deg, the pose in the Odometry message start with an identity, but the ‘map’ frame reflects the 45deg tilt rotation.
I’d like to have that initial tilt rotation in the initial Odometry message. I’ve tried to change the odometry_frame from ‘odom’ to ‘map’ or/and the map_frame to ‘world’ in the common_stereo.yaml file. I see the frame_id changed in the Odometry message but I still get an identity pose in the first message.
I know I could resolve this issue with the tf system, in fact in rviz I see the correct camera pose because tf resolves this. However, because of performance issues in my node I want to just use the Odometry message and avoid using tf.
How can I configure this?
The ZED ROS2 wrapper follows the REP 105 standard to define the map and odom poses.
[…] the pose of a robot in the odom frame is guaranteed to be continuous, meaning that the pose of a mobile platform in the odom frame always evolves in a smooth way, without discrete jumps.
This line from the standard does not allow for the first message in the odom topic to contain the initial tilt, therefore we cannot change this in the odom message.
I would consider calibrating your system to compute the tilt once and set this value in your URDF, and setting the set_gravity_as_origin parameter to false, which will remove the 45° tilt in the map frame
Thanks the answer. I guess I could make that change to the URDF and disable set_gravity_as_origin. For the moment, my system is a bit experimental and may start at different tilt angles every run. I guess that starting the VIO from a tilted angle doesn’t make the frame discontinuous. Does it?
I’m also supporting other stereo cameras for comparison purposes, and using Basalt for their VIO, and it seems the first odometry message in Basalt contains the camera tilt. I’m also trying to avoid using tf as there is some delays in getting the transforms at the correct timestamps and slows down the pipeline.
Maybe I could use tf only once to find the tilt of the camera before launching the positional tracking and then overwrite the odometry message. Any better thoughts?
Hi @martinakos,
That’s correct having the VIO starting tilted itself does not make the frame discontinuous, the camera is static so we cannot add this information to the /odom topic as there is no movement from the previous frame.
If finding the tilt and orientation is the objective, I would turn on VIO with set_gravity_as_origin = true, extract the tilt information to initialize your system, and make the adjustments you need.