Ask Your Question
0

Pointcloud_to_laserscan based on recorded data

asked 2012-11-08 19:34:57 -0500

Poseidonius gravatar image

updated 2012-11-08 19:36:33 -0500

Hi everyone,

I recorded some kinect data using openni with rosbag. Now i want to replay the data set and transform the 3D measurement into a laserscan. pointcloud_to_laserscan offers this function but it is embedded into a openni nodelet. If I started the corresponding launch file

roslaunch turtlebot_bringup kinect.launch

pointcloud_to_laserscan started, but no connection was established to rosbag. I allready checked the topic names ...

I assume it is not possible to execute the code out of the nodelet? Do you know another package that offers such a function?

Best wishes

Poseidonius

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-11-08 21:08:33 -0500

Lorenz gravatar image

You can just load the pointcloud_to_laserscan nodelet in a nodelet manager and leave out all other nodelets. Have a look here for more information on nodelets. To launch a single nodelet in a standalone node, you can use:

<launch>
  <node pkg="nodelet" type="nodelet" name="point_cloud_to_laser_manager" output="screen" args="standalone pointcloud_to_laserscan/CloudToScan">
    <param name="output_frame_id" value="/camera_depth_frame"/>
    <!-- heights are in the (optical?) frame of the kinect -->
    <param name="min_height" value="-0.025"/>
    <param name="max_height" value="0.025"/>
    <remap from="cloud" to="/cloud_throttled"/>
    <remap from="scan" to="/narrow_scan"/>
  </node>
</launch>

I just copied the relevant parts from kinect.launch and put them in a standalone nodelet. Note that the nodelet listens on /cloud_throttled, i.e. you either must record that topic, remap your point cloud topic to it in rosbag play or change the remapping in the above launch file.

edit flag offensive delete link more

Comments

Thanks a lot, it works now !!!

Poseidonius gravatar image Poseidonius  ( 2012-11-09 01:52:04 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-11-08 19:34:57 -0500

Seen: 358 times

Last updated: Nov 08 '12