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

Why does pointcloud pointing upwards?

asked 2019-03-23 13:19:10 -0600

EdwardNur gravatar image

updated 2019-03-23 14:26:35 -0600

I am using a camera remotely and sending the compressed image frames to host pc. I am using RTABmap to create a 2d MAP.

The problem occurs when the PCL is being published and the points are located above my robot. Why is that? Have a look at the picture: image description

My TF is normal and I am using this CPP code to send the images:

And using this launch file with static TF:

    <arg name="pi/2" value="1.5707963267948966" />
    <node pkg="tf" type="static_transform_publisher" name="duo3d_base_link" args="0 0 0 0 0 01 /duo3d/camera_frame duo3d_camera 100" />

    <node name="duo3d" pkg="duo3d_driver" type="duo3d_driver" output="screen">
        <param name="frame_rate" value="30.0"/>
        <rosparam param="image_size">[320, 240]</rosparam>
        <param name="dense3d_license" value="OVMZU-ZHFE2-9K41K-NQL44-WX3DV"/>
        <param name="gain" value="0"/>
        <param name="exposure" value="50"/>
        <param name="auto_exposure" value="true"/>
        <param name="vertical_flip" value="true"/>
        <param name="led" value="35"/>
        <param name="processing_mode" value="1"/>
        <param name="image_scale" value="0"/>
        <param name="pre_filter_cap" value="8"/>
        <param name="num_disparities" value="7"/>
        <param name="sad_window_size" value="3"/>
        <param name="uniqueness_ratio" value="2"/>
        <param name="speckle_window_size" value="256"/>
        <param name="speckle_range" value="2"/>
    <node pkg="rqt_gui" type="rqt_gui" name="rqt_gui" args="--perspective-file $(find duo3d_driver)/launch/rqt/depth_view.perspective"/>
    <node pkg="rviz" type="rviz" name="rviz" args="-d $(find duo3d_driver)/launch/rviz/depth.rviz"/>

So why does PCL prints on top of my robot? That makes my map to be occupied everywhere.

Also, this is what PCL of obstacles look like produced by RTABMAP:

image description

I am using default stereo_mapping launch file.

EDIT! It seems to do something with IMU but I do not know yet what is happening. When I tilt my IMU, pcl also tilts. If you can debug together with me that would be great.

My rosbag is:

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-03-23 15:00:41 -0600

matlabbe gravatar image

It seems there is a missing optical rotation TF. You may try this:

<arg name="pi/2" value="1.5707963267948966" />
<node pkg="tf" type="static_transform_publisher" name="duo3d_base_link" args="0 0 0 -$(arg pi/2) 0 -$(arg pi/2) /duo3d/camera_frame duo3d_camera 100" />
edit flag offensive delete link more


@matlabbe Hi, thank you. Indeed, there is a problem with the tf but I fixed that by assigning PCL values in a different order: pcl.x = z and etc., as static_tf did not fix the problem. I guess I need to send TF myself. Also, when I send compressed images without RTABmap I get 30 Hz but as soon as I turn on RTABmap, my frequency of images drop to 10 Hz, do you know the reason?

EdwardNur gravatar image EdwardNur  ( 2019-03-24 10:03:09 -0600 )edit

@matlabbe Actually, if you can have a look at my new question I would appreciate:

EdwardNur gravatar image EdwardNur  ( 2019-03-24 13:22:23 -0600 )edit

Make sure you changed frame_id of rtabmap from duo3d_camera to /duo3d/camera_frame. If you don't start rtabmap, it is maybe because there are no subscribers on the topic images, so they are not compressed (thus no processing time used to compress image)

matlabbe gravatar image matlabbe  ( 2019-03-31 15:32:31 -0600 )edit

Question Tools

1 follower


Asked: 2019-03-23 13:19:10 -0600

Seen: 309 times

Last updated: Mar 23 '19