Problems with launch and mapping

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

Problems with launch and mapping

denzle
This post was updated on .
Hi,

I've finally managed to setup a working (for the most part) launch file. I'm still getting a few errors but can at least see the point cloud the lidar is putting out but i'm unable to actually create a map. Could you tell me where i'm going wrong. Also if i try to set the frame_id to anything other than os1_(sensor/lidar/imu) everything goes to pot. I'm assuming i should be working with map -> odom -> base_link -> os1_sensor / base_link -> camera. But as soon as i try static transforms i get other errors whereby the lidar can't be found. So i've attached all the details for the one that does work-ish.

(Regarding the camera topics - I am awaiting a realsense D415 to arrive)

Many thanks in advance
Dan

Launch file:

 <?xml version="1.0"?>
<!--
Copyright (c) 2018, STEREOLABS.

All rights reserved.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->

<launch>

 <!-- node pkg="tf" type="static_transform_publisher" name="map_2_odom" args="0 0 0 0 0 0 /map /odom 100"/>
   <node pkg="tf" type="static_transform_publisher" name="odom_2_base_link" args="0 0 0 0 0 0 /odom /base_link 100"/>
 <node pkg="tf" type="static_transform_publisher" name="base_link_2_os1_sensor" args="0 0 0 0 0 0 /base_link /os1_sensor 100"/>
   <node pkg="tf" type="static_transform_publisher" name="base_link_2_camera" args="0 0 0 0 0 0 /base_link /camera 100"/ -->


    <arg name="frame_id"                default="os1_sensor"/>     
    <arg name="odom_frame_id"           default="/odom"/>   
    <arg name="rtabmapviz"              default="true" /> 
    <arg name="rviz"                    default="true" />
    <arg name="image"                   default="true" /> 
    <arg name="scan_20_hz"              default="false"/> <!-- If we launch the velodyne with "rpm:=1200" argument -->
    
    <arg name="rgb_topic"         default="/camera/color/image_raw"/>
    <arg name="depth_topic"       default="/camera/aligned_depth_to_color/image_raw"/>
    <arg name="camera_info_topic" default="/camera/color/camera_info"/>
   
    <node if="$(arg rviz)" pkg="ouster_ros" name="viz_node" type="viz_node" output="screen" required="true">
        <remap from="~/os1_config" to="/os1_node/os1_config"/>
    	<remap from="~/points" to="/os1_cloud_node/points"/>
    </node>

    <node if="$(arg image)" pkg="ouster_ros" name="img_node" type="img_node" output="screen" required="true">
    	<remap from="~/os1_config" to="/os1_node/os1_config"/>
    	<remap from="~/points" to="/os1_cloud_node/points"/>
    </node>


  <group ns="rtabmap">

     <node pkg="nodelet" type="nodelet" name="rgbd_sync" args="standalone rtabmap_ros/rgbd_sync" output="screen">
          <remap from="rgb/image"       to="$(arg rgb_topic)"/>
          <remap from="depth/image"     to="$(arg depth_topic)"/>
          <remap from="rgb/camera_info" to="$(arg camera_info_topic)"/>
          <remap from="rgbd_image"      to="rgbd_image"/> <!-- output -->
          <param name="approx_sync"     type="bool"   value="false"/> <!-- false for realsense -->
     </node>

       <node pkg="rtabmap_ros" type="icp_odometry" name="icp_odometry" output="screen">
        <remap from="scan_cloud" to="/os1_cloud_node/points"/>
        <param name="frame_id"   type="string" value="$(arg frame_id)"/>


        <remap from="imu" to="/os1_cloud_node/imu/data"/> 
        <param name="guess_frame_id"   type="string" value="$(arg frame_id)"/>
        <param name="wait_imu_to_init" type="bool" value="false"/>
        <param name="Reg/Strategy"     type="string" value="1"/>

        <!-- ICP parameters -->
        <param name="Icp/PointToPlane"        type="string" value="false"/>
        <param name="Icp/Iterations"          type="string" value="10"/>
        <param name="Icp/VoxelSize"           type="string" value="0.2"/>
        <param name="Icp/DownsamplingStep"    type="string" value="1"/> <!-- cannot be increased with ring-like lidar -->
        <param name="Icp/Epsilon"             type="string" value="0.001"/>
        <param name="Icp/PointToPlaneK"       type="string" value="20"/>
        <param name="Icp/PointToPlaneRadius"  type="string" value="0"/>
        <param name="Icp/MaxTranslation"      type="string" value="2"/>
        <param name="Icp/MaxCorrespondenceDistance" type="string" value="1"/>
        <param name="Icp/PM"                  type="string" value="true"/>
        <param name="Icp/PMOutlierRatio"      type="string" value="0.7"/>
        <param name="Icp/CorrespondenceRatio" type="string" value="0.01"/>

        <!-- Odom parameters -->
        <param name="Odom/ScanKeyFrameThr"       type="string" value="0.9"/>
        <param name="Odom/Strategy"              type="string" value="1"/>
        <param name="OdomF2M/ScanSubtractRadius" type="string" value="0.2"/>
        <param name="OdomF2M/ScanMaxSize"        type="string" value="15000"/>
      </node>

      <node pkg="rtabmap_ros" type="rtabmap" name="rtabmap" output="screen" args="-d">
        <param name="subscribe_rgbd"       type="bool" value="true"/>
        <param name="frame_id"             type="string" value="$(arg frame_id)"/>
        <param name="subscribe_depth"      type="bool" value="false"/>
        <param name="subscribe_rgb"        type="bool" value="false"/>
        <param name="subscribe_scan_cloud" type="bool" value="true"/>
        <param name="approx_sync"          type="bool" value="false"/>

        <param name="queue_size" type="int" value="10"/>
        <param name="scan_cloud_max_points" value="32768"/> <!-- based on os-1 spec: 327,680 pts/second for 10 Hz -->
        
        <remap from="odom" to="/odom"/>
      	<remap from="scan_cloud" to="/os1_cloud_node/points"/>
        <remap from="rgbd_image" to="rgbd_image"/>

        <!-- RTAB-Map's parameters -->
        <param name="RGBD/NeighborLinkRefining" type="string" value="true"/>
      	<param name="RGBD/ProximityBySpace" 	type="string" value="true"/>
      	<param name="RGBD/AngularUpdate"    	type="string" value="0.01"/>
      	<param name="RGBD/LinearUpdate"     	type="string" value="0.01"/>
      	<param name="RGBD/OptimizeFromGraphEnd" type="string" value="false"/>
      	<param name="Reg/Strategy"          	type="string" value="1"/> <!-- 1=ICP -->
      	<param name="Reg/Force3DoF"         	type="string" value="false"/>
      	<param name="Vis/MinInliers"        	type="string" value="15"/>
      	<param name="Rtabmap/TimeThr"       	type="string" value="0"/> <!-- set to 0 to disable memory management -->
      	<param name="Mem/RehearsalSimilarity"   type="string" value="0.45"/>
      	<param name="Grid/CellSize" type="string" value="0.05"/> <!-- 5cm voxel default-->
      	<param name="Kp/MaxFeatures" type="string" value="400"/>
        <param name="Optimizer/Strategy" type="string" value="0"/> <!-- 0 is TORO, Default G20-->
        <param name="RGBD/OptimizeMaxError" type="string" value="0"/> <!--When using TORO, seto to 0,otherwise set to 1-->
        <param name="Kp/DetectorStrategy" type="string" value="6"/> <!--0=SURF 1=SIFT 2=ORB 3=FAST/FREAK 4=FAST/BRIEF 5=GFTT/FREAK 6=GFTT/BRIEF(default) 7=BRISK 8=GFTT/ORB 9=KAZE-->
        <param name="Grid/FromDepth" type="string" value="true"/> <!--suppress warning (subscribe_scan=true)-->
        <param name="RGBD/ProximityPathMaxNeighbors" type="string" value="1"/> <!--suppress warning (subscribe_scan = true and Reg/Strategy=1-->
        <param name="Vis/FeatureType" type="string" value="6"/> <!--suppress warning,want to be same as KP/detectorstrategy -->
        <!-- param name="Mem/LaserScanVoxelSize"     type="string" value="0.1"/ -->
        <!-- param name="Mem/LaserScanNormalK"       type="string" value="10"/ -->
        <!-- param name="Mem/LaserScanRadius"        type="string" value="0"/ -->

        <param name="Reg/Strategy"                   type="string" value="1"/>
        <param name="Grid/CellSize"                  type="string" value="0.1"/>
        <param name="Grid/RangeMax"                  type="string" value="20"/>
        <param name="Grid/ClusterRadius"             type="string" value="1"/>
        <param name="Grid/GroundIsObstacle"          type="string" value="true"/>
        <param name="Grid/FromDepth"                 type="string" value="true"/>

        <!-- ICP parameters -->
        <param name="Icp/VoxelSize"                  type="string" value="0.2"/>
        <param name="Icp/PointToPlaneK"              type="string" value="20"/>
        <param name="Icp/PointToPlaneRadius"         type="string" value="0"/>
        <param name="Icp/PointToPlane"               type="string" value="false"/>
        <param name="Icp/Iterations"                 type="string" value="10"/>
        <param name="Icp/Epsilon"                    type="string" value="0.001"/>
        <param name="Icp/MaxTranslation"             type="string" value="3"/>
        <param name="Icp/MaxCorrespondenceDistance"  type="string" value="1"/>
        <param name="Icp/PM"                         type="string" value="true"/>
        <param name="Icp/PMOutlierRatio"             type="string" value="0.7"/>
        <param name="Icp/CorrespondenceRatio"        type="string" value="0.4"/>
      </node>

      <node pkg="nodelet" type="nodelet" name="point_cloud_assembler" args="standalone rtabmap_ros/point_cloud_assembler" output="screen">
        <param     if="$(arg scan_20_hz)" name="max_clouds"      type="int"    value="20" />
        <param unless="$(arg scan_20_hz)" name="max_clouds"      type="int"    value="10" />
        <param name="fixed_frame_id"  type="string" value="fusion" />
        <remap from="cloud"           to="/os1_cloud_node/points"/>
        <remap from="odom"            to="/odom"/>
      </node>
         
      <node if="$(arg rtabmapviz)" name="rtabmapviz" pkg="rtabmap_ros" type="rtabmapviz" output="screen">
        <param name="frame_id" type="string" value="$(arg frame_id)"/>
        <param name="odom_frame_id" type="string" value="/odom"/>
        <param name="subscribe_odom_info" type="bool" value="true"/>
        <param name="subscribe_scan_cloud" type="bool" value="true"/>
        <param name="approx_sync" type="bool" value="false"/>
        <remap from="scan_cloud" to="/os1_cloud_node/points"/>
        <remap from="odom"        to="/odom"/>
        <param name="subscribe_depth" value="false"/><nabble_img src="Screenshot_from_2020-07-30_22-02-43.png" border="0" style="display: block; margin-left:auto; margin-right:auto;" alt="Rviz"/><nabble_img src="Screenshot_from_2020-07-30_22-05-11.png" border="0" style="display: block; margin-left:auto; margin-right:auto;" alt="TF "/><nabble_img src="rosgraphimg.png" border="0" style="display: block; margin-left:auto; margin-right:auto;" alt="ROSGraph"/>
      </node>
  </group>
    
</launch> 

ROSGraph

TF tree


RTABMAPVIZ



Ouster Viz Image
Reply | Threaded
Open this post in threaded view
|

Re: Problems with launch and mapping

denzle
Errors and other info:

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.6
 * /rtabmap/icp_odometry/Icp/CorrespondenceRatio: 0.01
 * /rtabmap/icp_odometry/Icp/DownsamplingStep: 1
 * /rtabmap/icp_odometry/Icp/Epsilon: 0.001
 * /rtabmap/icp_odometry/Icp/Iterations: 10
 * /rtabmap/icp_odometry/Icp/MaxCorrespondenceDistance: 1
 * /rtabmap/icp_odometry/Icp/MaxTranslation: 2
 * /rtabmap/icp_odometry/Icp/PM: true
 * /rtabmap/icp_odometry/Icp/PMOutlierRatio: 0.7
 * /rtabmap/icp_odometry/Icp/PointToPlane: false
 * /rtabmap/icp_odometry/Icp/PointToPlaneK: 20
 * /rtabmap/icp_odometry/Icp/PointToPlaneRadius: 0
 * /rtabmap/icp_odometry/Icp/VoxelSize: 0.2
 * /rtabmap/icp_odometry/Odom/ScanKeyFrameThr: 0.9
 * /rtabmap/icp_odometry/Odom/Strategy: 1
 * /rtabmap/icp_odometry/OdomF2M/ScanMaxSize: 15000
 * /rtabmap/icp_odometry/OdomF2M/ScanSubtractRadius: 0.2
 * /rtabmap/icp_odometry/Reg/Strategy: 1
 * /rtabmap/icp_odometry/frame_id: os1_sensor
 * /rtabmap/icp_odometry/guess_frame_id: os1_sensor
 * /rtabmap/icp_odometry/wait_imu_to_init: False
 * /rtabmap/point_cloud_assembler/fixed_frame_id: fusion
 * /rtabmap/point_cloud_assembler/max_clouds: 10
 * /rtabmap/rgbd_sync/approx_sync: False
 * /rtabmap/rtabmap/Grid/CellSize: 0.1
 * /rtabmap/rtabmap/Grid/ClusterRadius: 1
 * /rtabmap/rtabmap/Grid/FromDepth: true
 * /rtabmap/rtabmap/Grid/GroundIsObstacle: true
 * /rtabmap/rtabmap/Grid/RangeMax: 20
 * /rtabmap/rtabmap/Icp/CorrespondenceRatio: 0.4
 * /rtabmap/rtabmap/Icp/Epsilon: 0.001
 * /rtabmap/rtabmap/Icp/Iterations: 10
 * /rtabmap/rtabmap/Icp/MaxCorrespondenceDistance: 1
 * /rtabmap/rtabmap/Icp/MaxTranslation: 3
 * /rtabmap/rtabmap/Icp/PM: true
 * /rtabmap/rtabmap/Icp/PMOutlierRatio: 0.7
 * /rtabmap/rtabmap/Icp/PointToPlane: false
 * /rtabmap/rtabmap/Icp/PointToPlaneK: 20
 * /rtabmap/rtabmap/Icp/PointToPlaneRadius: 0
 * /rtabmap/rtabmap/Icp/VoxelSize: 0.2
 * /rtabmap/rtabmap/Kp/DetectorStrategy: 6
 * /rtabmap/rtabmap/Kp/MaxFeatures: 400
 * /rtabmap/rtabmap/Mem/RehearsalSimilarity: 0.45
 * /rtabmap/rtabmap/Optimizer/Strategy: 0
 * /rtabmap/rtabmap/RGBD/AngularUpdate: 0.01
 * /rtabmap/rtabmap/RGBD/LinearUpdate: 0.01
 * /rtabmap/rtabmap/RGBD/NeighborLinkRefining: true
 * /rtabmap/rtabmap/RGBD/OptimizeFromGraphEnd: false
 * /rtabmap/rtabmap/RGBD/OptimizeMaxError: 0
 * /rtabmap/rtabmap/RGBD/ProximityBySpace: true
 * /rtabmap/rtabmap/RGBD/ProximityPathMaxNeighbors: 1
 * /rtabmap/rtabmap/Reg/Force3DoF: true
 * /rtabmap/rtabmap/Reg/Strategy: 1
 * /rtabmap/rtabmap/Rtabmap/TimeThr: 0
 * /rtabmap/rtabmap/Vis/FeatureType: 6
 * /rtabmap/rtabmap/Vis/MinInliers: 15
 * /rtabmap/rtabmap/approx_sync: False
 * /rtabmap/rtabmap/frame_id: os1_sensor
 * /rtabmap/rtabmap/queue_size: 10
 * /rtabmap/rtabmap/scan_cloud_max_points: 32768
 * /rtabmap/rtabmap/subscribe_depth: False
 * /rtabmap/rtabmap/subscribe_rgb: False
 * /rtabmap/rtabmap/subscribe_rgbd: True
 * /rtabmap/rtabmap/subscribe_scan_cloud: True
 * /rtabmap/rtabmapviz/approx_sync: False
 * /rtabmap/rtabmapviz/frame_id: os1_sensor
 * /rtabmap/rtabmapviz/odom_frame_id: /odom
 * /rtabmap/rtabmapviz/subscribe_depth: False
 * /rtabmap/rtabmapviz/subscribe_odom_info: True
 * /rtabmap/rtabmapviz/subscribe_scan_cloud: True

NODES
  /
    img_node (ouster_ros/img_node)
    viz_node (ouster_ros/viz_node)
  /rtabmap/
    icp_odometry (rtabmap_ros/icp_odometry)
    point_cloud_assembler (nodelet/nodelet)
    rgbd_sync (nodelet/nodelet)
    rtabmap (rtabmap_ros/rtabmap)
    rtabmapviz (rtabmap_ros/rtabmapviz)

ROS_MASTER_URI=http://localhost:11311

process[viz_node-1]: started with pid [4729]
process[img_node-2]: started with pid [4730]
process[rtabmap/rgbd_sync-3]: started with pid [4731]
type is rtabmap_ros/rgbd_sync
process[rtabmap/icp_odometry-4]: started with pid [4742]
process[rtabmap/rtabmap-5]: started with pid [4756]
process[rtabmap/point_cloud_assembler-6]: started with pid [4757]
type is rtabmap_ros/point_cloud_assembler
process[rtabmap/rtabmapviz-7]: started with pid [4762]
[ INFO] [1596141701.898509015]: Starting node...
[ INFO] [1596141701.924126783]: Initializing nodelet with 8 worker threads.
[ INFO] [1596141701.935650392]: Initializing nodelet with 8 worker threads.
[ INFO] [1596141702.012608909]: Odometry: frame_id               = os1_sensor
[ INFO] [1596141702.012808542]: Odometry: odom_frame_id          = odom
[ INFO] [1596141702.012996005]: Odometry: publish_tf             = true
[ INFO] [1596141702.013175997]: Odometry: wait_for_transform     = true
[ INFO] [1596141702.013396351]: Odometry: wait_for_transform_duration  = 0.100000
[ INFO] [1596141702.013631144]: Odometry: initial_pose           = xyz=0.000000,0.000000,0.000000 rpy=0.000000,-0.000000,0.000000
[ INFO] [1596141702.013818457]: Odometry: ground_truth_frame_id  =
[ INFO] [1596141702.013993740]: Odometry: ground_truth_base_frame_id = os1_sensor
[ INFO] [1596141702.014157793]: Odometry: config_path            =
[ INFO] [1596141702.014327665]: Odometry: publish_null_when_lost = true
[ INFO] [1596141702.014496268]: Odometry: guess_frame_id         = os1_sensor
[ INFO] [1596141702.014668201]: Odometry: guess_min_translation  = 0.000000
[ INFO] [1596141702.014840803]: Odometry: guess_min_rotation     = 0.000000
[ INFO] [1596141702.015012626]: Odometry: guess_min_time         = 0.000000
[ INFO] [1596141702.015184089]: Odometry: expected_update_rate   = 0.000000 Hz
[ INFO] [1596141702.015356382]: Odometry: max_update_rate        = 0.000000 Hz
[ INFO] [1596141702.015523464]: Odometry: wait_imu_to_init       = false
[ INFO] [1596141702.015730507]: Odometry: stereoParams_=0 visParams_=0 icpParams_=1
[ INFO] [1596141702.019909193]: Setting odometry parameter "Icp/CorrespondenceRatio"="0.01"
[ INFO] [1596141702.020641315]: Setting odometry parameter "Icp/DownsamplingStep"="1"
[ INFO] [1596141702.022217339]: Setting odometry parameter "Icp/Epsilon"="0.001"
[ INFO] [1596141702.022906779]: Setting odometry parameter "Icp/Iterations"="10"
[ INFO] [1596141702.023639661]: Setting odometry parameter "Icp/MaxCorrespondenceDistance"="1"
[ INFO] [1596141702.025197234]: Setting odometry parameter "Icp/MaxTranslation"="2"
[ INFO] [1596141702.027133895]: Setting odometry parameter "Icp/PM"="true"
[ INFO] [1596141702.034421968]: Setting odometry parameter "Icp/PMOutlierRatio"="0.7"
[ INFO] [1596141702.034887635]: Setting odometry parameter "Icp/PointToPlane"="false"
[ INFO] [1596141702.035165589]: Setting odometry parameter "Icp/PointToPlaneK"="20"
[ INFO] [1596141702.036136045]: Setting odometry parameter "Icp/PointToPlaneRadius"="0"
[ INFO] [1596141702.039491337]: Setting odometry parameter "Icp/VoxelSize"="0.2"
[ INFO] [1596141702.046724949]: /rtabmap/rgbd_sync: approx_sync = false
[ INFO] [1596141702.047816707]: /rtabmap/rgbd_sync: queue_size  = 10
[ INFO] [1596141702.047987219]: /rtabmap/rgbd_sync: depth_scale = 1.000000
[ INFO] [1596141702.048061560]: /rtabmap/rgbd_sync: decimation = 1
[ INFO] [1596141702.048134882]: /rtabmap/rgbd_sync: compressed_rate = 0.000000
[ INFO] [1596141702.074724794]:
/rtabmap/rgbd_sync subscribed to (exact sync):
   /camera/color/image_raw \
   /camera/aligned_depth_to_color/image_raw \
   /camera/color/camera_info
[ INFO] [1596141702.076548443]: Setting odometry parameter "Odom/ScanKeyFrameThr"="0.9"
[ INFO] [1596141702.076963700]: Setting odometry parameter "Odom/Strategy"="1"
[ INFO] [1596141702.081271677]: Setting odometry parameter "OdomF2M/ScanMaxSize"="15000"
[ INFO] [1596141702.083946728]: Setting odometry parameter "OdomF2M/ScanSubtractRadius"="0.2"
[ INFO] [1596141702.130028755]: /rtabmap/rtabmap(maps): map_filter_radius          = 0.000000
[ INFO] [1596141702.130139177]: /rtabmap/rtabmap(maps): map_filter_angle           = 30.000000
[ INFO] [1596141702.130166147]: /rtabmap/rtabmap(maps): map_cleanup                = true
[ INFO] [1596141702.130189718]: /rtabmap/rtabmap(maps): map_always_update          = false
[ INFO] [1596141702.130208338]: /rtabmap/rtabmap(maps): map_empty_ray_tracing      = true
[ INFO] [1596141702.130227778]: /rtabmap/rtabmap(maps): cloud_output_voxelized     = true
[ INFO] [1596141702.130245269]: /rtabmap/rtabmap(maps): cloud_subtract_filtering   = false
[ INFO] [1596141702.130267179]: /rtabmap/rtabmap(maps): cloud_subtract_filtering_min_neighbors = 2
[ INFO] [1596141702.137113485]: /rtabmap/rtabmap(maps): octomap_tree_depth         = 16
[ INFO] [1596141702.166833388]: rtabmap: frame_id      = os1_sensor
[ INFO] [1596141702.166879559]: rtabmap: map_frame_id  = map
[ INFO] [1596141702.166894129]: rtabmap: use_action_for_goal  = false
[ INFO] [1596141702.166910609]: rtabmap: tf_delay      = 0.050000
[ INFO] [1596141702.166927739]: rtabmap: tf_tolerance  = 0.100000
[ INFO] [1596141702.166941179]: rtabmap: odom_sensor_sync   = false
[ INFO] [1596141702.207686133]: Starting node...
[ INFO] [1596141702.224891521]: /rtabmap/point_cloud_assembler: queue_size=5
[ INFO] [1596141702.227779225]: /rtabmap/point_cloud_assembler: fixed_frame_id=fusion
[ INFO] [1596141702.227826406]: /rtabmap/point_cloud_assembler: max_clouds=10
[ INFO] [1596141702.227905237]: /rtabmap/point_cloud_assembler: assembling_time=0.000000s
[ INFO] [1596141702.227954888]: /rtabmap/point_cloud_assembler: skip_clouds=0
[ INFO] [1596141702.227989268]: /rtabmap/point_cloud_assembler: circular_buffer=false
[ INFO] [1596141702.228019339]: /rtabmap/point_cloud_assembler: wait_for_transform_duration=0.100000
[ INFO] [1596141702.228041969]: /rtabmap/point_cloud_assembler: range_min=0.000000
[ INFO] [1596141702.228063229]: /rtabmap/point_cloud_assembler: range_max=0.000000
[ INFO] [1596141702.228080790]: /rtabmap/point_cloud_assembler: voxel_size=0.000000m
[ INFO] [1596141702.228100800]: /rtabmap/point_cloud_assembler: noise_radius=0.000000m
[ INFO] [1596141702.228121360]: /rtabmap/point_cloud_assembler: noise_min_neighbors=5
[ INFO] [1596141702.239026901]:
/rtabmap/point_cloud_assembler subscribed to /os1_cloud_node/points
[ INFO] [1596141702.274003374]: Setting odometry parameter "Reg/Strategy"="1"
[ INFO] [1596141702.314276180]: Setting RTAB-Map parameter "Grid/CellSize"="0.1"
[ INFO] [1596141702.315809785]: Setting RTAB-Map parameter "Grid/ClusterRadius"="1"
[ INFO] [1596141702.326604132]: Setting RTAB-Map parameter "Grid/FromDepth"="true"
[ INFO] [1596141702.326971648]: Setting RTAB-Map parameter "Grid/GroundIsObstacle"="true"
[ INFO] [1596141702.350730948]: Setting RTAB-Map parameter "Grid/RangeMax"="20"
[ WARN] [1596141702.367630520]: IcpOdometry: Transferring value 0.2 of "Icp/VoxelSize" to ros parameter "scan_voxel_size" for convenience. "Icp/VoxelSize" is set to 0.
[ WARN] [1596141702.368157419]: IcpOdometry: Transferring value 20 of "Icp/PointToPlaneK" to ros parameter "scan_normal_k" for convenience.
[ INFO] [1596141702.375205118]: rtabmapviz: Using configuration from "/home/dan/.ros/rtabmapGUI.ini"
[ INFO] [1596141702.387573611]: Setting RTAB-Map parameter "Icp/CorrespondenceRatio"="0.4"
[ INFO] [1596141702.389187566]: IcpOdometry: scan_cloud_max_points  = 0
[ INFO] [1596141702.389281637]: IcpOdometry: scan_downsampling_step = 1
[ INFO] [1596141702.389318148]: IcpOdometry: scan_range_min         = 0.000000 m
[ INFO] [1596141702.389340318]: IcpOdometry: scan_range_max         = 0.000000 m
[ INFO] [1596141702.389361889]: IcpOdometry: scan_voxel_size        = 0.200000 m
[ INFO] [1596141702.389384459]: IcpOdometry: scan_normal_k          = 20
[ INFO] [1596141702.389413489]: IcpOdometry: scan_normal_radius     = 0.000000 m
[ INFO] [1596141702.390735540]: Setting RTAB-Map parameter "Icp/Epsilon"="0.001"
[ INFO] [1596141702.391266238]: Setting RTAB-Map parameter "Icp/Iterations"="10"
[ INFO] [1596141702.391892407]: Setting RTAB-Map parameter "Icp/MaxCorrespondenceDistance"="1"
[ INFO] [1596141702.396128143]: Setting RTAB-Map parameter "Icp/MaxTranslation"="3"
[ INFO] [1596141702.396917206]: Setting RTAB-Map parameter "Icp/PM"="true"
[ INFO] [1596141702.404238169]: Setting RTAB-Map parameter "Icp/PMOutlierRatio"="0.7"
[ INFO] [1596141702.404603765]: Setting RTAB-Map parameter "Icp/PointToPlane"="false"
[ INFO] [1596141702.404968631]: Setting RTAB-Map parameter "Icp/PointToPlaneK"="20"
[ INFO] [1596141702.406891941]: Setting RTAB-Map parameter "Icp/PointToPlaneRadius"="0"
[ INFO] [1596141702.410636290]: Setting RTAB-Map parameter "Icp/VoxelSize"="0.2"
[ INFO] [1596141702.424725698]: Setting RTAB-Map parameter "Kp/DetectorStrategy"="6"
[ INFO] [1596141702.436802886]: Setting RTAB-Map parameter "Kp/MaxFeatures"="400"
[ INFO] [1596141702.469073998]: Setting RTAB-Map parameter "Mem/NotLinkedNodesKept"="false"
[ INFO] [1596141702.472767476]: Setting RTAB-Map parameter "Mem/RehearsalSimilarity"="0.45"
[ INFO] [1596141702.475349536]: Setting RTAB-Map parameter "Mem/STMSize"="30"
[ INFO] [1596141702.498611847]: Setting RTAB-Map parameter "Optimizer/Strategy"="0"
[ INFO] [1596141702.507270342]: Setting RTAB-Map parameter "RGBD/AngularUpdate"="0.01"
[ INFO] [1596141702.514406833]: Setting RTAB-Map parameter "RGBD/LinearUpdate"="0.01"
[ INFO] [1596141702.522930796]: Setting RTAB-Map parameter "RGBD/NeighborLinkRefining"="true"
[ INFO] [1596141702.523924552]: Setting RTAB-Map parameter "RGBD/OptimizeFromGraphEnd"="false"
[ INFO] [1596141702.524254737]: Setting RTAB-Map parameter "RGBD/OptimizeMaxError"="0"
[ INFO] [1596141702.528568183]: Setting RTAB-Map parameter "RGBD/ProximityBySpace"="true"
[ INFO] [1596141702.540488269]: Setting RTAB-Map parameter "RGBD/ProximityPathMaxNeighbors"="1"
[ INFO] [1596141702.543047129]: Setting RTAB-Map parameter "Reg/Force3DoF"="true"
[ INFO] [1596141702.544233437]: Setting RTAB-Map parameter "Reg/Strategy"="1"
[ INFO] [1596141702.546411001]: Setting RTAB-Map parameter "Rtabmap/DetectionRate"="1"
[ INFO] [1596141702.562094355]: Setting RTAB-Map parameter "Rtabmap/TimeThr"="0"
[ INFO] [1596141702.623072413]: Setting RTAB-Map parameter "Vis/FeatureType"="6"
[ INFO] [1596141702.631075218]: Setting RTAB-Map parameter "Vis/MinInliers"="15"
[ WARN] [1596141702.644026849]: IcpOdometry: "scan_cloud_max_points" is not set but input cloud is not dense, for convenience it will be set to 65536 (1024x64)
[ INFO] [1596141702.652671493]: Odom: ratio=0.000000, std dev=99.995000m|99.995000rad, update time=0.000621s
[ INFO] [1596141702.749566871]: Odom: ratio=0.989523, std dev=0.005452m|0.005452rad, update time=0.002618s
[ INFO] [1596141702.775479703]: RTAB-Map detection rate = 1.000000 Hz
[ INFO] [1596141702.775685847]: rtabmap: Deleted database "/home/dan/.ros/rtabmap.db" (--delete_db_on_start or -d are set).
[ INFO] [1596141702.775724547]: rtabmap: Using database from "/home/dan/.ros/rtabmap.db" (0 MB).
[ WARN] (2020-07-30 21:41:42.777) Features2d.cpp:529::create() BRIEF and FREAK features cannot be used because OpenCV was not built with xfeatures2d module. GFTT/ORB is used instead.
[ WARN] (2020-07-30 21:41:42.779) Features2d.cpp:529::create() BRIEF and FREAK features cannot be used because OpenCV was not built with xfeatures2d module. GFTT/ORB is used instead.
[ WARN] (2020-07-30 21:41:42.780) Features2d.cpp:529::create() BRIEF and FREAK features cannot be used because OpenCV was not built with xfeatures2d module. GFTT/ORB is used instead.
[ INFO] [1596141702.847774868]: Odom: ratio=0.989523, std dev=0.005493m|0.005493rad, update time=0.003712s
[ WARN] (2020-07-30 21:41:42.919) Features2d.cpp:529::create() BRIEF and FREAK features cannot be used because OpenCV was not built with xfeatures2d module. GFTT/ORB is used instead.
[ INFO] [1596141702.921193799]: rtabmap: Database version = "0.20.2".
[ INFO] [1596141702.950633548]: Odom: ratio=0.974771, std dev=0.005258m|0.005258rad, update time=0.003267s
[ INFO] [1596141702.965490319]: /rtabmap/rtabmap: subscribe_depth = false
[ INFO] [1596141702.965544409]: /rtabmap/rtabmap: subscribe_rgb = false
[ INFO] [1596141702.965579640]: /rtabmap/rtabmap: subscribe_stereo = false
[ INFO] [1596141702.965616211]: /rtabmap/rtabmap: subscribe_rgbd = true (rgbd_cameras=1)
[ INFO] [1596141702.965650431]: /rtabmap/rtabmap: subscribe_odom_info = false
[ INFO] [1596141702.965687732]: /rtabmap/rtabmap: subscribe_user_data = false
[ INFO] [1596141702.965747773]: /rtabmap/rtabmap: subscribe_scan = false
[ INFO] [1596141702.965807484]: /rtabmap/rtabmap: subscribe_scan_cloud = true
[ INFO] [1596141702.965857074]: /rtabmap/rtabmap: subscribe_scan_descriptor = false
[ INFO] [1596141702.965890765]: /rtabmap/rtabmap: queue_size    = 10
[ INFO] [1596141702.965925205]: /rtabmap/rtabmap: approx_sync   = false
[ INFO] [1596141702.966029477]: Setup rgbd callback
[ INFO] [1596141702.979001678]:
/rtabmap/rtabmap subscribed to (exact sync):
   /odom \
   /rtabmap/rgbd_image \
   /os1_cloud_node/points
[ INFO] [1596141703.042605498]: Odom: ratio=0.978136, std dev=0.005328m|0.005328rad, update time=0.003220s
[ INFO] [1596141703.121004897]: rtabmap 0.20.2 started...
[ INFO] [1596141703.140408469]: Odom: ratio=0.986079, std dev=0.005436m|0.005436rad, update time=0.002513s
[ INFO] [1596141703.242219482]: Odom: ratio=0.989523, std dev=0.005577m|0.005577rad, update time=0.002950s
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
[ INFO] [1596141703.343006200]: Odom: ratio=0.989523, std dev=0.005420m|0.005420rad, update time=0.003487s
[ INFO] [1596141703.443102117]: Odom: ratio=0.975890, std dev=0.005285m|0.005285rad, update time=0.002849s

[ INFO] [1596141751.943481066]: Odom: ratio=0.992991, std dev=0.005504m|0.005504rad, update time=0.003458s
[ INFO] [1596141752.044525841]: Odom: ratio=0.981524, std dev=0.005684m|0.005684rad, update time=0.002612s
[ WARN] [1596141752.076596250]: /rtabmap/rgbd_sync: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set. Parameter "approx_sync" is false, which means that input topics should have all the exact timestamp for the callback to be called.
/rtabmap/rgbd_sync subscribed to (exact sync):
   /camera/color/image_raw \
   /camera/aligned_depth_to_color/image_raw \
   /camera/color/camera_info
[ INFO] [1596141752.145761628]: Odom: ratio=0.978136, std dev=0.005631m|0.005631rad, update time=0.002639s
[ INFO] [1596141752.248610600]: Odom: ratio=0.973654, std dev=0.005905m|0.005905rad, update time=0.003404s


[ INFO] [1596141752.748355725]: Odom: ratio=0.977012, std dev=0.005749m|0.005749rad, update time=0.003592s
[ INFO] [1596141752.846884240]: Odom: ratio=0.977012, std dev=0.005629m|0.005629rad, update time=0.004886s
[ INFO] [1596141752.947600080]: Odom: ratio=0.984936, std dev=0.005824m|0.005824rad, update time=0.003363s
^C[ WARN] [1596141752.981292364]: /rtabmap/rtabmap: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set. If topics are coming from different computers, make sure the clocks of the computers are synchronized ("ntpdate"). Parameter "approx_sync" is false, which means that input topics should have all the exact timestamp for the callback to be called.
/rtabmap/rtabmap subscribed to (exact sync):
   /odom \
   /rtabmap/rgbd_image \
   /os1_cloud_node/points
[rtabmap/rtabmapviz-7] killing on exit
Reply | Threaded
Open this post in threaded view
|

Re: Problems with launch and mapping

matlabbe
Administrator
Hi,

For the ouster alone, did you see those launch files (depending which ouster gen you have):
https://github.com/introlab/rtabmap_ros/blob/master/launch/tests/test_ouster.launch
https://github.com/introlab/rtabmap_ros/blob/master/launch/tests/test_ouster_gen2.launch
As stated in the header of the launch files, make sure rtabmap is built with libpointmatcher support.

For the synchronization warning:
/rtabmap/rtabmap subscribed to (exact sync):
   /odom \
   /rtabmap/rgbd_image \
   /os1_cloud_node/points

It is likely that /rtabmap/rgbd_image won;t never have the same stamp than /os1_cloud_node/points (from two different sensors). "approx_sync" should be set to true for rtabmap node.

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

Re: Problems with launch and mapping

denzle
Hi Mathieu,

Thanks for your reply. I did use the test.launches as a basis but they don't seem to work for even after much adapting. The lidar unit just keeps spinning up and cutting out along with rtab crashing or just not working.

I did build with libpointmatcher, I'm not sure if theres anything else i need to do but the cmake file says it's been found.

Here's the slightly modified output from using the test_ouster.launch for example:


 [ WARN] [1596640722.998545181]: /rtabmap/rtabmapviz: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set. If topics are coming from different computers, make sure the clocks of the computers are synchronized ("ntpdate"). If topics are not published at the same rate, you could increase "queue_size" parameter (current=10).
/rtabmap/rtabmapviz subscribed to (approx sync):
   /os1_cloud_node/points \
   /rtabmap/odom_info
[ WARN] [1596640723.044086099]: odometry: Could not get transform from os1_sensor_stabilized to os1_sensor (stamp=10331.743773) after 0.100000 seconds ("wait_for_transform_duration"=0.100000)! Error="canTransform: target_frame os1_sensor_stabilized does not exist.. canTransform returned after 0.101004 timeout was 0.1."
[ERROR] [1596640723.044177295]: "guess_from_tf" is true, but guess cannot be computed between frames "os1_sensor_stabilized" -> "os1_sensor". Aborting odometry update...
[ WARN] [1596640723.157366956]: odometry: Could not get transform from os1_sensor_stabilized to os1_sensor (stamp=10331.843684) after 0.100000 seconds ("wait_for_transform_duration"=0.100000)! Error="canTransform: target_frame os1_sensor_stabilized does not exist.. canTransform returned after 0.100756 timeout was 0.1."
[ERROR] [1596640723.157455852]: "guess_from_tf" is true, but guess cannot be computed between frames "os1_sensor_stabilized" -> "os1_sensor". Aborting odometry update...
[ WARN] [1596640723.269733145]: odometry: Could not get transform from os1_sensor_stabilized to os1_sensor (stamp=10331.943613) after 0.100000 seconds ("wait_for_transform_duration"=0.100000)! Error="canTransform: target_frame os1_sensor_stabilized does not exist.. canTransform returned after 0.100826 timeout was 0.1."
 


Thanks
Dan
Reply | Threaded
Open this post in threaded view
|

Re: Problems with launch and mapping

denzle
This post was updated on .
So i appear to have made some progress. Although the odom is out and quite messy.

I made some changes to cpp files in the ouster folder particularly the timing. And use of tf2_ros allowed proper correction.

I'm hoping you may be able to direct me where i'm going wrong

- The use of rviz to view the cloud built in rtabmapviz

- I'm going to read through any other problems with odom within the forum but any advice would be most welcome

- Have i got the imu and lidar correct or should they be directly connected to base_link rather than os1_sensor?

- opencv appears to be missing although reading 'https://github.com/introlab/rtabmap_ros/issues/422' i assume i should follow the information in that thread. Is it even worth adding opencv from source?

- Would the use of a realsense t265 increase odometry or should i be looking at other means ie Hz increase or soem missing node?

Some info from my current setup. My launch file does need cleaning up but for now it's working also the realsense needs to be added once i have the lidar working properly.

Thanks in advance
Dan

 <?xml version="1.0"?>
<!--
Copyright (c) 2018, STEREOLABS.

All rights reserved.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->

<launch>

  <arg name="frame_id"                default="base_link"/>     
  <arg name="odom_frame_id"           default="/odom"/>               
  <arg name="map_frame_id"            default="map"/>
  <arg name="rtabmapviz"              default="true" /> 
  <arg name="rviz"                    default="true" />
  <arg name="image"                   default="true" /> 
  <arg name="scan_20_hz"              default="true"/> <!-- If we launch the velodyne with "rpm:=1200" argument -->
    
  <arg name="namespace"               default="rtabmap"/>

  <arg name="rgb_topic"         default="/camera/color/image_raw"/>
  <arg name="depth_topic"       default="/camera/aligned_depth_to_color/image_raw"/>
  <arg name="camera_info_topic" default="/camera/color/camera_info"/>
    
  <arg name="gui_cfg"                 default="~/.ros/rtabmap_gui.ini" />
  <arg name="rviz_cfg"                default="$(find rtabmap_ros)/launch/config/rgbd.rviz" /> 
  <arg name="output"                  default="screen"/> 

  <arg name="depth_camera_info_topic" default="$(arg camera_info_topic)" />
 
  <arg name="rgbd_sync"               default="true"/>         
  <arg name="approx_rgbd_sync"        default="true"/>         
  <arg name="subscribe_rgbd"          default="$(arg rgbd_sync)"/>
  <arg name="rgbd_topic"              default="rgbd_image" />
  <arg name="depth_scale"             default="1.0" />
  <arg name="approx_sync"             default="true"/>

  <arg name="subscribe_scan"          default="false"/>
  <arg name="scan_topic"              default="/scan"/>
  <arg name="subscribe_scan_cloud"    default="true"/>
  <arg name="scan_cloud_topic"        default="/os1_cloud_node/points"/>
  <arg name="scan_cloud_max_points"   default="0"/>
  <arg name="scan_cloud_filtered"     default="false"/> 
  <arg name="visual_odometry"          default="true"/>         
  <arg name="icp_odometry"             default="true"/> 
  <arg name="args"                    default=""/>             
  <arg name="rtabmap_args"            default="$(arg args)"/>   
  <arg name="launch_prefix"           default=""/>     

        
  <arg name="odom_topic"               default="/odom"/>         
  <arg name="vo_frame_id"              default="$(arg odom_topic)"/> 
  <arg name="publish_tf_odom"          default="true"/>
  <arg name="odom_tf_angular_variance" default="1"/>             
  <arg name="odom_tf_linear_variance"  default="1"/>             
  <arg name="odom_args"                default=""/>             
  <arg name="odom_sensor_sync"         default="false"/>
  <arg name="odom_guess_frame_id"        default=""/>
  <arg name="odom_guess_min_translation" default="0"/>
  <arg name="odom_guess_min_rotation"    default="0"/> 
  <arg name="imu_topic"                default="/os1_cloud_node/imu/data"/>         
  <arg name="wait_imu_to_init"         default="true"/>        
       
  <arg name="publish_tf_map"          default="true"/>

  <arg name="stereo_namespace"        default="/stereo_camera"/>
  <arg name="left_image_topic"        default="$(arg stereo_namespace)/left/image_rect_color" />
  <arg name="right_image_topic"       default="$(arg stereo_namespace)/right/image_rect" />     
  <arg name="left_camera_info_topic"  default="$(arg stereo_namespace)/left/camera_info" />
  <arg name="right_camera_info_topic" default="$(arg stereo_namespace)/right/camera_info" />

  <arg name="stereo"                    default="false"/>
  <arg     if="$(arg stereo)" name="depth"  default="false"/>
  <arg unless="$(arg stereo)" name="depth"  default="true"/>

  <arg name="compressed"              default="false"/>         
  <arg name="rgb_image_transport"     default="compressed"/>   
  <arg name="depth_image_transport"   default="compressedDepth"/>
   
  <arg if="$(arg compressed)"     name="rgb_topic_relay"           default="$(arg rgb_topic)_relay"/>
  <arg unless="$(arg compressed)" name="rgb_topic_relay"           default="$(arg rgb_topic)"/>
  <arg if="$(arg compressed)"     name="depth_topic_relay"         default="$(arg depth_topic)_relay"/>
  <arg unless="$(arg compressed)" name="depth_topic_relay"         default="$(arg depth_topic)"/>
  <arg if="$(arg compressed)"     name="left_image_topic_relay"    default="$(arg left_image_topic)_relay"/>
  <arg unless="$(arg compressed)" name="left_image_topic_relay"    default="$(arg left_image_topic)"/>
  <arg if="$(arg compressed)"     name="right_image_topic_relay"   default="$(arg right_image_topic)_relay"/>
  <arg unless="$(arg compressed)" name="right_image_topic_relay"   default="$(arg right_image_topic)"/>
  <arg if="$(arg rgbd_sync)"      name="rgbd_topic_relay"          default="$(arg rgbd_topic)"/>
  <arg unless="$(arg rgbd_sync)"  name="rgbd_topic_relay"          default="$(arg rgbd_topic)_relay"/>

<group ns="$(arg namespace)">
   
    <group if="$(arg depth)">
      <group unless="$(arg subscribe_rgbd)">
        <node if="$(arg compressed)" name="republish_rgb" type="republish" pkg="image_transport" args="$(arg rgb_image_transport) in:=$(arg rgb_topic) raw out:=$(arg rgb_topic_relay)" />
        <node if="$(arg compressed)" name="republish_depth" type="republish" pkg="image_transport" args="$(arg depth_image_transport) in:=$(arg depth_topic) raw out:=$(arg depth_topic_relay)" />
      </group>
      <group if="$(arg rgbd_sync)">
        <node if="$(arg compressed)" name="republish_rgb" type="republish" pkg="image_transport" args="$(arg rgb_image_transport) in:=$(arg rgb_topic) raw out:=$(arg rgb_topic_relay)" />
        <node if="$(arg compressed)" name="republish_depth" type="republish" pkg="image_transport" args="$(arg depth_image_transport) in:=$(arg depth_topic) raw out:=$(arg depth_topic_relay)" />
        <node pkg="nodelet" type="nodelet" name="rgbd_sync" args="standalone rtabmap_ros/rgbd_sync" output="$(arg output)">
          <remap from="rgb/image"       to="$(arg rgb_topic_relay)"/>
          <remap from="depth/image"     to="$(arg depth_topic_relay)"/>
          <remap from="rgb/camera_info" to="$(arg camera_info_topic)"/>
          <remap from="rgbd_image"      to="$(arg rgbd_topic_relay)"/>       
        </node>
      </group>
    </group>

    <group if="$(arg stereo)">
      <group unless="$(arg subscribe_rgbd)">
        <node if="$(arg compressed)" name="republish_left"  type="republish" pkg="image_transport" args="$(arg rgb_image_transport) in:=$(arg left_image_topic) raw out:=$(arg left_image_topic_relay)" />
        <node if="$(arg compressed)" name="republish_right" type="republish" pkg="image_transport" args="$(arg rgb_image_transport) in:=$(arg right_image_topic) raw out:=$(arg right_image_topic_relay)" />
      </group>
      <group if="$(arg rgbd_sync)">
        <node if="$(arg compressed)" name="republish_left"  type="republish" pkg="image_transport" args="$(arg rgb_image_transport) in:=$(arg left_image_topic) raw out:=$(arg left_image_topic_relay)" />
        <node if="$(arg compressed)" name="republish_right" type="republish" pkg="image_transport" args="$(arg rgb_image_transport) in:=$(arg right_image_topic) raw out:=$(arg right_image_topic_relay)" />
        <node pkg="nodelet" type="nodelet" name="rgbd_sync" args="standalone rtabmap_ros/stereo_sync" output="$(arg output)">
          <remap from="left/image_rect"   to="$(arg left_image_topic_relay)"/>
          <remap from="right/image_rect"  to="$(arg right_image_topic_relay)"/>
          <remap from="left/camera_info"  to="$(arg left_camera_info_topic)"/>
          <remap from="right/camera_info" to="$(arg right_camera_info_topic)"/>
          <remap from="rgbd_image"      to="$(arg rgbd_topic_relay)"/>
        </node>
      </group>
    </group>
   
    <group unless="$(arg rgbd_sync)">
       <group if="$(arg subscribe_rgbd)">
         <node name="republish_rgbd_image"  type="rgbd_relay" pkg="rtabmap_ros">
           <remap     if="$(arg compressed)" from="rgbd_image" to="$(arg rgbd_topic)/compressed"/>
           <remap     if="$(arg compressed)" from="$(arg rgbd_topic)/compressed_relay" to="$(arg rgbd_topic_relay)"/>
           <remap unless="$(arg compressed)" from="rgbd_image" to="$(arg rgbd_topic)"/>
         </node>
      </group>
    </group>

    <node if="$(arg rviz)" pkg="ouster_ros" name="viz_node" type="viz_node" output="screen" required="true">
        <remap from="~/os1_config" to="/os1_node/os1_config"/>
    	<remap from="~/points" to="/os1_cloud_node/points"/>
    </node>

    <node if="$(arg image)" pkg="ouster_ros" name="img_node" type="img_node" output="screen" required="true">
    	<remap from="~/os1_config" to="/os1_node/os1_config"/>
    	<remap from="~/points" to="/os1_cloud_node/points"/>
    </node>

<!-- IMU orientation estimation and publish tf accordingly to os1_sensor frame -->
    <node pkg="nodelet" type="nodelet" name="imu_nodelet_manager" args="manager">
      <remap from="imu" to="/os1_cloud_node/imu"/>
    </node>

    <node pkg="nodelet" type="nodelet" name="imu_filter" args="load imu_filter_madgwick/ImuFilterNodelet imu_nodelet_manager">
      <param name="use_mag" value="true"/>
      <param name="world_frame" value="enu"/>
      <param name="publish_tf" value="false"/>
    </node> 

    <node pkg="imu_filter_madgwick" type="imu_filter_node" name="imu_filter_node">
      <param name="use_mag"       value="true"/>
      <param name="publish_tf"    value="false"/>
      <param name="world_frame"   value="enu"/>
      <remap from="/imu/data_raw" to="/os1_cloud_node/imu/data_raw"/>
      <remap from="/imu/data"     to="/os1_cloud_node/imu/data"/>
    </node>
    
    <node pkg="nodelet" type="nodelet" name="imu_to_tf" args="load rtabmap_ros/imu_to_tf imu_nodelet_manager">
      <remap from="imu/data" to="/os1_cloud_node/imu/data"/>
      <param name="fixed_frame_id" value="$(arg frame_id)_stabilized"/>
      <param name="base_frame_id" value="$(arg frame_id)"/>
    </node> 

  <group ns="rtabmap">

     <node pkg="nodelet" type="nodelet" name="rgbd_sync" args="standalone rtabmap_ros/rgbd_sync" output="screen">
          <remap from="rgb/image"       to="$(arg rgb_topic)"/>
          <remap from="depth/image"     to="$(arg depth_topic)"/>
          <remap from="rgb/camera_info" to="$(arg camera_info_topic)"/>
          <remap from="rgbd_image"      to="rgbd_image"/> <!-- output -->
          <param name="approx_sync"     type="bool"   value="true"/> <!-- false for realsense -->
     </node>

       <node if="$(arg icp_odometry)" pkg="rtabmap_ros" type="icp_odometry" name="icp_odometry" output="$(arg output)" args="$(arg rtabmap_args) $(arg odom_args)" launch-prefix="$(arg launch_prefix)">
      <remap from="scan"                   to="$(arg scan_topic)"/>
      <remap from="scan_cloud"             to="$(arg scan_cloud_topic)"/>
      <remap from="odom"                   to="$(arg odom_topic)"/>
      <remap from="imu"                    to="$(arg imu_topic)"/>
   

        <remap from="imu" to="/os1_cloud_node/imu/data"/> 
        <param name="guess_frame_id"   type="string" value="$(arg frame_id)"/>
        <param name="wait_imu_to_init" type="bool" value="false"/>
        <param name="Reg/Strategy"     type="string" value="1"/>

        <!-- ICP parameters -->
        <param name="Icp/PointToPlane"        type="string" value="false"/>
        <param name="Icp/Iterations"          type="string" value="10"/>
        <param name="Icp/VoxelSize"           type="string" value="0.2"/>
        <param name="Icp/DownsamplingStep"    type="string" value="1"/> <!-- cannot be increased with ring-like lidar -->
        <param name="Icp/Epsilon"             type="string" value="0.001"/>
        <param name="Icp/PointToPlaneK"       type="string" value="20"/>
        <param name="Icp/PointToPlaneRadius"  type="string" value="0"/>
        <param name="Icp/MaxTranslation"      type="string" value="2"/>
        <param name="Icp/MaxCorrespondenceDistance" type="string" value="1"/>
        <param name="Icp/PM"                  type="string" value="true"/>
        <param name="Icp/PMOutlierRatio"      type="string" value="0.7"/>
        <param name="Icp/CorrespondenceRatio" type="string" value="0.01"/>

        <!-- Odom parameters -->
        <param name="Odom/ScanKeyFrameThr"       type="string" value="0.9"/>
        <param name="Odom/Strategy"              type="string" value="1"/>
        <param name="OdomF2M/ScanSubtractRadius" type="string" value="0.2"/>
        <param name="OdomF2M/ScanMaxSize"        type="string" value="15000"/>
      </node>

      <node pkg="rtabmap_ros" type="rtabmap" name="rtabmap" output="screen" args="-d">
        <param name="subscribe_rgbd"       type="bool" value="false"/>
        <param name="frame_id"             type="string" value="$(arg frame_id)"/>
        <param name="subscribe_depth"      type="bool" value="false"/>
        <param name="subscribe_rgb"        type="bool" value="false"/>
        <param name="subscribe_scan_cloud" type="bool" value="true"/>
        <param name="approx_sync"          type="bool" value="true"/>

        <param name="queue_size" type="int" value="10"/>
        <param name="scan_cloud_max_points" value="32768"/> <!-- based on os-1 spec: 327,680 pts/second for 10 Hz -->
        
        <remap from="odom" to="/odom"/>
      	<remap from="scan_cloud" to="/os1_cloud_node/points"/>
        <remap from="rgbd_image" to="rgbd_image"/>

        <!-- RTAB-Map's parameters -->
        <param name="RGBD/NeighborLinkRefining" type="string" value="true"/>
      	<param name="RGBD/ProximityBySpace" 	type="string" value="true"/>
      	<param name="RGBD/AngularUpdate"    	type="string" value="0.01"/>
      	<param name="RGBD/LinearUpdate"     	type="string" value="0.01"/>
      	<param name="RGBD/OptimizeFromGraphEnd" type="string" value="false"/>
      	<param name="Reg/Strategy"          	type="string" value="1"/> <!-- 1=ICP -->
      	<param name="Reg/Force3DoF"         	type="string" value="true"/>
      	<param name="Vis/MinInliers"        	type="string" value="15"/>
      	<param name="Rtabmap/TimeThr"       	type="string" value="0"/> <!-- set to 0 to disable memory management -->
      	<param name="Mem/RehearsalSimilarity"   type="string" value="0.45"/>
      	<param name="Grid/CellSize" type="string" value="0.05"/> <!-- 5cm voxel default-->
      	<param name="Kp/MaxFeatures" type="string" value="400"/>
        <param name="Optimizer/Strategy" type="string" value="1"/> <!-- 0 is TORO, Default G20-->
        <param name="RGBD/OptimizeMaxError" type="string" value="1"/> <!--When using TORO, seto to 0,otherwise set to 1-->
        <param name="Kp/DetectorStrategy" type="string" value="6"/> <!--0=SURF 1=SIFT 2=ORB 3=FAST/FREAK 4=FAST/BRIEF 5=GFTT/FREAK 6=GFTT/BRIEF(default) 7=BRISK 8=GFTT/ORB 9=KAZE-->
        <param name="Grid/FromDepth" type="string" value="true"/> <!--suppress warning (subscribe_scan=true)-->
        <param name="RGBD/ProximityPathMaxNeighbors" type="string" value="1"/> <!--suppress warning (subscribe_scan = true and Reg/Strategy=1-->
        <param name="Vis/FeatureType" type="string" value="6"/> <!--suppress warning,want to be same as KP/detectorstrategy -->
        <!-- param name="Mem/LaserScanVoxelSize"     type="string" value="0.1"/ -->
        <!-- param name="Mem/LaserScanNormalK"       type="string" value="10"/ -->
        <!-- param name="Mem/LaserScanRadius"        type="string" value="0"/ -->

        <param name="Reg/Strategy"                   type="string" value="1"/>
        <param name="Grid/CellSize"                  type="string" value="0.1"/>
        <param name="Grid/RangeMax"                  type="string" value="20"/>
        <param name="Grid/ClusterRadius"             type="string" value="1"/>
        <param name="Grid/GroundIsObstacle"          type="string" value="true"/>
        <param name="Grid/FromDepth"                 type="string" value="true"/>

        <!-- ICP parameters -->
        <param name="Icp/VoxelSize"                  type="string" value="0.2"/>
        <param name="Icp/PointToPlaneK"              type="string" value="20"/>
        <param name="Icp/PointToPlaneRadius"         type="string" value="0"/>
        <param name="Icp/PointToPlane"               type="string" value="false"/>
        <param name="Icp/Iterations"                 type="string" value="10"/>
        <param name="Icp/Epsilon"                    type="string" value="0.001"/>
        <param name="Icp/MaxTranslation"             type="string" value="3"/>
        <param name="Icp/MaxCorrespondenceDistance"  type="string" value="1"/>
        <param name="Icp/PM"                         type="string" value="true"/>
        <param name="Icp/PMOutlierRatio"             type="string" value="0.7"/>
        <param name="Icp/CorrespondenceRatio"        type="string" value="0.4"/>
      </node>

      <node pkg="nodelet" type="nodelet" name="point_cloud_assembler" args="standalone rtabmap_ros/point_cloud_assembler" output="screen">
        <param     if="$(arg scan_20_hz)" name="max_clouds"      type="int"    value="20" />
        <param unless="$(arg scan_20_hz)" name="max_clouds"      type="int"    value="10" />
        <param name="fixed_frame_id"  type="string" value="base_link" />
        <remap from="cloud"           to="/os1_cloud_node/points"/>
        <remap from="odom"            to="/odom"/>
      </node>
         
      <node if="$(arg rtabmapviz)" name="rtabmapviz" pkg="rtabmap_ros" type="rtabmapviz" output="screen">
        <param name="frame_id" type="string" value="$(arg frame_id)"/>
        <param name="odom_frame_id" type="string" value="/odom"/>
        <param name="subscribe_odom_info" type="bool" value="true"/>
        <param name="subscribe_scan_cloud" type="bool" value="true"/>
        <param name="approx_sync" type="bool" value="true"/>
        <remap from="scan_cloud" to="/os1_cloud_node/points"/>
        <remap from="odom"        to="odom"/>
        <param name="subscribe_depth" value="false"/>
      </node>
  </group>



<node pkg="rtabmap_ros" type="icp_odometry" name="icp_odometry" />
  

<node if="$(arg rviz)" pkg="rviz" type="rviz" name="rviz" args="-d $(arg rviz_cfg)"/>



<node pkg="tf2_ros" type="static_transform_publisher" name="map_to_odom" args="0 0 0 0 0 0 1 map odom" />
<node pkg="tf2_ros" type="static_transform_publisher" name="odom_to_base_link" args="0 0 0 0 0 0 1 odom base_link" />
<node pkg="tf2_ros" type="static_transform_publisher" name="base_link_to_os1_sensor" args="0 0 0 0 0 0 1 base_link os1_sensor" />
<node pkg="tf2_ros" type="static_transform_publisher" name="os1_sensor_to_os1_lidar" args="0 0 0 0 0 0 1 os1_sensor os1_lidar" />
<node pkg="tf2_ros" type="static_transform_publisher" name="os1_sensor_to_os1_imu" args="0 0 0 0 0 0 1 os1_sensor os1_imu" />	

    
 </group>
</launch> 

 [ INFO] [1596744081.894361327]: rtabmap (1177): Rate=1.00s, Limit=0.000s, RTAB-Map=0.0545s, Maps update=0.0026s pub=0.0000s (local map=88, WM=88)
[ INFO] [1596744081.933717591]: Odom: ratio=0.998808, std dev=0.009545m|0.009545rad, update time=0.003495s
[ WARN] (2020-08-06 21:01:21.942) util3d.cpp:486::cloudFromDepthRGB() Decimation (4) is not valid for current image size (depth=4x3). Highest compatible decimation used=1.
[ WARN] (2020-08-06 21:01:21.942) util3d.cpp:604::cloudFromDepthRGB() Cloud with only NaN values created!
[ INFO] [1596744082.035554965]: Odom: ratio=0.998805, std dev=0.009056m|0.009056rad, update time=0.003423s
[ INFO] [1596744082.139224506]: Odom: ratio=0.998808, std dev=0.009064m|0.009064rad, update time=0.003504s
 







Reply | Threaded
Open this post in threaded view
|

Re: Problems with launch and mapping

matlabbe
Administrator
Do you have ouster gen 1 or gen 2? I am still having issues with the new ouster package. Note however that if you want to synchronize ouster data with other sensors (for both gen), their package should be modified to publish ros time instead of sensor time.

If you can share a rosbag and and example of usage with your launch, it will be easier to see what are the problems.
Reply | Threaded
Open this post in threaded view
|

Re: Problems with launch and mapping

denzle
Apologies for the huge delay in replying. I've attached a link to my dropbox folder with some db files of my attempts at lidar mapping in woodland. There's still some serious problems with odom and actually getting a decent cloud but i feel i'm getting ever closer. Would you be able to offer any advice as to where i'm going wrong? I'm using the gen1 os1-32. I will look to amend the synch problem for fusion. Is it the one mentioned in one of the posts in the forum or on github? I did read one recently.

https://www.dropbox.com/sh/r872fydiaq83hgd/AABPwGjd9N-gwXxyC--HMSUva?dl=0

On a better note i've successfully started my field work with the realsense mapping and i'm really happy with the outputs so far.


Thanks
Dan







Reply | Threaded
Open this post in threaded view
|

Re: Problems with launch and mapping

denzle
This post was updated on .
In reply to this post by matlabbe
Here's the lidar launch i've been using

<?xml version="1.0"?>
<!--
Copyright (c) 2018, STEREOLABS.

All rights reserved.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
    <!-- 
    Hand-held 3D lidar mapping example using only a Ouster OS-1 (no camera).
    Prerequisities: rtabmap should be built with libpointmatcher
    Example:
     $ roslaunch rtabmap_ros test_ouster.launch os1_hostname:=os1-XXXXXXXXXXXX.local os1_udp_dest:=192.168.1.XXX
     $ rosrun rviz rviz -f map
     $ Show TF and /rtabmap/cloud_map topics
    ISSUE: You may have to reset odometry after receiving the first cloud if the map looks tilted. The problem seems 
           coming from the first cloud sent by os1_cloud_node, which may be poorly synchronized with IMU data.
    -->

<launch>

<node pkg="tf2_ros" type="static_transform_publisher" name="map_to_odom" args="0 0 0 0 0 0 1 map odom" />
<node pkg="tf2_ros" type="static_transform_publisher" name="odom_to_base_link" args="0 0 0 0 0 0 1 odom base_link" />
<node pkg="tf2_ros" type="static_transform_publisher" name="base_link_to_os1_sensor" args="0 0 0 0 0 0 1 base_link os1_sensor" />
<node pkg="tf2_ros" type="static_transform_publisher" name="os1_sensor_to_os1_lidar" args="0 0 0 0 0 0 1 os1_sensor os1_lidar" />
<node pkg="tf2_ros" type="static_transform_publisher" name="os1_sensor_to_os1_imu" args="0 0 0 0 0 0 1 os1_sensor os1_imu" />	
  


    <!-- Required: -->
     <arg name="os1_hostname"            default="os1-991949000023.local"/>
    <arg name="os1_udp_dest"            default="10.5.5.1"/>

   <arg name="frame_id" default="base_link"/>
    <arg name="rtabmapviz"    default="true"/>
    <arg name="scan_20_hz"    default="true"/>
    <arg name="use_sim_time"  default="true"/>
    <param if="$(arg use_sim_time)" name="use_sim_time" value="true"/>

 <arg name="rgb_topic"               default="/camera/color/image_raw"/>
    <arg name="depth_topic"             default="/camera/aligned_depth_to_color/image_raw"/>
    <arg name="camera_info_topic"       default="/camera/color/camera_info"/>
        <arg name="rviz"                    default="true" />
    <arg name="rviz_cfg"                default="$(find rtabmap_ros)/launch/config/rgbd.rviz" /> 

<arg name="rgbd_sync"               default="false"/>         
  <arg name="approx_rgbd_sync"        default="false"/>         
  <arg name="subscribe_rgbd"          default="$(arg rgbd_sync)"/>
  <arg name="approx_sync"             default="true"/>
  <arg name="subscribe_scan"          default="false"/>
  <arg name="scan_topic"              default="/scan"/>
  <arg name="subscribe_scan_cloud"    default="true"/>
  <arg name="scan_cloud_topic"        default="/os1_cloud_node/points"/>
  <arg name="scan_cloud_max_points"   default="65536"/>
  <arg name="scan_cloud_filtered"     default="true"/> 
  <arg name="visual_odometry"          default="false"/>         
  <arg name="icp_odometry"             default="true"/> 
  <arg name="args"                    default=""/>             
  <arg name="rtabmap_args"            default="$(arg args)"/>   
  <arg name="launch_prefix"           default=""/>
  <arg name="voxel_size"    default="0.35"/> <!-- indoor: 0.1 to 0.3, outdoor: 0.3 to 0.5 --> 
    
     <!-- Ouster -->
   
    <include unless="$(arg use_sim_time)" file="$(find ouster_ros)/os1.launch">
      <arg name="os1_hostname" value="$(arg os1_hostname)"/>
      <arg name="os1_udp_dest" value="$(arg os1_udp_dest)"/>
      <arg     if="$(arg scan_20_hz)" name="lidar_mode" value="1024x20"/>
      <arg unless="$(arg scan_20_hz)" name="lidar_mode" value="1024x10"/>
    </include>

    <!-- IMU orientation estimation and publish tf accordingly to os1_sensor frame -->
    <node pkg="nodelet" type="nodelet" name="imu_nodelet_manager" args="manager">
      <remap from="imu" to="/os1_cloud_node/imu"/>
    </node>
    <node pkg="nodelet" type="nodelet" name="imu_filter" args="load imu_filter_madgwick/ImuFilterNodelet imu_nodelet_manager">
      <param name="use_mag" value="true"/>
      <param name="world_frame" value="map"/>
      <param name="publish_tf" value="true"/>
    </node> 
    <node pkg="nodelet" type="nodelet" name="imu_to_tf" args="load rtabmap_ros/imu_to_tf imu_nodelet_manager">
      <remap from="imu/data" to="/os1_cloud_node/imu/data"/>
      <param name="fixed_frame_id" value="$(arg frame_id)_stabilized"/>
      <param name="base_frame_id" value="$(arg frame_id)"/>
    </node> 

    <group ns="rtabmap">

      <node pkg="rtabmap_ros" type="icp_odometry" name="icp_odometry" output="screen">
        <remap from="scan_cloud" to="/os1_cloud_node/points"/>
        <param name="frame_id"        type="string" value="$(arg frame_id)"/>  
        <param name="odom_frame_id"   type="string" value="odom"/>
        <param     if="$(arg scan_20_hz)" name="expected_update_rate" type="double" value="25"/>
        <param unless="$(arg scan_20_hz)" name="expected_update_rate" type="double" value="15"/>

        <!-- <remap from="imu" to="/os1_cloud_node/imu/data"/> -->
        <param name="guess_frame_id"   type="string" value="$(arg frame_id)"/>
        <param name="wait_imu_to_init" type="bool" value="false"/>
        <param name="Reg/Strategy"     type="string" value="1"/>
      
        <!-- ICP parameters -->
        <param name="Icp/PointToPlane"        type="string" value="true"/>
        <param name="Icp/Iterations"          type="string" value="10"/>
        <param name="Icp/VoxelSize"           type="string" value="0.2"/>
        <param name="Icp/DownsamplingStep"    type="string" value="1"/> <!-- cannot be increased with ring-like lidar -->
        <param name="Icp/Epsilon"             type="string" value="0.001"/>
        <param name="Icp/PointToPlaneK"       type="string" value="20"/>
        <param name="Icp/PointToPlaneRadius"  type="string" value="0"/>
        <param name="Icp/MaxTranslation"      type="string" value="2"/>
        <param name="Icp/MaxCorrespondenceDistance" type="string" value="1"/>
        <param name="Icp/PM"                  type="string" value="true"/> 
        <param name="Icp/PMOutlierRatio"      type="string" value="0.1"/>
        <param name="Icp/CorrespondenceRatio" type="string" value="0.01"/>  

        <!-- Odom parameters -->       
        <param name="Odom/ScanKeyFrameThr"       type="string" value="0.95"/>
        <param name="Odom/Strategy"              type="string" value="0"/>
        <param name="OdomF2M/ScanSubtractRadius" type="string" value="0.2"/>
        <param name="OdomF2M/ScanMaxSize"        type="string" value="150000"/>      
      </node>

      <node pkg="rtabmap_ros" type="rtabmap" name="rtabmap" output="screen" args="-d">	  
        <param name="frame_id"             type="string" value="$(arg frame_id)"/>  
        <param name="subscribe_depth"      type="bool" value="false"/>
        <param name="subscribe_rgb"        type="bool" value="false"/>
        <param name="subscribe_scan_cloud" type="bool" value="true"/>
        <param name="approx_sync"          type="bool" value="true"/>
        
        <remap from="scan_cloud" to="/os1_cloud_node/points"/>
     
        <!-- RTAB-Map's parameters -->
        <param name="Rtabmap/DetectionRate"          type="string" value="0"/>  
        <param name="RGBD/NeighborLinkRefining"      type="string" value="true"/>
        <param name="RGBD/ProximityBySpace"          type="string" value="true"/>
        <param name="RGBD/ProximityMaxGraphDepth"    type="string" value="0"/>
        <param name="RGBD/ProximityPathMaxNeighbors" type="string" value="1"/>
        <param name="RGBD/AngularUpdate"             type="string" value="0.10"/>
        <param name="RGBD/LinearUpdate"              type="string" value="0.10"/>
        <param name="Mem/NotLinkedNodesKept"         type="string" value="false"/>
        <param name="Mem/STMSize"                    type="string" value="30"/>
        <param name="Mem/LaserScanVoxelSize"     type="string" value="0.1"/>
        <param name="Mem/LaserScanNormalK"       type="string" value="10"/>
        <param name="Mem/LaserScanRadius"        type="string" value="0"/>
        
        <param name="Reg/Strategy"                   type="string" value="1"/> 
        <param name="Grid/CellSize"                  type="string" value="0.1"/>
        <param name="Grid/RangeMax"                  type="string" value="20"/>
        <param name="Grid/ClusterRadius"             type="string" value="1"/>
        <param name="Grid/GroundIsObstacle"          type="string" value="true"/>
        <param name="Grid/FromDepth" type="string" value="false"/>

        <!-- ICP parameters -->
        <param name="Icp/VoxelSize"                  type="string" value="0.3"/>
        <param name="Icp/PointToPlaneK"              type="string" value="20"/>
        <param name="Icp/PointToPlaneRadius"         type="string" value="0"/>
        <param name="Icp/PointToPlane"               type="string" value="false"/>
        <param name="Icp/Iterations"                 type="string" value="10"/>
        <param name="Icp/Epsilon"                    type="string" value="0.001"/>
        <param name="Icp/MaxTranslation"             type="string" value="3"/>
        <param name="Icp/MaxCorrespondenceDistance"  type="string" value="1"/>
        <param name="Icp/PM"                         type="string" value="true"/> 
        <param name="Icp/PMOutlierRatio"             type="string" value="0.7"/>
        <param name="Icp/CorrespondenceRatio"        type="string" value="0.4"/>
      </node>

<node pkg="nodelet" type="nodelet" name="rgbd_sync" args="standalone rtabmap_ros/rgbd_sync" output="screen">
          <remap from="rgb/image"       to="$(arg rgb_topic)"/>
          <remap from="depth/image"     to="$(arg depth_topic)"/>
          <remap from="rgb/camera_info" to="$(arg camera_info_topic)"/>
          <remap from="rgbd_image"      to="rgbd_image"/> <!-- output -->
          <param name="approx_sync"     type="bool"   value="true"/> <!-- false for realsense -->
     </node>

      <node if="$(arg rtabmapviz)" name="rtabmapviz" pkg="rtabmap_ros" type="rtabmapviz" output="screen">
        <param name="frame_id" type="string" value="$(arg frame_id)"/>
        <param name="odom_frame_id" type="string" value="/odom"/>
        <param name="subscribe_odom_info" type="bool" value="true"/>
        <param name="subscribe_scan_cloud" type="bool" value="true"/>
        <param name="approx_sync" type="bool" value="true"/>
        <remap from="scan_cloud" to="/os1_cloud_node/points"/>
      </node>
  </group>

 <node pkg="nodelet" type="nodelet" name="point_cloud_assembler" args="standalone rtabmap_ros/point_cloud_assembler" output="screen">
        <param     if="$(arg scan_20_hz)" name="max_clouds"      type="int"    value="20" />
        <param unless="$(arg scan_20_hz)" name="max_clouds"      type="int"    value="10" />
        <param name="fixed_frame_id"  type="string" value="fusion" />
        <remap from="cloud"           to="/os1_cloud_node/points"/>
        <remap from="odom"            to="/odom"/>
      </node>

 <node if="$(arg rviz)" pkg="rviz" type="rviz" name="rviz" args="-d $(arg rviz_cfg)"/>

</launch>
Reply | Threaded
Open this post in threaded view
|

Re: Problems with launch and mapping

matlabbe
Administrator
This post was updated on .
Hi,

First you should remove those static transforms:
This is already published by rtabmap:
<node pkg="tf2_ros" type="static_transform_publisher" name="map_to_odom" args="0 0 0 0 0 0 1 map odom" />
This is already published by odometry:
<node pkg="tf2_ros" type="static_transform_publisher" name="odom_to_base_link" args="0 0 0 0 0 0 1 odom base_link" />
This is already published by ouster launch:
<node pkg="tf2_ros" type="static_transform_publisher" name="os1_sensor_to_os1_lidar" args="0 0 0 0 0 0 1 os1_sensor os1_lidar" />
This is already published by ouster launch:
<node pkg="tf2_ros" type="static_transform_publisher" name="os1_sensor_to_os1_imu" args="0 0 0 0 0 0 1 os1_sensor os1_imu" />	

Publishing odom->base_link with always Identitfy will confuse rtabmap by adding the points cloud sometimes with the real odometry odom->base_link from icp_odometry, or the Identity from the static transform as both are publishing on same TF frames. In rtabmap-databaseViewer -> Constraints View, we can see that some neighbor links are correct, while others are not, depending on which TF has been used by rtabmap.

If you are using ouster alone, like in this post, you may don't need to apply the patch to fix the timestamps.

With rtabmap-databaseViewer, I manually fixed all neighbor links for one ouster database. Here is the map before and after correct transforms.

Before:


After:




Parameters I used on ouster database:
Icp/MaxCorrespondenceDistance=1
Icp/PMOutlierRatio=0.6
Icp/RangeMax=0
Icp/CorrespondenceRatio=0.1

For the realsense database, the map looks indeed good:


However, there is a lot of interpolation in the images. Which realsense are you using? I think there are parameters in realsense camera node to avoid interpolating as much.


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

Re: Problems with launch and mapping

denzle
Wow!! The after images looks amazing! May i ask the process you went through to obtain the neighbour links. Am i right in sliding the neighbour links bar and refining when i find a good match?

I'm currently testing the d415, d455 and t265 in stand-alone rtabmap as i just need to get some viable forest data together because my supervisors are breathing down my neck. The realsense map was a multi session of three walk arounds (same day) with the d415. I did try again two days ago at the same spot with the d455 and t265 but the outputs were a bit naff and my system kept freezing and crashing. So i'm working through where i went wrong with settings and how to sort out the interpolations you mentioned.

Whilst i am trying to get some lidar data together with Rtab-ros. The final goal will be rgb-d/lidar fusion but i'm going back to basics with each working separately to then have another go at getting a working launch file and fusion data once i've gotten a better grip of parameters and changes i need to make. So the amendments you mentioned will be most helpful ie timestamps and static transforms.

It has been one steep learning curve, i'm an ecologist and dont really have a background in computer/robotics science.

I'll be going out tomorrow to re-test the lidar after a few tweeks hopefully i'll have some decent outputs.

Many thanks
Dan
Reply | Threaded
Open this post in threaded view
|

Re: Problems with launch and mapping

denzle
I figured out the constraints tool, and i take my hat off to you that is amazing!!
Reply | Threaded
Open this post in threaded view
|

Re: Problems with launch and mapping

denzle
This post was updated on .
In reply to this post by matlabbe
Hi Mathieu,

Heres and update to my lidar mapping. Using a new dataset and having a few day tinkering with settings i was able to produce this map on first pass offline processing with Rtab. Although i do get this error:

[pcl::VoxelGrid::applyFilter] Leaf size is too small for the input dataset. Integer indices would overflow.[pcl::VoxelGrid::applyFilter] Leaf size is too small for the input dataset. Integer indices would overflow.[ WARN] (2020-11-26 12:34:47.325) util3d.cpp:604::cloudFromDepthRGB() Cloud with only NaN values created!
[pcl::VoxelGrid::applyFilter] Leaf size is too small for the input dataset. Integer indices would overflow.[ WARN] (2020-11-26 12:34:48.427) util3d.cpp:604::cloudFromDepthRGB() Cloud with only NaN values created!

Would you have any idea which parameter i need to change or if theres anything that may increase accuracy even more prior to post-processing and using DB viewer?

One problem i've also noticed is how the odom jumps around a lot. Could this be due to the ouster/ros timing? Would setting to TIME_FROM_INTERNAL_OSC to TIME_FROM_PTP_1588 help when collecting data? I have played around with Hz inputs.

Other things i may need a little info on:
Decimation
voxel
Iterations
Downsampling

Is it better to run a DB file without voxelisation first considering it can be done when exporting to ply file?

I've added the newest and original db's, ply and rtab settings ini.

https://www.dropbox.com/sh/r872fydiaq83hgd/AABPwGjd9N-gwXxyC--HMSUva?dl=0

Also thanks for a great mapping software and all of your help so far.

Dan






Reply | Threaded
Open this post in threaded view
|

Re: Problems with launch and mapping

matlabbe
Administrator
The voxel warning happens when the voxel size is too small for the point cloud, so that indices will overflow. Voxel size should be then increased.

Voxel can be indeed done only when exporting. However, setting Icp/VoxelSize will help to increase ICP speed and convergence.

Not sure which database you want me to check, but for Good_quality_1st_pass.db, there is something very wrong with the odometry. If you can record a rosbag of the ouster alone and share the launch file (does the one above changed?), it will help to debug the odometry:
rosbag record /tf /tf_static /os1_cloud_node/imu/data /os1_cloud_node/points 

cheers,
Mathieu