0
$\begingroup$

Rosanswers logo

Hi,

I am trying to build a map out of a point cloud but somehow I don't receive a map. The point cloud is build from a tilting laser scanner and I pass this point cloud to the octomap server.

roswtf warned me that /octomap_server: /cloud_in is not connected but I did as you can see in my launch file.

rxlog just shows me that:

Incoming queue full for topic "/clock".  Discarding oldest message (current queue size [0])

Time jumped forward by [0.011000] for timer of period [0.010000], resetting timer (current=766.595000, next_expected=766.584000)

I set sim_time to true because I simulate in Gazebo.
Could that be a problem?

Launch File (last 2 nodes are interesting):

<?xml version="1.0"?>
<!-- upload script server parameters -->
<rosparam command="load" ns="/script_server/arm" file="$(find schunk_default_config)/config/powerball_joint_configurations.yaml"/>

<param name="use_sim_time" type="bool" value="true" />

<!-- launch an empty world -->
<include file="$(find gazebo_worlds)/launch/office_world.launch" />

<!-- send powerball urdf to param server -->
<include file="$(find schunk_hardware_config)/powerball/urdf/upload_powerball.launch" />

<!-- push robot_description to factory and spawn robot in gazebo -->
<node name="spawn_gazebo_model" pkg="gazebo" type="spawn_model" args="-urdf -param robot_description -model powerball -z 0.01 " respawn="false" output="screen" />

<!-- controller manager -->
<include file="$(find cob_controller_configuration_gazebo)/ros/launch/controller_manager.launch" />

<!-- powerball controllers -->
<include file="$(find schunk_controller_configuration_gazebo)/ros/launch/powerball_controller.launch" />

<!-- start command_gui -->
<node ns="command_gui" pkg="cob_command_gui" type="knoeppkes.py" name="$(anon command_gui_node)" cwd="node" respawn="false" output="screen" >
    <!-- upload button parameters, but delete the old ones before -->
    <rosparam command="load" ns="control_buttons" file="$(find schunk_default_config)/config/command_gui_buttons_powerball.yaml"/>
</node>

<!-- Laser Pipeline -->
<node type="laser_scan_assembler" pkg="laser_assembler" name="my_assembler">
    <remap from="scan" to="powerball_scanner"/>
    <param name="max_scans" type="int" value="400" />
    <param name="fixed_frame" type="string" value="base_link" />
</node>

<!-- Point cloud publisher -->
<node name="periodic_snapshotter" pkg="laser_assembler" type="periodic_snapshotter" respawn="false" output="screen" />

<!-- Octomap Server -->
<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="base_link" />
    
    <!-- maximum range to integrate (speedup!) -->
    <param name="max_sensor_range" value="5.0" />
    
    <param name="latch" value="false" />
    <!-- data source to integrate (PointCloud2) -->
    <remap from="assembled_cloud" to="/narrow_stereo/points_filtered2" />

</node>

Or is there another easy way to just get a 3D map from pint clouds for testing?


Originally posted by madmax on ROS Answers with karma: 496 on 2012-12-24

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

It seems that you remapped your topics in the wrong order. The last line should be:

 <remap from="cloud_in" to="/assembled_cloud" />

(assuming that the topic name of your assembled cloud is "assembled_cloud" in a global namespace, otherwise change it accordingly).

This will work as long as your robot does not move, i.e., it builds a local map with the laser scans in the base_link frame.


Originally posted by AHornung with karma: 5904 on 2012-12-26

This answer was ACCEPTED on the original site

Post score: 4


Original comments

Comment by madmax on 2012-12-27:
Ok, that did the trick ! But now I have the problem of publishing a PointCloud and Octomap wanting a PointCloud2 ;)

Comment by AHornung on 2012-12-28:
You definitely need a PointCloud2 for almost anything nowadays. If laser_assembler doesn't provide that, I would submit a bug report.

Comment by AHornung on 2012-12-28:
There may be a converter node somewhere, otherwise there are conversion functions in sensor_msgs: http://ros.org/doc/fuerte/api/sensor_msgs/html/point__cloud__conversion_8h.html

Comment by madmax on 2012-12-28:
Yes, I added the conversion in the periodic_snapshotter.cpp and now it works.

$\endgroup$

Your Answer

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