build octomap using pointcloud2 data
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 octomapserver node, and PointCloud2 data. I have set up the following: 1 My RealSense camera is publishing data over the topic, "/cloudin". 2 I am publishing /tf frames for "baselink" to "cameralink" at 5Hz 3 I am running rosrun octomapserver octomapserver_node
What else do I need to do, to get Octomap publishing occupancy grid cells over the topic "/0ccupiedcellsvisarray" I might be confused on how to set up the tf frames to match the data coming in over the "cloudin" topic. My understanding is a bit hazy when I come to tf frames and how they are matched with a topic.
Asked by Raisintoe on 2018-12-13 20:04:19 UTC
Answers
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"?>
<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="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"/>
</node>
</launch>
Asked by Coyotzi on 2019-01-28 16:01:55 UTC
Comments