ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Need help with passing parameters to a launch file.

asked 2018-06-24 17:13:40 -0600

rnunziata gravatar image

updated 2018-06-24 23:54:48 -0600

jayess gravatar image

I would like to over ride rtabmap parameters on a rosrun command line....I want to used the unaltered rtabmap launch file overriding some of the Grid parameters. Can this be done from the command line? If not is there a way to call rtabmap with include from another launch file and do this I do not want to cop and modify the launch file. I can not seem to get any solution on this. Thank you for your time.

The below code does not work.

roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start" depth_topic:=/zed/depth/depth_registered frame_id:=base_frame approx_sync:=false visual_odometry:=false odom_topic:=/zed/odom camera_info_topic:=/zed/rgb/camera_info rgb_topic:=/zed/rgb/image_rect_color  rtabmapviz:=false Grid/MaxGroundAngle:=45.0 Grid/MaxObstacleHeight:=2.0

I tried setting inside a launch file:

<!-- rosparam command = "load" file = "$(find my_package)/example.yaml" / -->  
<param name = "/rtabmap/Mem/IncrementalMemory" type = "bool" value = "false" />  
<param name = "/Mem/IncrementalMemory" type = "bool" value = "false" /> 

<include file="$(find rtabmap_ros)/launch/rtabmap.launch"/>

<param name = "/rtabmap/Mem/IncrementalMemory" type = "bool" value = "false" />  
<param name = "/Mem/IncrementalMemory" type = "bool" value = "false" />

But the rtabmap keeps setting values to true.

[ INFO] [1529896284.763605800]: Setting RTAB-Map parameter "Mem/IncrementalMemory"="true"
[ INFO] [1529896284.764360510]: Setting RTAB-Map parameter "Mem/InitWMWithAllNodes"="false"

even though

rosparam list | grep Incr

/Mem/IncrementalMemory
/rtabmap/Kp/IncrementalDictionary
/rtabmap/Kp/IncrementalFlann
/rtabmap/Mem/IncrementalMemory
/rtabmap/rtabmap/Mem/IncrementalMemory
edit retag flag offensive close merge delete

Comments

The below code does not work

What does this mean?

jayess gravatar image jayess  ( 2018-06-24 19:44:03 -0600 )edit

it does not alter the values of the parameters ....

rnunziata gravatar image rnunziata  ( 2018-06-24 20:23:38 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-06-25 01:20:23 -0600

updated 2018-06-25 01:55:06 -0600

It seams that you are setting parameters in the wrong name-space for your node.

If you look at launch file of rtabmap you can see that parameters are set depending on localization parameter and it seams they should not be used by the user.

Also you are setting bool parameters, but they are actually strings.

edit flag offensive delete link more

Comments

thanks .... what I was looking for I just found rtabmap.ini still don't know how to over ride parameters on input but this works for me. Yes I totally missed the the fact that the Men parameters was controlled by localization ....

rnunziata gravatar image rnunziata  ( 2018-06-25 08:01:19 -0600 )edit
0

answered 2018-06-28 15:21:36 -0600

matlabbe gravatar image

Based your first example, this should work:

roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start --Grid/MaxGroundAngle 45.0 --Grid/MaxObstacleHeight 2.0" depth_topic:=/zed/depth/depth_registered frame_id:=base_frame approx_sync:=false visual_odometry:=false odom_topic:=/zed/odom camera_info_topic:=/zed/rgb/camera_info rgb_topic:=/zed/rgb/image_rect_color  rtabmapviz:=false

Put rtabmap's parameters in rtabmap_args.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2018-06-24 17:13:40 -0600

Seen: 523 times

Last updated: Jun 28 '18