Hi,
So far I've been following https://github.com/introlab/rtabmap_ros/blob/melodic-devel/launch/demo/demo_two_kinects.launch as the format for multiple cameras. But, I am a little confused why we have a separate nodelet manager for each of the camera? The nodelet managers don't seem to have more than one nodelet each anyways. Looking at https://github.com/introlab/rtabmap_ros/blob/master/launch/tests/test_rtabmap_nodelets.launch I can see that I can run rtabmap as a nodelet with the same camera_nodelet_manager. However, this example is only for a single camera. Is there a way to do this with multiple cameras? Is it as simple as putting all my cameras under the same nodelet manager? I am running a bunch of nodelets on one or more of my cameras as well: rgbd_sync rgbd_odometry points_xyz_planner obstacles_detection. What would be the best format for me? here is my launch file for reference: <?xml version="1.0" encoding="UTF-8"?> <launch> <arg name="sim" default="false"/> <arg name="localization" default="false" /> <arg if="$(arg localization)" name="args" default="" /> <arg unless="$(arg localization)" name="args" default="--delete_db_on_start" /> <arg name="compressed" default="true" /> <group ns="rtabmap"> <group ns="camera1"> <node pkg="nodelet" type="nodelet" name="nodelet_manager1" args="manager" /> <node pkg="nodelet" type="nodelet" name="rgbd_sync1" args="load rtabmap_ros/rgbd_sync nodelet_manager1"> <remap from="rgb/image" to="/zed1_GPU0/zed_node/rgb/image_rect_color" /> <remap from="depth/image" to="/zed1_GPU0/zed_node/depth/depth_registered" /> <remap from="rgb/camera_info" to="/zed1_GPU0/zed_node/rgb/camera_info" /> </node> </group> <group ns="camera2"> <node pkg="nodelet" type="nodelet" name="nodelet_manager2" args="manager" /> <node pkg="nodelet" type="nodelet" name="rgbd_sync2" args="load rtabmap_ros/rgbd_sync nodelet_manager2"> <remap from="rgb/image" to="/zed2_GPU0/zed_node/rgb/image_rect_color" /> <remap from="depth/image" to="/zed2_GPU0/zed_node/depth/depth_registered" /> <remap from="rgb/camera_info" to="/zed2_GPU0/zed_node/rgb/camera_info" /> </node> <node pkg="nodelet" type="nodelet" name="points_xyz_planner" args="load rtabmap_ros/point_cloud_xyz nodelet_manager2"> <remap from="depth/image" to="/zed2_GPU0/zed_node/depth/depth_registered"/> <remap from="depth/camera_info" to="/zed2_GPU0/zed_node/rgb/camera_info"/> </node> <node pkg="nodelet" type="nodelet" name="obstacles_detection" args="load rtabmap_ros/obstacles_detection nodelet_manager2"> <remap from="obstacles" to="/local_obstacles_cloud"/> <remap from="ground" to="/local_ground_cloud"/> </node> <node pkg="nodelet" type="nodelet" name="rgbd_odometry" args="load rtabmap_ros/rgbd_odometry nodelet_manager2" if="$(arg sim)"> <remap from="odom" to="/zed2_GPU0/zed_node/odom" /> </node> </group> <group ns="camera3"> <node pkg="nodelet" type="nodelet" name="nodelet_manager3" args="manager" /> <node pkg="nodelet" type="nodelet" name="rgbd_sync3" args="load rtabmap_ros/rgbd_sync nodelet_manager3"> <remap from="rgb/image" to="/zed3_GPU0/zed_node/rgb/image_rect_color" /> <remap from="depth/image" to="/zed3_GPU0/zed_node/depth/depth_registered" /> <remap from="rgb/camera_info" to="/zed3_GPU0/zed_node/rgb/camera_info" /> </node> </group> <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="$(arg args)" launch-prefix=""> <rosparam command="load" file="$(find mantis_nav)/config/rtabmap.yaml" /> <remap from="odom" to="/Odometry/filtered" /> <remap from="rgbd_image0" to="camera1/rgbd_image" /> <remap from="rgbd_image1" to="camera2/rgbd_image" /> <remap from="rgbd_image2" to="camera3/rgbd_image" /> <remap from="grid_map" to="/map"/> </node> </group> </launch> |
Administrator
|
Hi,
You can indeed run everything in the same nodelet manager. For demo_two_kinects.launch, it was because we launched two freenect drivers that are starting their own nodelet managers. For rgbd_sync, we attached to nodelet manager of the corresponding camera. cheers, Mathieu |
Hi,
I see, was it not possible to put both freenect drivers on the same nodelet managers? In that example, the rtabmap node is not able to benefit from sharing the same nodelet manager. I see it's helpful for making the camera specific nodelets work more efficiently. I'm using zed cameras and in this dilemma too. Normally each camera is distinguished by its own namespace. |
Administrator
|
Hi,
Yes we could put multiple freenect nodelets in same nodelets manager. I didn't do that in the example to use directly the provided launch file from freenect_launch package, which is starting a nodelet manager at each launch. You would have to modify this part to remove the manager declaration and adjust the "manager" argument to your external nodelets manager. For multiple zed cameras, you would have to look where the nodelets manager is created. cheers, Mathieu |
Free forum by Nabble | Edit this page |