ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Humplestilzzchen - no need to fork, Karl was spot on

You can control the planar slice in the z-axis with the frame you output to via the target_frame param. In my case I was looking for objects at 6ft high so I created a static transform in my launch file:

<arg name="laser_height" default="1.829" /> <!-- 1.829m == 6ft --> <node pkg="tf" type="static_transform_publisher"' name="laser_height_offset" args="0 0 $(arg laser_height) 0 0 0 /base_link /laser_height 100 />

This creates the /laser_height frame in tf. Then in the config for pointcloud_to_laserscan I have:

<node pkg="pointcloud_to_laserscan" type="pointcloud_to_laserscan_node" name="scan"> <remap from="cloud_in" to="your/Pointcloud2/topic/name" /> <rosparam> target_frame: laser_height ...other params here... </rosparam> </node>

Now you should have a laserscan slice at the level specified by the laser_height param (6ft / 1.829m in my case above).

The min_height and max_height params look like they define a band of points from the pointcloud to operate on; anything outside is ignored.

Thanks Karl!