0
$\begingroup$

Rosanswers logo

hi , everyone i'm new to ros and i try to create a 3d map. Now I have a question about 3D mapping using OctoMap , which has annoyed me for a few weeks. Each time, I build a map with Microsoft XBOX 360 ,I always have the last scene not the global scene like the link http://ais.informatik.uni-freiburg.de/projects/datasets/octomap/ When I run the .launch file , I debug the programs using rostopic list , then use rostopic ehco /octomap_full etc , but no data outputs.

Also what more frustrates me is that topic /narrow_stereo/points_filtered2 remapped from cloud_in does not output data , which I think cloud_in is not output anything data or even octomap_server doesn't work at all . In rviz, when I choose the topic /octomap_point_cloud_centers of PointCloud2, there is no image , but /camera/depth/points or /camera/depth_registered/points does. Maybe the tf transform is not right,either.

I really don't know how to solve the problem. I hope someone can help me solve the problem. Any suggestion is appreciated. Thanks in advance.

The detail of list and launch file is following.

hustrobot@hustrobot-desktop:~$ roswtf
WARNING: Package name "swig-wx" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits and underscores.
No package or stack in context
================================================================================
Static checks summary:

No errors or warnings
================================================================================
Beginning tests of your ROS graph. These may take awhile...
analyzing graph...
... done analyzing graph
running graph rules...
... done running graph rules

Online checks summary:

Found 2 warning(s).
Warnings are things that may be just fine, but are sometimes at fault

WARNING The following node subscriptions are unconnected:
 * /octomap_server:
   * /narrow_stereo/points_filtered2
 * /hector_height_mapping:
   * /syscommand

WARNING The following nodes are unexpectedly connected:
 * /octomap_server->/rviz (/octomap_point_cloud_centers)

