depthimage_to_laserscan segmentation fault

asked 2017-05-29 09:15:47 -0500

Mahmoud Abdul Galil gravatar image

Now i have this simulation where i use a camera in gazebo and publish RGB images and depth images as well. I want to use the package "depthimage_to_laserscan" to convert the depth images published by gazebo as laser scans to use with gmapping.

I am facing a problem where the node depthimage_to_laserscan exits with segmentation fault without any further information. I made sure it subscribed to the topics on which gazebo publishes the depth image and camera info topics

Below are some relevant snapshots:

mahmoud@Galilei:~/Workspace/ros_ws$ rosrun depthimage_to_laserscan depthimage_to_laserscan image:=/realsense_depth_camera/depth/image_raw camera_info:/realsense_depth_camera/depth/camera_info
Segmentation fault (core dumped)
mahmoud@Galilei:~/Workspace/ros_ws$ rostopic info /realsense_depth_camera/depth/image_raw
Type: sensor_msgs/Image

Publishers: 
 * /gazebo (http://Galilei:38182/)

Subscribers: 
 * /depthimage_to_laserscan (http://Galilei:42456/)


mahmoud@Galilei:~/Workspace/ros_ws$ rostopic info /realsense_depth_camera/depth/camera_info 
Type: sensor_msgs/CameraInfo

Publishers: 
 * /gazebo (http://Galilei:38182/)

Subscribers: 
 * /depthimage_to_laserscan (http://Galilei:42456/)


mahmoud@Galilei:~/Workspace/ros_ws$

Here is the part of my URDF where i define the depth camera:

<gazebo reference="camera_depth_optical_frame">
                    <sensor type="depth" name="realsense_depth_camera">
                            <always_on>true</always_on>
                            <update_rate>20.0</update_rate>
                            <visualize>true</visualize>
                            <camera>
                                    <horizontal_fov>1.0471975512</horizontal_fov>
                                    <image>
                                            <format>L8</format>
                                            <width>480</width>
                                            <height>360</height>
                                    </image>
                                    <clip>
                                            <near>0.05</near>
                                            <far>8.0</far>
                                    </clip>
                            </camera>
                            <plugin name="realsense_camera_controller" filename="libgazebo_ros_openni_kinect.so">
                                    <cameraName>realsense_depth_camera</cameraName>
                                    <alwaysOn>true</alwaysOn>
                                    <updateRate>1</updateRate>
                                    <depthImageTopicName>depth/image_raw</depthImageTopicName>
                                    <pointCloudTopicName>depth/points</pointCloudTopicName>
                                    <depthImageCameraInfoTopicName>depth/camera_info</depthImageCameraInfoTopicName>
                                    <frameName>realsense_camera_frame</frameName>
                                    <baseline>0.1</baseline>
                                    <distortion_k1>0.0</distortion_k1>
                                    <distortion_k2>0.0</distortion_k2>
                                    <distortion_k3>0.0</distortion_k3>
                                    <distortion_t1>0.0</distortion_t1>
                                    <distortion_t2>0.0</distortion_t2>
                                    <pointCloudCutoff>0.4</pointCloudCutoff>
                                    <baseline>0.2</baseline>
                                    <CxPrime>0</CxPrime>
                                    <Cx>0</Cx>
                                    <Cy>0</Cy>
                                    <hackBaseline>1000</hackBaseline>
                            </plugin>
                    </sensor>
    ....
    </gazebo>
edit retag flag offensive close merge delete