Is this enough to integrate RTABMap and GPS?

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

Is this enough to integrate RTABMap and GPS?

ms2102
This post was updated on .
Dear matlabbe.

I want to integrate RTABMap and GPS.
I currently have a T265 and a D455 available for RTABMap.
I am using Ubuntu 20.04, ROS Noetic.

Below is the launch file for RTABMap.
I have added the bolded parts.
-----------------------------------------------------------------------
<launch>
 
  <arg name="rtabmapviz"              default="false" /> 
  <arg name="rviz"                    default="true" />
 
 
  <arg name="localization"            default="false"/>
 
 
  <arg name="rtabmapviz_cfg"          default="$(find rtabmap_ros)/launch/config/rgbd_gui.ini" />
  <arg name="rviz_cfg"                default="$(find rtabmap_ros)/launch/config/rgbd.rviz" />
 
  <arg name="frame_id"                default="robot_center"/>
  <arg name="odom_topic"              default="/t265/odom/sample"/>
 
  <arg name="rgbd_sync"               default="true"/>
  <arg name="approx_rgbd_sync"        default="false"/>
  <arg name="visual_odometry"         default="false"/>
 
 
  <arg name="rgb_topic"               default="/d400/color/image_raw" />
  <arg name="depth_topic"             default="/d400/aligned_depth_to_color/image_raw" />
  <arg name="camera_info_topic"       default="/d400/color/camera_info" />
 
  <arg name="gps_topic"               default="/ubox/fix" />

 
 
 
 
 
 
 
 
  <include file="$(find rtabmap_ros)/launch/rtabmap.launch">
    <arg name="rtabmapviz"              value="$(arg rtabmapviz)" /> 
    <arg name="rviz"                    value="$(arg rviz)" />
    <arg name="localization"            value="$(arg localization)"/>
    <arg name="gui_cfg"                 value="$(arg rtabmapviz_cfg)" />
    <arg name="rviz_cfg"                value="$(arg rviz_cfg)" />                                                                         

    <arg name="odom_topic"              value="$(arg odom_topic)"/>
    <arg name="frame_id"                value="$(arg frame_id)"/>
    <arg name="rgbd_sync"               value="$(arg rgbd_sync)"/>
    <arg name="depth_topic"             value="$(arg depth_topic)"/>
    <arg name="rgb_topic"               value="$(arg rgb_topic)"/>
    <arg name="camera_info_topic"       value="$(arg camera_info_topic)"/>
    <arg name="approx_rgbd_sync"        value="$(arg approx_rgbd_sync)"/>
    <arg name="visual_odometry"         value="$(arg visual_odometry)"/>   
   
    <arg name="gps_topic"               value="$(arg gps_topic)" />
   
  </include>
 
</launch>
--------------------------------------------------------------------------------

Question ①.
Can I say that I have integrated GPS into RTABMap now?
Does RTABMap assist the robot in estimating its own position by adding the "gps-related part" as shown in the launch file of RTABMap?

Question ②.
In response to the question "I want to compare before and after adding GPS?" in the following post, matlabbe replied "There is a /gps/fix input topic to rtabmap node. To use GPS in graph You may check this post and this post that show how GPS and SLAM trajectories can be You may check this post and this post that show how GPS and SLAM trajectories can be visualized in rtabmap-databaseViewer.
But I could not find "Optimizer/PriorsIgnored" anywhere about RTABMap. Where can I add or change this setting?
http://official-rtab-map-forum.206.s1.nabble.com/how-to-identify-that-GPS-has-affected-rtabmap-localization-td8383.html

Reply | Threaded
Open this post in threaded view
|

Re: Is this enough to integrate RTABMap and GPS?

matlabbe
Administrator
Hi,

For your first question, yes and no, see https://answers.ros.org/question/382337/how-to-add-gps-map-to-the-rtabmap-database/?answer=383513#post-id-383513 or http://official-rtab-map-forum.206.s1.nabble.com/how-to-identify-that-GPS-has-affected-rtabmap-localization-td8383.html

For your second question, to get description of that parameter, do:
rtabmap --params | grep Optimizer/

To include the parameter in your launch file, as you are including rtabmap.launch, use "args" parameter:

<include file="$(find rtabmap_ros)/launch/rtabmap.launch">
  ...
  <arg     if="$(arg localization)" name="args"  value="--Optimizer/PriorsIgnored false" /> 
  <arg unless="$(arg localization)" name="args"  value="-d --Optimizer/PriorsIgnored false" /> 
</include>
(added logic with localization argument to delete or not the database)

cheers,
Mathieu