ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

rtabmap obstacle_detection nodelet not subscribing to topics

asked 2022-01-29 06:55:09 -0500

updated 2022-01-29 09:26:18 -0500

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.

edit retag flag offensive close merge delete

Comments

1

You are loading the first nodelet in nodelets manager stereo_nodelet, does it exist? Otherwise, try launching like the second nodelet as a standalone.

matlabbe gravatar image matlabbe  ( 2022-01-29 17:39:28 -0500 )edit

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!

AlessioParmeggiani gravatar image AlessioParmeggiani  ( 2022-01-30 05:22:44 -0500 )edit
1

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...

matlabbe gravatar image matlabbe  ( 2022-01-30 18:09:04 -0500 )edit

Thank you! I added to the launch file:

 <node pkg="nodelet" type="nodelet" name="stereo_nodelet"  args="manager"/>

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:

Lookup would require extrapolation -0.120000000s into the future.  Requested time 1027.127000000 but the latest data is at time 1027.007000000, when looking up transform from frame [base_link] to frame [map]

I'll look into that. EDIT: Question with solution to this new problem

AlessioParmeggiani gravatar image AlessioParmeggiani  ( 2022-01-31 04:17:20 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-02-08 05:01:30 -0500

updated 2022-02-08 05:02:11 -0500

The problem has been solved by adding to the launch file:

 <node pkg="nodelet" type="nodelet" name="stereo_nodelet"  args="manager"/>

as suggested by user matlabbe above. See comments to question for more details

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-01-29 06:55:09 -0500

Seen: 73 times

Last updated: Feb 08 '22