Ask Your Question

build octomap using pointcloud2 data

asked 2018-12-13 19:04:19 -0500

Raisintoe gravatar image

I could use a little help getting Octomap to publish occupancy grid cell data. I have been reading the explanation on the ROS Wiki for how to build an Octomap using the octomap_server node, and PointCloud2 data. I have set up the following: 1 My RealSense camera is publishing data over the topic, "/cloud_in". 2 I am publishing /tf frames for "base_link" to "camera_link" at 5Hz 3 I am running rosrun octomap_server octomap_server_node

What else do I need to do, to get Octomap publishing occupancy grid cells over the topic "/0ccupied_cells_vis_array" I might be confused on how to set up the tf frames to match the data coming in over the "cloud_in" topic. My understanding is a bit hazy when I come to tf frames and how they are matched with a topic.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2019-01-28 15:01:55 -0500

Coyotzi gravatar image

Honestly there does not seem to be anything wrong. That say we could use more info like command used or roslaunch file. If there is nothing wrong with your tf tree (you can check using rosrun tf view_frames) the only thing you need is to subscribe to the topic.
Anyhow if you only want to visualize the octomap just go to rviz and select a a MarkerArray message. If you need to process it in some way you might consider using the Octomap library or subscribing to the octomap_point_cloud_centers message.
In any case this is the type of roslaunch i use when working with octomap and a kinect:

<?xml version="1.0" encoding="UTF-8"?>

  <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="map"/>

    <!-- maximum range to integrate (speedup!) -->
    <param name="sensor_model/max_range" value="4.0"/>
    <param name="base_frame_id " value="base_link" type="str"/>

    <!-- data source to integrate (PointCloud2) -->
    <remap from="cloud_in" to="/your/cloud/topic/here"/>


edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2018-12-13 19:04:19 -0500

Seen: 818 times

Last updated: Dec 13 '18