rtabmap_ros icon indicating copy to clipboard operation
rtabmap_ros copied to clipboard

what(): parameter 'Odom/ResetCountdown' cannot be set because it was not declared

Open Richard-coder opened this issue 8 months ago • 1 comments

I use RGBD odometry, I want to auto reset odometry while tracking lost, I set --Odom/ResetCountdown 20, but I get following error:

[rtabmap-2] terminate called after throwing an instance of 'rclcpp::exceptions::ParameterNotDeclaredException' [rtabmap-2] what(): parameter 'Odom/ResetCountdown' cannot be set because it was not declared

This is my launch command

ros2 launch rtabmap_launch rtabmap.launch.py rtabmap_args:="--Vis/CorType 0 --Mem/IncrementalMemory false \
--Odom/ResetCountdown 20 \
--Kp/MaxDepth 4.0 \
--Grid/Sensor 1 \
--Grid/3D fasle \
--Grid/DepthDecimation 0 \
--Grid/MaxObstacleHeight 0.4 \
--Grid/RangeMax 4.0 \
--Grid/NoiseFilteringRadius 0.2 \
--Grid/RayTracing true" \
depth_topic:=/camera/aligned_depth_to_color/image_raw \
rgb_topic:=/camera/color/image_raw \
camera_info_topic:=/camera/color/camera_info \
approx_sync:=false \
frame_id:=base_link \
sync_queue_size:=30 \
rviz:=true \
rtabmap_viz:=false \
database_path:="~/.ros/rtabmap.db" \
localization:=true \
use_sim_time:=true

Richard-coder avatar Apr 24 '25 09:04 Richard-coder

Try moving it to:

odom_args:="--Odom/ResetCountdown 20"

or

ros2 launch rtabmap_launch rtabmap.launch.py rtabmap_args:="--Vis/CorType 0 --Mem/IncrementalMemory false \
--Kp/MaxDepth 4.0 \
--Grid/Sensor 1 \
--Grid/3D fasle \
--Grid/DepthDecimation 0 \
--Grid/MaxObstacleHeight 0.4 \
--Grid/RangeMax 4.0 \
--Grid/NoiseFilteringRadius 0.2 \
--Grid/RayTracing true" \
odom_args:="--Odom/ResetCountdown 20" \
depth_topic:=/camera/aligned_depth_to_color/image_raw \
rgb_topic:=/camera/color/image_raw \
camera_info_topic:=/camera/color/camera_info \
approx_sync:=false \
frame_id:=base_link \
sync_queue_size:=30 \
rviz:=true \
rtabmap_viz:=false \
database_path:="~/.ros/rtabmap.db" \
localization:=true \
use_sim_time:=true

The funny thing is that I am not sure (on top of my head) why we don't have the same issue with rgbd_odometry node with rtabmap parameters, but just get some logs instead that are safely ignored:

[rgbd_odometry-1] [INFO] [1745786661.035420057] [rtabmap.rgbd_odometry]: Odometry: Ignored parameter "Grid/3D"="fasle" from arguments
[rgbd_odometry-1] [INFO] [1745786661.035450263] [rtabmap.rgbd_odometry]: Odometry: Ignored parameter "Grid/DepthDecimation"="0" from arguments
[rgbd_odometry-1] [INFO] [1745786661.035455892] [rtabmap.rgbd_odometry]: Odometry: Ignored parameter "Grid/MaxObstacleHeight"="0.4" from arguments
[rgbd_odometry-1] [INFO] [1745786661.035461493] [rtabmap.rgbd_odometry]: Odometry: Ignored parameter "Grid/NoiseFilteringRadius"="0.2" from arguments
[rgbd_odometry-1] [INFO] [1745786661.035466695] [rtabmap.rgbd_odometry]: Odometry: Ignored parameter "Grid/RangeMax"="4.0" from arguments
[rgbd_odometry-1] [INFO] [1745786661.035471122] [rtabmap.rgbd_odometry]: Odometry: Ignored parameter "Grid/RayTracing"="true" from arguments
[rgbd_odometry-1] [INFO] [1745786661.035477464] [rtabmap.rgbd_odometry]: Odometry: Ignored parameter "Grid/Sensor"="1" from arguments
[rgbd_odometry-1] [INFO] [1745786661.035481876] [rtabmap.rgbd_odometry]: Odometry: Ignored parameter "Kp/MaxDepth"="4.0" from arguments
[rgbd_odometry-1] [INFO] [1745786661.035486543] [rtabmap.rgbd_odometry]: Odometry: Ignored parameter "Mem/IncrementalMemory"="false" from arguments
[rgbd_odometry-1] [INFO] [1745786661.035491169] [rtabmap.rgbd_odometry]: Odometry: Update parameter "Odom/ResetCountdown"="20" from arguments
[rgbd_odometry-1] [INFO] [1745786661.035498126] [rtabmap.rgbd_odometry]: Odometry: Update parameter "Vis/CorType"="0" from arguments

EDIT: Added it as a bug for rtabmap node, which I think should behave like rgbd_odometry node and just ignore the parameter.

matlabbe avatar Apr 27 '25 20:04 matlabbe