hustrobot@hustrobot-desktop:~$ rostopic list 
/camera/depth/camera_info
/camera/depth/disparity
/camera/depth/image
/camera/depth/image/compressed
/camera/depth/image/compressed/parameter_descriptions
/camera/depth/image/compressed/parameter_updates
/camera/depth/image/compressedDepth
/camera/depth/image/compressedDepth/parameter_descriptions
/camera/depth/image/compressedDepth/parameter_updates
/camera/depth/image/theora
/camera/depth/image/theora/parameter_descriptions
/camera/depth/image/theora/parameter_updates
/camera/depth/image_raw
/camera/depth/image_raw/compressed
/camera/depth/image_raw/compressed/parameter_descriptions
/camera/depth/image_raw/compressed/parameter_updates
/camera/depth/image_raw/compressedDepth
/camera/depth/image_raw/compressedDepth/parameter_descriptions
/camera/depth/image_raw/compressedDepth/parameter_updates
/camera/depth/image_raw/theora
/camera/depth/image_raw/theora/parameter_descriptions
/camera/depth/image_raw/theora/parameter_updates
/camera/depth/image_rect
/camera/depth/image_rect/compressed
/camera/depth/image_rect/compressed/parameter_descriptions
/camera/depth/image_rect/compressed/parameter_updates
/camera/depth/image_rect/compressedDepth
/camera/depth/image_rect/compressedDepth/parameter_descriptions
/camera/depth/image_rect/compressedDepth/parameter_updates
/camera/depth/image_rect/theora
/camera/depth/image_rect/theora/parameter_descriptions
/camera/depth/image_rect/theora/parameter_updates
/camera/depth/image_rect_raw
/camera/depth/image_rect_raw/compressed
/camera/depth/image_rect_raw/compressed/parameter_descriptions
/camera/depth/image_rect_raw/compressed/parameter_updates
/camera/depth/image_rect_raw/compressedDepth
/camera/depth/image_rect_raw/compressedDepth/parameter_descriptions
/camera/depth/image_rect_raw/compressedDepth/parameter_updates
/camera/depth/image_rect_raw/theora
/camera/depth/image_rect_raw/theora/parameter_descriptions
/camera/depth/image_rect_raw/theora/parameter_updates
/camera/depth/points
/camera/depth/rectify_depth/parameter_descriptions
/camera/depth/rectify_depth/parameter_updates
/camera/depth_registered/camera_info
/camera/depth_registered/disparity
/camera/depth_registered/image
/camera/depth_registered/image/compressed
/camera/depth_registered/image/compressed/parameter_descriptions
/camera/depth_registered/image/compressed/parameter_updates
/camera/depth_registered/image/compressedDepth
/camera/depth_registered/image/compressedDepth/parameter_descriptions
/camera/depth_registered/image/compressedDepth/parameter_updates
/camera/depth_registered/image/theora
/camera/depth_registered/image/theora/parameter_descriptions
/camera/depth_registered/image/theora/parameter_updates
/camera/depth_registered/image_raw
/camera/depth_registered/image_raw/compressed
/camera/depth_registered/image_raw/compressed/parameter_descriptions
/camera/depth_registered/image_raw/compressed/parameter_updates
/camera/depth_registered/image_raw/compressedDepth
/camera/depth_registered/image_raw/compressedDepth/parameter_descriptions
/camera/depth_registered/image_raw/compressedDepth/parameter_updates
/camera/depth_registered/image_raw/theora
/camera/depth_registered/image_raw/theora/parameter_descriptions
/camera/depth_registered/image_raw/theora/parameter_updates
/camera/depth_registered/image_rect
/camera/depth_registered/image_rect/compressed
/camera/depth_registered/image_rect/compressed/parameter_descriptions
/camera/depth_registered/image_rect/compressed/parameter_updates
/camera/depth_registered/image_rect/compressedDepth
/camera/depth_registered/image_rect/compressedDepth/parameter_descriptions
/camera/depth_registered/image_rect/compressedDepth/parameter_updates
/camera/depth_registered/image_rect/theora
/camera/depth_registered/image_rect/theora/parameter_descriptions
/camera/depth_registered/image_rect/theora/parameter_updates
/camera/depth_registered/image_rect_raw
/camera/depth_registered/image_rect_raw/compressed
/camera/depth_registered/image_rect_raw/compressed/parameter_descriptions
/camera/depth_registered/image_rect_raw/compressed/parameter_updates
/camera/depth_registered/image_rect_raw/compressedDepth
/camera/depth_registered/image_rect_raw/compressedDepth/parameter_descriptions
/camera/depth_registered/image_rect_raw/compressedDepth/parameter_updates
/camera/depth_registered/image_rect_raw/theora
/camera/depth_registered/image_rect_raw/theora/parameter_descriptions
/camera/depth_registered/image_rect_raw/theora/parameter_updates
/camera/depth_registered/points
/camera/depth_registered/rectify_depth/parameter_descriptions
/camera/depth_registered/rectify_depth/parameter_updates
/camera/driver/parameter_descriptions
/camera/driver/parameter_updates
/camera/ir/camera_info
/camera/ir/image_raw
/camera/ir/image_raw/compressed
/camera/ir/image_raw/compressed/parameter_descriptions
/camera/ir/image_raw/compressed/parameter_updates
/camera/ir/image_raw/compressedDepth
/camera/ir/image_raw/compressedDepth/parameter_descriptions
/camera/ir/image_raw/compressedDepth/parameter_updates
/camera/ir/image_raw/theora
/camera/ir/image_raw/theora/parameter_descriptions
/camera/ir/image_raw/theora/parameter_updates
/camera/ir/image_rect
/camera/ir/image_rect/compressed
/camera/ir/image_rect/compressed/parameter_descriptions
/camera/ir/image_rect/compressed/parameter_updates
/camera/ir/image_rect/compressedDepth
/camera/ir/image_rect/compressedDepth/parameter_descriptions
/camera/ir/image_rect/compressedDepth/parameter_updates
/camera/ir/image_rect/theora
/camera/ir/image_rect/theora/parameter_descriptions
/camera/ir/image_rect/theora/parameter_updates
/camera/ir/rectify_ir/parameter_descriptions
/camera/ir/rectify_ir/parameter_updates
/camera/projector/camera_info
/camera/rgb/camera_info
/camera/rgb/debayer/parameter_descriptions
/camera/rgb/debayer/parameter_updates
/camera/rgb/image_color
/camera/rgb/image_color/compressed
/camera/rgb/image_color/compressed/parameter_descriptions
/camera/rgb/image_color/compressed/parameter_updates
/camera/rgb/image_color/compressedDepth
/camera/rgb/image_color/compressedDepth/parameter_descriptions
/camera/rgb/image_color/compressedDepth/parameter_updates
/camera/rgb/image_color/theora
/camera/rgb/image_color/theora/parameter_descriptions
/camera/rgb/image_color/theora/parameter_updates
/camera/rgb/image_mono
/camera/rgb/image_mono/compressed
/camera/rgb/image_mono/compressed/parameter_descriptions
/camera/rgb/image_mono/compressed/parameter_updates
/camera/rgb/image_mono/compressedDepth
/camera/rgb/image_mono/compressedDepth/parameter_descriptions
/camera/rgb/image_mono/compressedDepth/parameter_updates
/camera/rgb/image_mono/theora
/camera/rgb/image_mono/theora/parameter_descriptions
/camera/rgb/image_mono/theora/parameter_updates
/camera/rgb/image_raw
/camera/rgb/image_raw/compressed
/camera/rgb/image_raw/compressed/parameter_descriptions
/camera/rgb/image_raw/compressed/parameter_updates
/camera/rgb/image_raw/compressedDepth
/camera/rgb/image_raw/compressedDepth/parameter_descriptions
/camera/rgb/image_raw/compressedDepth/parameter_updates
/camera/rgb/image_raw/theora
/camera/rgb/image_raw/theora/parameter_descriptions
/camera/rgb/image_raw/theora/parameter_updates
/camera/rgb/image_rect
/camera/rgb/image_rect/compressed
/camera/rgb/image_rect/compressed/parameter_descriptions
/camera/rgb/image_rect/compressed/parameter_updates
/camera/rgb/image_rect/compressedDepth
/camera/rgb/image_rect/compressedDepth/parameter_descriptions
/camera/rgb/image_rect/compressedDepth/parameter_updates
/camera/rgb/image_rect/theora
/camera/rgb/image_rect/theora/parameter_descriptions
/camera/rgb/image_rect/theora/parameter_updates
/camera/rgb/image_rect_color
/camera/rgb/image_rect_color/compressed
/camera/rgb/image_rect_color/compressed/parameter_descriptions
/camera/rgb/image_rect_color/compressed/parameter_updates
/camera/rgb/image_rect_color/compressedDepth
/camera/rgb/image_rect_color/compressedDepth/parameter_descriptions
/camera/rgb/image_rect_color/compressedDepth/parameter_updates
/camera/rgb/image_rect_color/theora
/camera/rgb/image_rect_color/theora/parameter_descriptions
/camera/rgb/image_rect_color/theora/parameter_updates
/camera/rgb/rectify_color/parameter_descriptions
/camera/rgb/rectify_color/parameter_updates
/camera/rgb/rectify_mono/parameter_descriptions
/camera/rgb/rectify_mono/parameter_updates
/collision_map_out
/diagnostics
/free_cells_vis_array
/free_map_out
/hokuyo/parameter_descriptions
/hokuyo/parameter_updates
/initialpose
/map
/map_metadata
/move_base_simple/goal
/narrow_stereo/points_filtered2
/occupied_cells_vis_array
/octomap_binary
/octomap_collision_object
/octomap_full
/octomap_point_cloud_centers
/octomap_server/parameter_descriptions
/octomap_server/parameter_updates
/poseupdate
/projected_map
/rosout
/rosout_agg
/scan
/slam_cloud
/slam_out_pose
/syscommand
/tf

