* rtabmap_odom tests and doc * opengv note * added ci checks or humble-latest flaky dep cmake errors * Added real data tests for rgbd_odom and stereo_odom * added real data for icp_odometry's deskewing test * fixing json cmake error on lyrical/rolling * test 2d icp odom deskewing branch * first review of existing OdometryROS tests * testing with imu used as guess * tested imu arrivals sync * Fixed odom reset on right pose when guess frame id is used * fixing header errors in ci >=lyrical * Added support for input rgbd_image topic with features for odom, added multicam rgbd_odometry test * Added stereo odom support for features-only frames. Added multicam stereo tests. * forcing latest rtabmap version * updated OdometryROS API * ci: dont build non-latest docker in pull requests * splitting docker jobs * doc edit * Making publish_null_when_lost:=false continous when guess is provided (using guess covariance when we cannot register yet) * updated stereo doc * ficing rolling ci (rviz Ogre header) * Added test coverage of alll rgbd_image callbacks * fixing rolling ci * making docker ci build/run the tests on pull requests * fixing ros2 ci testing * improved sync callback coverage * improving stereo_odometry test coverage * improved icp_odometry test coverage * lyrical voxel_grid ptr error * make multicam tests working as well without opengv * removing deps of missing packages on rolling * PCL empty cloud conversion compiler errors fix * fixing icp_odometry test failure on ci witohut libpointmatcher * fixing nav2 costmap plugin build on lyrical * joining thread when exiting * updating icp test to work the same on pcl 1.15 (lyrical) * Fix parallel tests seg fault --------- Co-authored-by: mathieu86 <[email protected]>
2.7 KiB
disparity_to_depth
Converts a disparity image into a depth image.
Most of ROS handles depth, while a stereo pipeline produces disparity. This node bridges the two: for every pixel it computes depth = baseline * focal / disparity, taking the baseline and focal length from the incoming stereo_msgs/msg/DisparityImage itself, so no camera info is needed.
Pixels whose disparity falls outside the message's own min_disparity/max_disparity are written as zero, which is the ROS convention for "no reading".
Contents
Usage
ros2 run rtabmap_util disparity_to_depth --ros-args \
-r disparity:=/stereo/disparity \
-r depth:=/stereo/depth
ComposableNode(
package='rtabmap_util',
plugin='rtabmap_util::DisparityToDepth',
name='disparity_to_depth',
remappings=[('disparity', '/stereo/disparity'),
('depth', '/stereo/depth')])
Subscribed Topics
| Topic | Type | Description |
|---|---|---|
disparity |
stereo_msgs/msg/DisparityImage |
The disparity image must be 32FC1; anything else is rejected with an error. |
Published Topics
| Topic | Type | Description |
|---|---|---|
depth |
sensor_msgs/msg/Image (32FC1) |
Depth in meters. |
depth_raw |
sensor_msgs/msg/Image (16UC1) |
The same depth in millimeters, the compact form most RGB-D drivers publish. |
Both are computed only if something is subscribed to them, so leaving one unused costs nothing. Both keep the header of the input disparity image.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
qos |
int |
0 |
Reliability of both sides: 0 system default, 1 reliable, 2 best effort. |
qos_sub |
int |
value of qos |
Reliability of the disparity subscription alone. |
qos_pub |
int |
value of qos |
Reliability of the depth and depth_raw publishers alone. |
queue_sub |
int |
1 |
Queue depth of the disparity subscription. Must be at least 1. |
queue_pub |
int |
1 |
Queue depth of both publishers. Must be at least 1. |
Notes
Depth beyond 65.535 m cannot be represented in the 16UC1 output and wraps around; use the 32FC1 depth topic for long-range stereo.
This node performs no filtering or hole-filling. A noisy disparity image gives a noisy depth image.