0

recently I am working on a project with ROS2 Galactic. I am trying to use a Simulated ignition Gazebo Robot with it. The goal is to make the SLAM algorithm rtabmap working.

At the moment I am facing the problem, that the camera_info topic visualizes the image at the top (as shown in the picture). I found that Gazebo uses a different coordinate system (https://answers.gazebosim.org/question/26690/how-to-get-the-camera-matrix-of-a-camera-sensor-in-ignition-gazebo/), but I am not able to change the orientation. When I try to change the pose, only the camera angleĀ (picture) changes but the camera_info stays at the top. In addition, the point cloud is displayed correct, so it makes no senseĀ to me, to use a tf2_transformation in ROS2. I added the rgbd_camera sensor code. The pose relative has only an effect at the camera picture. Sadly, I think that's the problem why I am not able to get a map from rtabmap. Culd someone please help me? Visualization in Foxglove, used SDF file: sensors_demo.sdf from the ignition examples

<model name="rgbd_camera">
      <pose>5 0 0.5 0 0.0 0</pose>
      <link name="link">
        <pose>0.05 0.05 0.05 0 0 0</pose>
        <inertial>
          <mass>0.1</mass>
          <inertia>
            <ixx>0.000166667</ixx>
            <iyy>0.000166667</iyy>
            <izz>0.000166667</izz>
          </inertia>
        </inertial>
        <collision name="collision">
          <geometry>
            <box>
              <size>0.1 0.1 0.1</size>
            </box>
          </geometry>
        </collision>
        <visual name="visual">
          <geometry>
            <box>
              <size>0.1 0.1 0.1</size>
            </box>
          </geometry>
        </visual>
        <sensor name="rgbd_camera" type="rgbd_camera">
          <pose relative_to="rgbd_camera::link">0 0 0 0 0 3.14</pose>
          <camera>
            <horizontal_fov>1.047</horizontal_fov>
            <image>
              <width>320</width>
              <height>240</height>
            </image>
            <clip>
              <near>0.1</near>
              <far>100</far>
            </clip>
          </camera>
        
          <always_on>1</always_on>
          <update_rate>30</update_rate>
          <visualize>true</visualize>
          <topic>rgbd_camera</topic>
          <enable_metrics>true</enable_metrics>
        </sensor>
      </link>
</model>

0 Answers0