The octo_slam.launch file(i write it myself) is following:

<launch>
    <node pkg="tf" type="static_transform_publisher" name="link2_broadcaster" args="-0.12 0 0.93 0.0 0.25 0 camera_link map 100" />
    <node pkg="tf" type="static_transform_publisher" name="link3_broadcaster" args="0 0 0 0 0 0 laser odom 100" />

    <!-- laser node -->
    <node name="hokuyo" pkg="hokuyo_node" type="hokuyo_node" />

    <!-- laser slam -->
    <include file="$(find rplidar_ros)/launch/hectormapping.launch" />

    <!-- kinect launch file -->
    <include file="$(find openni_launch)/launch/openni.launch" />

    <!-- octomap_server file -->
    <include file="$(find octomap_server)/launch/octomap_mapping.launch" />

    <!-- run rviz -->
    <node name="rviz" pkg="rviz" type="rviz" args="-d $(find rplidar_ros)/rviz/slam.rviz" />

</launch>

the octomap_mapping.launch is :

<!-- 
  Example launch file for octomap_server mapping: 
  Listens to incoming PointCloud2 data and incrementally builds an octomap. 
  The data is sent out in different representations. 

  Copy this file into your workspace and adjust as needed, see
  www.ros.org/wiki/octomap_server for details  
-->
<launch>
    <node pkg="octomap_server" type="octomap_server_node" name="octomap_server">
        <param name="resolution" value="0.05" />
        
        <!-- fixed map frame (set to 'map' if SLAM or localization running!) -->
        <param name="frame_id" type="string" value="odom_combined" />
        
        <!-- maximum range to integrate (speedup!) -->
        <param name="sensor_model/max_range" value="5.0" />
        
        <!-- data source to integrate (PointCloud2) -->
        <remap from="cloud_in" to="/narrow_stereo/points_filtered2" />
    
    </node>

</launch>

Originally posted by jwlifly on ROS Answers with karma: 3 on 2015-07-21

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

From what i understand, Octomap is not a 3D reconstruction or alignment tool. Given the transformations between pointclouds, it integrates the pointclouds into a 3D map. It builds 3D occupancy maps which can be used for 3d navigation.

As given in roswiki page of octomap_server. cloud_in (sensor_msgs/PointCloud2): Incoming 3D point cloud for scan integration. You need to remap this topic to your sensor data and provide a tf transform between the sensor data and the static map frame.

It needs the TF data from some other source such as RGBSLAM or CCNY_RGBD or RTABMAP. You can have a look at them.

Please correct me if i am wrong


Originally posted by imranlivt with karma: 46 on 2015-08-27

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by jwlifly on 2016-01-22:
sorry to answer you so late. you're right .After I remap the topic, it does work. thanks.

Comment by VEGETA on 2016-05-27:
hi jwlifly!

can you please summarize what you did there? I want to make a 3d map using kinect only! and then use it to let other swarm robots (who doesn't have any sensors) to navigate safely in the map.

my email is: [email protected] Facebook: https://www.facebook.com/Vegeta.ssjgs thanks

Comment by cuda on 2016-12-03:
Hello I am facing the same issues. How do you remap the topic to sensor data? Also, how to provide a TF transform between the sensor data and the static map frame? I'm new to this please help!

$\endgroup$

Your Answer

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