ros-perception / depthimage_to_laserscan

Converts a depth image to a laser scan for use with navigation and localization.
253 stars 170 forks source link

Could not convert depth image to laserscan #29

Closed FerranGarcia closed 6 years ago

FerranGarcia commented 6 years ago

Hello,

I have been trying to make this work for a while in my Pepper robot equipped with a depth sensor and I am getting stuck with the following error:

Could not convert depth image to laserscan: Cannot call rectifyPoint when distortion is unknown.

The fisrt part clearly comes from depthimage_to_laserscan after the colon is coming from the PinholeCameraModel Class. Is not that the error is not clear, but I have no idea how to make this node get the required parameters since I already provided the camera_info topic. I am running the nodes with the following launch file:

<launch>
  <arg name="range_max" value="3.0" />

  <node pkg="depthimage_to_laserscan" type="depthimage_to_laserscan" name="depthimage_to_laserscan">
    <remap from="camera_info" to="/pepper_robot/camera/depth/camera_info" />
    <remap from="image" to="/pepper_robot/camera/depth/image_raw" />
    <remap from="scan" to="/pepper_robot/camera/depth/scan" />
    <param name="output_frame_id" value="CameraDepth_frame" />
    <param name="scan_height" value="10" />
    <param name="range_max" value="$(arg range_max)" />
  </node>
</launch>

Worth mentioning I am running in Indigo and 14.04 and I installed the package using sudo apt-get... . Any help would be appreciated!

FerranGarcia commented 6 years ago

I figure it out:

The definition of the camera distortion model was commented in my naoqi_driver version.

That prevents the topic /.../camera_info to publish the distortion model as well as its parameters so that no possible laser scan is provided based on the previous topic. Uncommenting solved the problem. If these values are ok is a very different topic :)