thien94 / orb_slam3_ros_wrapper

A ROS wrapper for ORB-SLAM3. Focus on portability and flexibility.
166 stars 76 forks source link

Could publish all point clouds of map #7

Closed Hyper-Devil closed 2 years ago

Hyper-Devil commented 3 years ago

Thank you for your outstanding work.

I am doing some SLAM-related work. The current point cloud topic _/orb_slam3_ros/mappoints published currently only contains the points currently tracked. If we can publish all the point clouds of the main map, It will be easy to create an occupancy grid map in ROS, I believe orb-slam3 will be easier to use. Do you have an update plan?

Thanks again for your work.

palakons commented 3 years ago

I am doing the same thing for my class project. My plan though is to let RTAB-Map consuming the PointCloud2 output from ORB_SLAM3, and viola! 3D occupancy map.

What do you think?

thien94 commented 2 years ago

Hi @Hyper-Devil , so sorry for the late reply.

At the moment, it seems that to access the point cloud of the whole map, we need to use this function GetAllMapPoints. The trouble is that there is no API that exposes the function directly to our ROS wrapper so some modifications are required. One solution is:

  1. modify System class to have the get function that returns the whole map's point cloud obtained from mpAtlas.
  2. modify the wrapper accordingly to inquire and receive the data, then convert it to ROS-friendly format (PointCloud)
  3. publish the point cloud msg

Since it requires noticeable changes with the ORB-SLAM3 library itself, it may not be available anytime soon (there is a backlog of PRs with ORB-SLAM3). You can go with the solution as @palakons suggested which is much more straightforward.

Hyper-Devil commented 2 years ago

Thank you for your advice and thank you again for your work.