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

octomap_ros on ros 2 humble

asked 2023-03-02 08:47:26 -0500

wintermute gravatar image

updated 2023-03-02 11:51:21 -0500

Hello,

Both octomap and octomap_ros are available on ros 2 humble, as debian packages. But the documentation linked is for ros noetic. Making some google searches on the subject I understood that there are no step-by-step tutorials on octomap ros 1 nor ros 2 - so I tried experimenting, and got some success but I have some questions.

  1. Can octomap_server take pointcloud2 data directly from sensor, such as zed2i's zed2i/zed_node/depth/depth_registered topic, or does it have to rely on another mapper such as rtabmap? Can octomap work standalone, as a replacement to rtabmap, or it needs rtabmap or some other node to run and process the point cloud. zed2i's output is sensor_msgs/msg/PointCloud2 and this is what octomap expects but, for some reason it will not publish /octomap_binary nor /octomap_full

  2. instead of zed2i's point cloud data, I have feeded in /voxel_cloud from rtabmap, and octomap then somewhat works. there is nothing about this in the documentation

  3. at the beginning octomap prints a warning about not being able to opening a path. in the source code:

    const auto filename = declare_parameter("octomap_path", ""); if (!openFile(filename)) { RCLCPP_WARN(get_logger(), "Could not open file %s", filename.c_str()); }

Does octomap expect a .bt file always, or can it operate without a bt file

Best regards, Can Altineller

[edit]

on further inspection, i found out that rtabmap also publishes octomap topics under /rtabmap/octomap ... is this embedded to rtabmap now, and we use octomap to just save produced map?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-03-05 18:45:53 -0500

matlabbe gravatar image

With octomap_server, you can feed it a point cloud from the sensor and its pose through TF, it should generate the octomap on its own. There is a minimal example here:

rtabmap integrated octomap library to generate octomap topics in same format than octomap_server (they can be visualized in RVIZ with octomap rviz plugins). When using rtabmap for octomap, you don't need octomap_server. The advantage of the integration in rtabmap is that on loop closure detection, the octomap will be updated accordingly. With octomap_server, it assumes non-drifting pose or if there is a correction of the pose, it won't re-update the previous cells seen so far.

cheers,
Mathieu

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2023-03-02 08:47:26 -0500

Seen: 804 times

Last updated: Mar 05 '23