0
$\begingroup$

Rosanswers logo

Hi,

I have trouble with a nodelet which is responsible for converting depth image to laser scan. I have the required topics namely /camera/depth/camera_info and /camera/depth/image_raw and here is how my launch file looks like:

<launch>
  <arg name="camera"  value="camera"/>
  <arg name="manager" value="$(arg camera)_nodelet_manager" />

  <group ns="$(arg camera)">
    <node pkg="nodelet" type="nodelet" name="$(arg manager)" respawn="true" args="manager"/>
    <node pkg="nodelet" type="nodelet" name="openni2_camera" args="load openni2_camera/OpenNI2DriverNodelet $(arg manager)" respawn="true">
    </node>

    <node pkg="nodelet" type="nodelet" name="depthimage_to_laserscan_loader" args="load depthimage_to_laserscan/DepthImageToLaserScanNodelet $(arg manager)">
        <param name="scan_height" value="10"/>
        <param name="output_frame_id" value="/depth_camera_link"/>
        <param name="range_min" value="0.3"/>
        <remap from="image" to="/depth/image_raw"/>
        <remap from="scan" to="/scan"/>
    </node>
  </group>
</launch>

My problem is that the /scan topic is empty and is not being published. However when I do

rosrun depthimage_to_laserscan depthimage_to_laserscan image:=/camera/depth/image_raw

the /scan topic is being published as expected. Do you have any suggestions?

Thanks a lot in advance.


Originally posted by zeinab on ROS Answers with karma: 88 on 2014-09-10

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I finally found the solution. what I should have in the launch file for the remapping of the image should be :

<remap from="image" to="depth/image_raw"/>

So it was the / which was causing the problem. This way it works and the /scan topic is being published correctly.


Originally posted by zeinab with karma: 88 on 2014-09-15

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by paulbovbel on 2014-09-16:
Didn't spot that. Gotta be careful about global and private namespaces.

$\endgroup$

Your Answer

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