Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the processing of the image duplicated by rgbd-node and rtabmap-node??? #1277

Open
LeslieJay opened this issue Feb 14, 2025 · 1 comment

Comments

@LeslieJay
Copy link

LeslieJay commented Feb 14, 2025

In the ROS2 Humble version, the RGBD node generates odometer information by subscribing to color images and depth images, and the RTABMAP node also generates maps by subscribing to color images and depth images. Is the processing of the image duplicated by these two nodes? If it is duplicated, why doesn't the rtabmap node directly use the processing result of the rgbd node?
here is my command line:
ros2 launch rtabmap_examples rgbd_slam_datasets.launch.py

matlabbe added a commit that referenced this issue Mar 2, 2025
@matlabbe
Copy link
Member

matlabbe commented Mar 2, 2025

Yes, both would reprocess independently the images by default. We can however optimize how data is transferred to avoid duplicating same processes (e.g., re-extracting same visual features already extracted from vo). I updated rgbd_slam_datasets.launch.py in commit above to link vo's output odom_rgbd_image to corresponding input of rtabmap and rtabmap_viz nodes. odom_rgbd_image contains 2d keypoints, 3d points and descriptors for each feature extracted by vo. With Mem/UseOdomFeatures on rtabmap side, the features received from that topic are directly used in slam back-end.

Here is a comparison of computation time without and with this optimization respectively, from rtabmap node point of view:

Image

Image

We roughly save 7.6 ms per frame in this example. Another optimization could be to use Composable Nodes to avoid serialization/deserialization of odom_rgbd_image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants