Octomap topics not appearing in ROS topic list (or RVIZ)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Octomap topics not appearing in ROS topic list (or RVIZ)

Telemething
Hi,

I'm trying to obtain an Octomap (octree/ColorOccupancyGrid/etc) topic from RTABMap ROS but it does not appear in the ROS topic list. I am following this script:

$ roscore
$ rosparam set use_sim_time true
$ roslaunch rtabmap_ros rtabmap.launch visual_odometry:=false odom_frame_id:=world frame_id:=kinect rgb_topic:=/camera/rgb/image_color \
depth_topic:=/camera/depth/image rtabmap_args:="--delete_db_on_start --Kp/MaxFeatures -1" rtabmapviz:=false rviz:=true
$ rosbag play --clock --pause rgbd_dataset_freiburg3_long_office_household.bag

exactly as cited in this ( http://official-rtab-map-forum.67519.x6.nabble.com/Octomap-in-RTAB-Map-td4302.html ) thread.


As seen in RVIZ:

I get data in the voxel_cloud topic:



and the ColorOccupancyGrid viewer can be seen in the RVIZ type list:



but nothing referring to Octabmap shows up in topics and none of the topics appear to be an octree kind of structure:



I've built from the latest sources, no errors are thrown, data does appear, just no Octomap topics. I've combed through the source and found the ifdefs and as far as I can tell it's including the rtabmap_octomap stuff. I've visited many sites and topics and tried many examples. Of course maybe the Octomap data is there under a new name and I just don't know what I'm looking at. Eiher way, totally stuck. Thanks in advance for taking a look.
- Telemething
Reply | Threaded
Open this post in threaded view
|

Re: Octomap topics not appearing in ROS topic list (or RVIZ)

Telemething
Update.

This problem exists for me when building from source, it does not exist when I install the binaries. I've got quite a few ROS packages installed and they all work as designed, so the ROS platform itself seems to be working ok. The problem lies somewhere in the build (on my platforms) of the RTABMap libs and RTABMap ROS of code in 'RTABMAP_OCTOMAP' ifdefs. This code in these ifdefs is the part that publishes the octomap topics. I can't seem to get the RTABMap libs built with the code therin available for the linker to find when building RTABMap ROS.

1) The RTABMap lib code does build without signaling an error, and the RTABMap app seems to work just fine.
2) The RTABMap ROS code compiles just fine but fails on linking when I define RTABMAP_OCTOMAP.
3) The RTABMap ROS code compiles and links just fine when I omit defining RTABMAP_OCTOMAP, but at run time it doesn't publish any octomap topics.
4) When I install the binaries, everything works just fine, including the octomap topics.

I've tried a lot of config permutations but I'm missing something that is probably obvious to someone else. There must be some config used to build the releases that addresses this, is that available?
- Telemething
Reply | Threaded
Open this post in threaded view
|

Re: Octomap topics not appearing in ROS topic list (or RVIZ)

matlabbe
Administrator
Hi,

You should check first if octomap is detected by cmake when building rtabmap library. After doing "cmake .." in "rtabmap/build" directory, look for "With OCTOMAP = YES (License: BSD)"
-- --------------------------------------------
-- Info :
--   Version : 0.19.3
--   CMAKE_INSTALL_PREFIX = /usr/local
--   CMAKE_BUILD_TYPE =     Release
--   CMAKE_INSTALL_LIBDIR = lib
--   BUILD_APP =            ON
--   BUILD_TOOLS =          ON
--   BUILD_EXAMPLES =       ON
--   BUILD_SHARED_LIBS =    ON
...
--   With OCTOMAP              = YES (License: BSD)
...

If it is yes, the rtabmap library is supporting octomap. For rtabmap_ros, catkin should detect octomap_msgs to expose the octomap topics, see https://github.com/introlab/rtabmap_ros/blob/2eb8ba1be1a1b7f56c9eb1149e956e3989e81a2c/CMakeLists.txt#L134-L136

cheers,
Mathieu

Reply | Threaded
Open this post in threaded view
|

Re: Octomap topics not appearing in ROS topic list (or RVIZ)

Telemething
Thanks. And thanks for creating this awesome software.
- Telemething