Static multi rgbd camera mapping with gazebo.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Static multi rgbd camera mapping with gazebo.

valerylo
Hello,
I am working on a simulation using static rgbd camera. My goal is to use these camera to generate a global costmap for a mobile robot. I followed the exemples I found and have a kind of result, but it does not match reallity. I guess I have a TF issue somewhere but I can not find it.
I work on ROS melodic.
Here is the node graphe I get:
node graphe

Here is the tf tree



Here is the result I get in RVIZ. The costmap does not correspond to the 2 pointclouds (in color)


Here is the launch file I use for RTABmap:
<launch>
   
    <arg name="localization"            default="false"/>

    <arg     if="$(arg localization)" name="args" default=""/>
    <arg unless="$(arg localization)" name="args" default="--delete_db_on_start"/>

    <arg name="odom_topic"              default="/odom" />   
   



   <arg name="wait_for_transform"  default="true" />


   
    <group ns="camera1">

        <node pkg="nodelet" type="nodelet" name="camera1_nodelet_manager" args="manager"
            output="screen" launch-prefix="">
         
        </node>

        <node pkg="nodelet" type="nodelet" name="rgbd_sync" args="load rtabmap_ros/rgbd_sync camera1_nodelet_manager">
           
            <remap from="rgb/image"         to="/fixed_camera_1/color/image_raw"/>
            <remap from="depth/image"       to="/fixed_camera_1/depth/image_raw"/>
            <remap from="rgb/camera_info"   to="/fixed_camera_1/color/camera_info"/>
        </node>
    </group>


    <group ns="camera2">

        <node pkg="nodelet" type="nodelet" name="camera2_nodelet_manager" args="manager"
            output="screen" launch-prefix="">
         
        </node>

        <node pkg="nodelet" type="nodelet" name="rgbd_sync" args="load rtabmap_ros/rgbd_sync camera2_nodelet_manager">
           
            <remap from="rgb/image"         to="/fixed_camera_2/color/image_raw"/>
            <remap from="depth/image"       to="/fixed_camera_2/depth/image_raw"/>
            <remap from="rgb/camera_info"   to="/fixed_camera_2/color/camera_info"/>
        </node>
    </group>



   
    <group ns="rtabmap">

    <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="$(arg args)">
        <rosparam command="load" file="$(find global_local_map_validation)/params/rtabmap_static_cam.yaml" />
       
       
           
           
           
                   
             
   
        <remap from="rgbd_image0"       to="/camera1/rgbd_image"/> 
        <remap from="rgbd_image1"       to="/camera2/rgbd_image"/>


        <remap from="grid_map"          to="map" />
        <remap from="odom"              to="$(arg odom_topic)"/>

       
         
       
       
    </node>

    </group>



</launch>

Reply | Threaded
Open this post in threaded view
|

Re: Static multi rgbd camera mapping with gazebo.

matlabbe
Administrator
Hi,

I am not sure you need a SLAM package to generate a costmap from two static cameras that are not on the robot. It may be possible to do though. For rtabmap node, what is the frame_id set? Don't use the one on the robot, but I would use a fixed called "world" that will be the parent of the two cameras in TF tree.

For rtabmap node:


 

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Static multi rgbd camera mapping with gazebo.

valerylo
Thank you for the answer :)
So far a SLAM package seems indeed a bit to much, but I plan to work with both static and mobile camera in the future, that is why I directly start with rtabmap.
I changed the frame_id, which was set to "base_link", to "map". But it didn t solved my problem.
Reply | Threaded
Open this post in threaded view
|

Re: Static multi rgbd camera mapping with gazebo.

matlabbe
Administrator
Can you share the resulting database? OR if the database is empty, what kind of errors/warnings do you get on terminal?