Converting between T265 Odometry coordinates to RTABMAP Occupancy Grid Coordinates

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

Converting between T265 Odometry coordinates to RTABMAP Occupancy Grid Coordinates

uhroosh
Hi,

Is the coordinate system for the pose data we get from /t265/odom/sample equivalent to the coordinate system used for the /rtabmap/grid_map? I see that the origin of the occupancy grid from /rtabmap/grid_map is not at a constant position, especially when the occupancy grid grows in size.

Is there any easy way to translate between the two coordinate systems? I saw some other threads talking about TF, but wasn't sure how to easily implement that into my launch file/workflow. Here's the current launch file I'm using:


<launch>
   
    <arg name="device_type_camera1"     default="t265"/>
    <arg name="device_type_camera2"     default="l515"/>       
    <arg name="serial_no_camera1"     default=""/>
    <arg name="serial_no_camera2"     default=""/>
    <arg name="camera1"               default="t265"/>               
    <arg name="camera2"               default="l515"/>               
    <arg name="clip_distance"             default="-2"/>
    <arg name="use_rviz"                  default="false"/>
    <arg name="use_rtabmapviz"            default="false"/>
   

    <include file="$(find realsense2_camera)/launch/rs_d400_and_t265.launch">
            <arg name="device_type_camera1"             value="$(arg device_type_camera1)"/>
            <arg name="device_type_camera2"             value="$(arg device_type_camera2)"/>
            <arg name="serial_no_camera1"               value="$(arg serial_no_camera1)"/>
            <arg name="serial_no_camera2"               value="$(arg serial_no_camera2)"/>
            <arg name="camera1"                         value="$(arg camera1)"/>
            <arg name="camera2"                         value="$(arg camera2)"/>
            <arg name="clip_distance"                   value="$(arg clip_distance)"/>
           
    </include>

    <include file="$(find rtabmap_ros)/launch/rtabmap.launch">
           
            <arg name="rtabmap_args" value="--delete_db_on_start
                                        --Params:Grid/FromDepth=true
                                        --Params:Grid/RayTracing=true
                                        --Params:Grid/RangeMax=5.0" />
            <arg name="depth_topic"        value="/$(arg camera2)/aligned_depth_to_color/image_raw"/>
            <arg name="frame_id"           value="$(arg camera2)_link"/>
            <arg name="visual_odometry"    value="false"/>
            <arg name="odom_topic"         value="/$(arg camera1)/odom/sample"/>
            <arg name="rgb_topic"          value="/$(arg camera2)/color/image_raw"/>
            <arg name="camera_info_topic"  value="/$(arg camera2)/color/camera_info"/>
            <arg name="queue_size"         value="400"/>
            <arg name="rviz"               value="$(arg use_rviz)"/>
            <arg name="rtabmapviz"         value="$(arg use_rtabmapviz)"/>
    </include>
</launch>
Reply | Threaded
Open this post in threaded view
|

Re: Converting between T265 Odometry coordinates to RTABMAP Occupancy Grid Coordinates

matlabbe
Administrator
Do you mean the rotation looks wrong? or just that there is an offset in position? The origin of the grid map should match the first pose received from odometry.
Reply | Threaded
Open this post in threaded view
|

Re: Converting between T265 Odometry coordinates to RTABMAP Occupancy Grid Coordinates

uhroosh
Sorry for the inconvenience, I fixed my problem, there was nothing wrong with RTABMAP or ROS.