husarion / rosbot_ros

ROS packages for ROSbot 2, 2R and 2 PRO
122 stars 62 forks source link

[Humble] colors/image_raw has a different size than depth/image_raw #111

Open ambitious-octopus opened 1 week ago

ambitious-octopus commented 1 week ago

Depth Image Raw

ros2 topic echo /camera/depth/image_raw

Leads to: height: 480 and width: 640

header:
  stamp:
    sec: 1707
    nanosec: 430000000
  frame_id: camera_depth_optical_frame
height: 480
width: 640
encoding: 32FC1
is_bigendian: 0
step: 2560
data:
...

Color Image Raw

ros2 topic echo /camera/color/image_raw

Leads to, height: 240, width: 320

header:
  stamp:
    sec: 1803
    nanosec: 29000000
  frame_id: camera_color_optical_frame
height: 240
width: 320
encoding: rgb8
is_bigendian: 0
step: 960
data:
...

Is this behavior intentional? If so, how do I change the resolution. I've already tried looking through the parameters. Furthermore, I also searched in my colcon workspace and I can't find explicit references to this resolution.

EDIT: I'm using rosbot Gazebo:

ros2 pkg xml rosbot_gazebo

Outputs:

<package format="3">
  <name>rosbot_gazebo</name>
  <version>0.13.2</version>
  <description>Gazebo Ignition simulation for ROSbot 2, 2R, PRO</description>