rtabmap obstacle_detection nodelet not subscribing to topics
Hi, I am using the nodelet obstacle_detection from rtabmap to output a pointcloud that contains the obstacles to avoid.
I launch the obstacles_detection nodelet using:
<launch>
<node pkg="nodelet" type="nodelet" name="obstacles_detection" args="load rtabmap_ros/obstacles_detection stereo_nodelet">
<remap from="cloud" to="/obstacles_cloud"/>
<remap from="obstacles" to="/pointCloud_obstacles"/>
<param name="frame_id" type="string" value="base_link"/>
<param name="map_frame_id" type="string" value="map"/>
<param name="min_cluster_size" type="int" value="5"/>
<param name="cluster_radius" type="double" value="0.1"/>
<param name="max_obstacles_height" type="double" value="0.5"/>
</node>
</launch>
The problem is that the node doesn't subscribe to the obstacles_cloud topic and don't publish the pointCloud_obstacle topic.
The obstacle_detection node launches without errors, moreover the obstacles_cloud topic is correctly published from the pointcloud_xyz node.
To launch the pointcloud_xyz node I use:
<node pkg="nodelet" type="nodelet" name="points_xyz" args="standalone rtabmap_ros/point_cloud_xyz">
<remap from="depth/image" to="/zed2/depth/depth_registered"/>
<remap from="depth/camera_info" to="/zed2/depth/camera_info"/>
<remap from="cloud" to="/obstacles_cloud" />
<param name="decimation" type="double" value="4"/>
<param name="voxel_size" type="double" value="0.05"/>
<param name="approx_sync" type="bool" value="false"/>
</node>
I checked the behaviour of the node points_xyz using rostopic echo /obstacles_cloud and the node works correctly, it sends the correct type of messages (Sensor_msgs/Pointcloud2) on the correct topic at a rate of about 11Hz and they are not empty.
The output I get using rosnode info /obstacles_detection is
Node [/obstacles_detection]
Publications:
* /rosout [rosgraph_msgs/Log]
Subscriptions:
* /clock [rosgraph_msgs/Clock]
Services:
* /obstacles_detection/get_loggers
* /obstacles_detection/set_logger_level
contacting node http://alessio-pc:36503/ ...
Pid: 22655
Connections:
* topic: /rosout
* to: /rosout
* direction: outbound (47561 - 127.0.0.1:36618) [12]
* transport: TCPROS
* topic: /clock
* to: /gazebo (http://alessio-pc:34549/)
* direction: inbound (45134 - alessio-pc:44717) [13]
* transport: TCPROS
And this confirms that the node is not subscribed to any topic.
You are loading the first nodelet in nodelets manager
stereo_nodelet
, does it exist? Otherwise, try launching like the second nodelet as a standalone.Hi @matlabbe, thank you for answering!
I think it should exist because I am following the official tutorial proposed in the documentation of Rtabmap and it uses the same code: http://wiki.ros.org/rtabmap_ros/Tutor....
I'll check that nodelet then, thank you for your suggestion!
I updated the example in the wiki with the nodelet manager, as seen in the referred launch file here https://github.com/introlab/rtabmap_r...
Thank you! I added to the launch file:
Now I am able to launch the node and it correctly subscribe to the topics :)
But I ecnountered another problem, I get a new error from the obstacles_detection nodelet:
I'll look into that. EDIT: Question with solution to this new problem