Robotics StackExchange | Archived questions

The local ROS2 costmap's freezes after receiving the 1st PointCloud2 data

I'm currently working on a ROS2 Humble project where I'm using a local costmap for robot navigation. The costmap is generated based on a point cloud data obtained from a 3D camera (oak-d-pro). However, I'm encountering an issue where the local costmap freezes and does not update as the robot moves.

I have configured the local costmap using the following parameters:

yaml Copy code localcostmap: localcostmap: ros_parameters: updatefrequency: 5.0 publishfrequency: 2.0 globalframe: odom robotbaseframe: baselink usesimtime: True rollingwindow: true width: 10 height: 10 resolution: 0.05 footprint: "[ [0.4665, 0.2890], [0.4665, -0.2890], [-0.4665, -0.2890], [-0.4665, 0.2890] ]" footprintpadding: 0.02 plugins: ["voxellayer", "inflationlayer"] voxellayer: plugin: "nav2costmap2d::VoxelLayer" enabled: True footprintclearingenabled: true maxobstacleheight: 2.0 publishvoxelmap: True originz: 0.0 zresolution: 0.05 zvoxels: 16 maxobstacleheight: 2.0 unknownthreshold: 15 markthreshold: 0 observationsources: pointcloud combinationmethod: 1 pointcloud: topic: /stereo/points sensorframe: baselink maxobstacleheight: 2.0 minobstacleheight: 0.0 obstaclemaxrange: 9.5 obstacleminrange: 0.0 raytracemaxrange: 10.0 raytraceminrange: 0.0 clearing: True marking: True datatype: "PointCloud2" inflationlayer: plugin: "nav2costmap2d::InflationLayer" costscalingfactor: 3.0 inflationradius: 3.0

  always_send_full_costmap: True

I have verified that the point cloud topic /stereo/points is publishing data correctly, and the sensor_frame parameter is set to match the frame ID of my 3D camera's optical frame.

However, despite these configurations, the local costmap freezes after receiving the first data from the point cloud and does not update as the robot moves. I suspect there may be an issue with the configuration or some missing parameters.

In fact, I have already attempted the same process in ROS1 Noetic, and it worked without any issues. Therefore, I wanted to inquire about the potential disparities in Quality of Service (QoS) for the point cloud topic between ROS1 and ROS2. I have been unable to access the QoS information in ROS1, and I noticed that in ROS2, I couldn't visualize the point cloud data in RViz until I adjusted the History Policy to "system default" and the Reliability to "best effort."

I would appreciate any insights or suggestions on how to resolve this problem. Thank you in advance for your help!

Asked by dines on 2023-06-20 21:01:20 UTC

Comments

Answers