0
$\begingroup$

Rosanswers logo

Hi,

I have seen on this ROS Answer topic that someone already had trouble saving maps from rgbd slam using octomap. I have exactly the same problem, I click on "Graph" -> Send Model (ctrl+M) inside the rgbdslam window, the model and the map seem to be sent correctly (30 out of 30 nodes, for example), but when I run "rosrun octomap_server octomap_saver mymap.bt" there is only 1 node saved to the map file (so empty map in octovis).

Let me explain my setup : rgbdslam from the wiki svn, adapted with many efforts to be used in fuerte and built with rosmake. I can capture a scene (by pressing space), but no map can be saved with octomap_saver as said above.

I have also set up the octomap_mapping.launch file accordingly (fixed frame "openni_camera" and "cloud_in" remapped to "/rgbdslam/batch_clouds").

I am also using the experimental branch of octomap. Here are the steps that I did to build it in ROS Fuerte:


downloaded mapping_msgs from svn (ros wiki) downloaded point_cloud_perception from svn (ros wiki) downloaded geometric_shapes_msgs from svn (ros wiki) downloaded octomap_mapping-experimental from svn https://alufr-ros-pkg.googlecode.com/svn/branches/octomap_mapping-experimental/

Error : /home/micmac/fuerte_workspace/octomap_mapping-experimental/octovis/src/octovis/TrajectoryDrawer.cpp:63:5: erreur: ‘GLUquadricObj’ was not declared in this scope

> Edited /home/micmac/fuerte_workspace/octomap_mapping-experimental/octovis/src/octovis/TrajectoryDrawer.h to add #include <GL/glu>

> and added GL and GLU to target_link_libraries to octomap_mapping-experimental/octovis/CMakeLists.txt

Error: /home/micmac/fuerte_workspace/octomap_mapping-experimental/octomap_ros/src/conversions.cpp:45:114: erreur: explicit instantiation shall not use ‘inline’ specifier [-fpermissive] Error: /home/micmac/fuerte_workspace/octomap_mapping-experimental/octomap_ros/src/conversions.cpp:46:125: erreur: explicit instantiation shall not use ‘inline’ specifier [-fpermissive]

> Edited /home/micmac/fuerte_workspace/octomap_mapping-experimental/octomap_ros/src/conversions.cpp to remove 'inline' specifier on both lines 45 and 46

Then rosmake octomap_mapping-experimental : Built 39 packages with 0 failures


So both RGBDSLAM and octomap_mapping-experimental seem to run fine, but I can't save any map using "rosrun octomap_server octomap_saver mymap.bt"

I have also tried to publish a static transform from /rgbdslam/batch_clouds to octomap_server by adding this line to octomap_mapping.launch:

I must also precise that I am using the Asus Xtion Pro live cam, so the topics may be a little different here and there (camera_rgb_optical_frame instead of openni_rgb_optical_frame), but I also tried all the required changed without success.

Would you please have any advice to give me on how to save a map from rgbdslam with octomap_mapping ? I've been spending monthes on this without success so far...


Originally posted by micmac on ROS Answers with karma: 141 on 2012-10-01

Post score: 2


Original comments

Comment by AHornung on 2012-10-02:
Do you really need the experimental branch of octomap_mapping? I think it's pretty outdated and not maintained by anyone...

Comment by micmac on 2012-10-02:
Well I sticked to what is said in the wiki. Furthermore, I have read somewhere (can not remember url sorry) that the experimental branch includes some transforms or other required stuff in order for the communication between rgbdslam and octomap server to work.

Comment by Felix Endres on 2012-10-25:
Could you update from the repository and see whether it works now?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

**2nd Edit: The latest release of my rgbdslam package includes the ability to compute the octomap internally. You can save it directly from the gui or via ros service call. See the wiki or the readme file for instructions. **

Edit: I found a bug in rgbdslam, where the tf frames of the old openni_camera driver are hardwired in the code. Because of this, octomap_server will not find a transformation between /map and the point cloud frame when using openni_launch. I'll try to release a fix soon.

This sounds like your settings for the interplay between rgbdslam and octomap_server are incorrect. The fixed frame should not be openni_camera, but whatever you set as parameter "fixed_frame_name" for rgbdslam.

rxgraph lets you easily see, whether the rgbdslam and octomap-server node are communicating on the same topic.

The pointclouds streamed to the octomap server need much bandwidth and much processing by the octomap server. Make sure your computer is capable of keeping up or adapt rgbdslam's parameter "send_clouds_rate".

Using the Xtion Pro is fine, you only need to adapt the input topics of rgbdslam, which seems to work as you see the cloud correctly in rgbdslam's gui.

The transform publisher you use makes no sense. The frame id set in /rgbdslam/batch_clouds is the fixed_frame_name as mentioned above. Make sure you set that same frame name for the octomap_server (see rgbdslam/launch/octomap_server.launch for an example).


Originally posted by Felix Endres with karma: 6468 on 2012-10-02

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by micmac on 2012-12-20:
I have also corrected that in the code itself, but it didn't help. I have not tried yet with your new repository though... I will try it as soon as I can, thanks for updating the code :)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.