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

Set rtabmap's initial position from the launch file?

asked 2022-08-17 18:04:44 -0600

zippyzoo77 gravatar image

updated 2022-08-17 18:11:27 -0600

Hello,

I am looking for a way to set the initial pose of my robot from the launch file within rtabmap. I see that it can be done by sending the pose to the rtabmap/initialpose channel, but since I am running a simulation with many robots, doing this manually every time I launch the simulation (probably 100+ times a day, depending on what I am working on) for each of my robots (3-5, again depending) very quickly becomes cumbersome. I would like to be able to send this message (or set the variable, or something like that) from my main launch file, but I'm not sure how to do that. Alternatively, if I were able to set it from the rtabmap launch file I could set up separate ones of those for each robot that my main can call, but I would prefer to be able to do it from the main one. Can anyone help?

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-11-06 12:10:49 -0600

matlabbe gravatar image

You can set RGBD/StartAtOrigin=true so that each robot will assume they restart from the origin of their map. If you are using the same map for all robots, that could be indeed problematic. The service rabmap/initialpose could be called from a script after the robots have been bringup. Well, for convenience, I just updated rtabmap node to use a new parameter called initial_pose (also added in rtabmap.launch).

<arg name="initial_pose"  default=""/>  <!-- Format: "x y z roll pitch yaw" or "x y z qx qy qz qw". Default: see "rtabmap --params | grep RGBD/StartAtOrigin" -->
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-08-17 18:04:44 -0600

Seen: 373 times

Last updated: Nov 06 '22