OctoMap / octomap_mapping

ROS stack for mapping with OctoMap, contains octomap_server package
http://www.ros.org/wiki/octomap_mapping
335 stars 280 forks source link

How to integrate into existing package? #93

Open ValentinaMiller opened 3 years ago

ValentinaMiller commented 3 years ago

I am currently working with this workspace https://github.com/mSimon12/multiple_quadrotors and I am trying to track the changes in the octomap and therefore would like to use your packages. However, I am not able to connect the two packages.

When I try to start the any of the octomap_server launch files it tells me "Nothing to publish, octree is empty" even though I can see the octomap in rviz, can save the octree, use its services....

Am I missing something?

Thanks!

wxmerkt commented 3 years ago

Nothing to publish, octree is empty indicates that the Octree is empty and thus the server won't publish any message. Publishing is either triggered after point cloud insertion, clearing parts of the octree, or calling the reset service. As thus, I am surprised that you can see the Octomap if it indicates that the Octree is empty. The first step to investigate is to check that the topics are connected properly. rqt_graph (which may not work on Noetic?) would be the first step, or alternatively you can use rosnode info [name of node] and explore the topics with rostopic list.

ValentinaMiller commented 3 years ago

Thanks for your quick response! Yes you were right! The octomap_server node is connected correctly but the tracking and nodelet node are not connected to the other nodes... Can you give me some advice on where in the package those dependencies are defined? Thanks a bunch!

wxmerkt commented 3 years ago

The relevant code is in OctomapServer.cpp for the regular octomap server or in [TrackingOctomapServer.cpp] for the tracking server - based on the post I am not sure which one is used or you are planning to use. From the linked repository, it appears that the standard octomap server is used fusing information in the camera/depth/points topic (cf. here) - this likely creates the Octomap you can visualise (along with the raw point cloud that is the basis of this octomap. Note, this is the standard octomap server and not the tracking octomap server - i.e., it wont publish changes but only the full octomap

ValentinaMiller commented 3 years ago

Thanks again! Using camera/depth/points used part of the issue I think, the octomap_talker subscribed to camera/depth/points now and the octomap_tracking_server subscribed to octomap_talker and octomap_listener subscribed to octomap_tracking_server. (I guess that is how it is supposed to be?) However when I am moving and listening to the octomap_tracking_server nothing is being published... Do you have any idea why?