Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/octomap_point_cloud_centers topic is not clear when there is a loop closure in rtabmap_ros #65

Open
acpl00 opened this issue Feb 12, 2020 · 6 comments

Comments

@acpl00
Copy link

acpl00 commented Feb 12, 2020

Dear people

I have a launch file that contains the following two packages, among others:

rtabmap.launch

octomap_server with cloud_in = /rtabmap/cloud_map

I do have a problem, when I run the rtabmap.launch and I plot the /octomap_point_cloud_centers in RVIZ.

The problem is that when the rtabmap finds a loop closure and corrects itself, the /octomap_point_cloud_centers topic do not clear.

How can I solve this issue?

Any help is appreciated, thank you

@wxmerkt
Copy link
Member

wxmerkt commented Feb 12, 2020

Hi!
Sorry I am not familiar with the particular launch file, rtabmap, or how it uses the octomap package or which node thereof. You should be able to make a service call to reset the octomap which potentially would clear the point cloud?

@acpl00
Copy link
Author

acpl00 commented Feb 13, 2020

Hi,
I have called the reset service call, and indeed in resets the cloud_map, but it does not reset or clear the /octomap_point_cloud_centers. And when there is a rtabmap_ros loop closure the /octomap_point_cloud_centers does not clear and the resulting map is a combination of the corrected map due to the loop closure and the not corrected one.

If you do not mind you can take a look at the post I have made in rtabmap forum:

http://official-rtab-map-forum.67519.x6.nabble.com/Rtabmap-octree-centers-remain-after-loop-closure-dtected-td6470.html#a6482

@wxmerkt
Copy link
Member

wxmerkt commented Feb 13, 2020

Sorry I do not have the capacity or time to provide support to user questions. Based on checking the source code, publishAll should be called so the point cloud should be published (publishPointCloud=true) with an empty point cloud message. Did you check that there is nothing when you listen to the topic upon a reset?

@acpl00
Copy link
Author

acpl00 commented Feb 14, 2020

I have tried the reset call service and the the /occupied_cells_vis_array is reset, however the /octomap_point_cloud_centers is not reset.

@wxmerkt
Copy link
Member

wxmerkt commented Feb 14, 2020

You may have to work with the source code and check that topics are published on reset (publishAll) and what those messages contain (e.g. rostopic echo)

@wxmerkt
Copy link
Member

wxmerkt commented Aug 7, 2021

Related to #85 - also due to the early return inside publishAll in

if (octomapSize <= 1){
ROS_WARN("Nothing to publish, octree is empty");
return;
}

However, not yet fixed by #92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants