ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ZED odom dosen't recognize camera pitch

asked 2021-04-28 13:42:14 -0500

cbj34 gravatar image

updated 2021-05-23 18:07:28 -0500

matlabbe gravatar image

Hi,

I'm trying to implement a navigation with a zed2 and the following structure:

rtabmap publishing map-->odom

and

zed_node publishing odom-->base_link

For this purpose I disabled the publishing of the map frame inside the zed_wrapper. I start the camera with a launchfile like this:

<include unless="$(arg sim)" file="$(find zed_wrapper)/launch/zed2.launch"> 

    <!-- Position respect to base frame (i.e. "base_link) -->
    <arg name="cam_pos_x"             default="0.51" />
    <arg name="cam_pos_y"             default="0.0" />
    <arg name="cam_pos_z"             default="0.53" />

    <!-- Orientation respect to base frame (i.e. "base_link) -->
    <arg name="cam_roll"              default="0.0" />
    <arg name="cam_pitch"             default="0.349066" /> <!--20 degree in rad-->
    <arg name="cam_yaw"               default="0.0" />

</include>

When I'm looking at the frames in rviz, the camera frames and the map frame are at the correct positions, but the odom frame is tilted towards the sky. It seems that the odom part (which is calculated with IMU-data) calculates the odom frame like there is no predefined camera pitch.

Am I missing somehting? Is there a possibility to "tell" the odom part about the orientation of the camera?

Thanks for reading and thank you in advance for your replies :)

UPDATE:

It seems, that my awnser wasn't right, since now even without rtabmap I get twisted odom "planes" in rviz. Following is the link to the picture in Google Drive: https://drive.google.com/drive/folder... image description

edit retag flag offensive close merge delete

Comments

Is it that cam_pitch should be negative?

matlabbe gravatar image matlabbe  ( 2021-05-04 11:22:44 -0500 )edit

By changing the cam_pitch to negative, the whole base_link pitches in the opposite direction and the camera in the tf tree looks towards the sky.

cbj34 gravatar image cbj34  ( 2021-05-05 10:40:41 -0500 )edit

Can you link to a dropbox or google drive for the screeshotÉ? I could upload it in your question afterwards f it helps.

matlabbe gravatar image matlabbe  ( 2021-05-20 08:35:29 -0500 )edit

Here is the Link: https://drive.google.com/drive/folder... Thank you very much :)

cbj34 gravatar image cbj34  ( 2021-05-20 09:51:15 -0500 )edit

Make sure to put your fixed frame in Global options of RVIZ in odom frame (or map frame if a map is created).

matlabbe gravatar image matlabbe  ( 2021-05-23 18:08:59 -0500 )edit

Thanks for the tip, I already changed that.

cbj34 gravatar image cbj34  ( 2021-05-27 11:34:04 -0500 )edit

Can you record a rosbag with only zed started?

matlabbe gravatar image matlabbe  ( 2021-05-30 16:09:21 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2021-05-27 11:36:56 -0500

cbj34 gravatar image

As far as I tested the tilt itself comes from the drifting IMU in the ZED.

When I disable the sensor fusion inside the zed2 param file the drift dosent occur and while monitoring the frames over time I notice the increasing drift.

I will have to look for a way to zero the IMU at the start. I always suspected the IMU does this by itself, but it seems this is not the case and maybe my measurments of the camera pose are slightly wrong or the IMU just drifts.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-04-28 13:34:33 -0500

Seen: 187 times

Last updated: May 27 '21