Modifying parameters in ROS 2

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

Modifying parameters in ROS 2

Genozen
Hello, I have been reading through the forums and repo to see how I can modify parameters like the
`Inliers` when `OdometryF2M.cpp:372::computeTransform() Registration failed: "Not enough inliers 0/20 between -1 and 0"
[ INFO] [1497263650.114361136]: Odom: quality=0, std dev=0.000000m|0.000000rad, update time=0.026155s ` occurs.

(reference: http://official-rtab-map-forum.206.s1.nabble.com/WARN-2017-06-12-18-34-10-699-OdometryF2M-cpp-372-computeTransform-Registration-failed-quot-Not-enoug-td3306.html)

I'm working on using RTAB-Map for a tight-space and semi-faster turns. ros bag here

Steps to reproduce:

#Launch D435i infra1 + infra2
`ros2 launch rs_launch.py unite_imu_method:=1 enable_gyro:=true enable_accel:=true enable_infra1:=true enable_infra2:=true fps:=90 initial_reset:=true`


#Launch RTAB-Map stereo example
`ros2 launch realsense_d435i_stereo.launch.py`

To modify the parameters, I tried:
`ros2 launch realsense_d435i_stereo.launch.py rtabmap_args:="--Vis/MinInliers 5"`

`ros2 param set /stereo_odometry Vis/MinInliers value:="5"`

Although I have confirmed the values changed when running `ros2 param get`

But when the RTAB-Map shows red back ground (Odom lost track), the error message showed that the inlier threshold is still "0/20" instead of "0/5"

Could someone give a little more guidance on how I can change all the parameters? I would also like to change parameters like `Rtabmap/DetectionRate`

If you replay the bag, it does track points for the most part, and at the part where there are less points, I'd still like to give some estimation perhaps from dead-reckoning on the imu? (which I thought the example is using VIO).
Reply | Threaded
Open this post in threaded view
|

Re: Modifying parameters in ROS 2

matlabbe
Administrator
rtabmap's vo with imu is not a tightly VIO approach, and it won't do dead-reckoning without camera.

 rtabmap_args is not defined in realsense_d435i_stereo.launch.py, did you add it? Otherwise, you coudl add in parameters here:
parameters=[{
          'frame_id':'camera_link',
          'subscribe_stereo':True,
          'subscribe_odom_info':True,
          'wait_imu_to_init':True,
          'Vis/MinInliers': '5',
          'Rtabmap/DetectionRate', '2'
}]
Note that rtabmap's library parameters should have "string" values. This is how you will know that the parameters are set, looking at the initialization output log:


Here example with your bag with Vis/MinInliers=5:


For fun, you may compare with F2F odom :
'Odom/Strategy':'1',
'Vis/CorType': '1',
'Odom/KeyFrameThr': '0.6'

My computer could compute vo faster than 30 Hz, but the bag is only 15 Hz. With 30 Hz framerate, it may make it less difficult for VO algorithms to estimate fast motions in featureless sections of that kind of trajectory.

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

Re: Modifying parameters in ROS 2

Genozen
Thank you so much, I will go try these out! Result looks amazing on your end