0
$\begingroup$

Rosanswers logo

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:

https://github.com/duo3d/duo3d_driver/blob/master/src/duo3d_driver.cpp

And using this launch file with static TF:

<launch>
    <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>
    <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"/>
</launch>

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: https://drive.google.com/file/d/1qRQrpndWqA_F7vqKuDCZKGiTedbIf4-S/view?usp=sharing


Originally posted by EdwardNur on ROS Answers with karma: 115 on 2019-03-23

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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" />

Originally posted by matlabbe with karma: 6409 on 2019-03-23

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by EdwardNur on 2019-03-24:
@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?

Comment by EdwardNur on 2019-03-24:
@matlabbe Actually, if you can have a look at my new question I would appreciate: https://answers.ros.org/question/319346/all-spaces-are-occupied-using-rtabmap-stereo/

Comment by matlabbe on 2019-03-31:
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)

$\endgroup$

Your Answer

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