Is it possible to use robot_localization for multiple robots?
Hello all,
I'm working on a small, multi-robot simulation using Husky robots. I've been using the base husky_simulator with some modifications to allow for multiple robots. The way I've accomplished this is through the use of namespaces. I call each "spawn_husky.launch" file in a separate namespace, which sets up all the plugins and publishes unique topics for each robot.
Everything seems to be working fine except for the the topics husky1/odometry/filtered and husky2/odometry/filtered. So I dug through the launch files and found that this topic is published in the control.launch file which uses a "robot_localization" node of the "ekf_localization_node" type.
The tf frame tree of a single robot simulation (without namespaces) looks like this:
But when launched from within the namespace, with multiple robots, looks like this:
I know it's hard to see, but the "odom" frame no longer exists, so this seems the localization is not working properly. My initial guess is that the robot_localization limits the parameters to "map" or "odom" but since I'm using a namespace and tf_prefix, it becomes "husky1/odom" and this is not allowed. But does anyone have any ideas as to how I might be able to correct this or why it might be happening?
Edit 1: Some additional information, as requested by Tom.
Here are the frame_ids during a single robot simulation with no namespace or tf_prefix
RESULTS: for all Frames
Frames:
Frame: base_footprint published by unknown_publisher Average Delay: -0.000202703 Max Delay: 0
Frame: base_laser published by unknown_publisher Average Delay: -0.000135135 Max Delay: 0
Frame: base_link published by unknown_publisher Average Delay: -6.75676e-05 Max Delay: 0
Frame: front_bumper_link published by unknown_publisher Average Delay: -0.000135135 Max Delay: 0
Frame: front_left_wheel_link published by unknown_publisher Average Delay: 0 Max Delay: 0
Frame: front_right_wheel_link published by unknown_publisher Average Delay: 0 Max Delay: 0
Frame: imu_link published by unknown_publisher Average Delay: -0.000135135 Max Delay: 0
Frame: inertial_link published by unknown_publisher Average Delay: -0.000135135 Max Delay: 0
Frame: laser_mount_link published by unknown_publisher Average Delay: -0.000135135 Max Delay: 0
Frame: rear_bumper_link published by unknown_publisher Average Delay: -0.000135135 Max Delay: 0
Frame: rear_left_wheel_link published by unknown_publisher Average Delay: 0 Max Delay: 0
Frame: rear_right_wheel_link published by unknown_publisher Average Delay: 0 Max Delay: 0
Frame: topPlate published by unknown_publisher Average Delay: -0.000135135 Max Delay: 0
Frame: top_chassis_link published by unknown_publisher Average Delay: -0.000135135 Max Delay: 0
Frame: top_plate_link published by unknown_publisher Average Delay: -0.000135135 Max Delay: 0
Frame: user_rail_link published by unknown_publisher Average Delay: -0.000135135 Max Delay: 0
All Broadcasters:
Node: unknown_publisher 150.338 Hz, Average Delay: -6.94586e-05 Max Delay: 0
And here are all the frame_ids shown by tf_monitor when running the multi robot simulation:
RESULTS: for all Frames
Frames:
Frame: husky1/base_footprint published by unknown_publisher Average Delay: 0.0182353 Max Delay: 0.04
Frame: husky1/base_laser published by unknown_publisher Average Delay: 0.0182353 Max Delay: 0.04
Frame: husky1/front_bumper_link published by unknown_publisher Average Delay: 0 ...
Can you post sample messages for each input? I want to see the
frame_id
s. Also, even though I know what's in it, can you post the .yaml settings forekf_localization_node
? You can leave out the covariance matrices.I just updated the post to include the frames and .yaml file. Let me know if anything else might be useful. Thanks!
I think ekf/localization can subscribe topic odom and imu. But I cannot get /odometry/filtered neither.
Can you post a sample input message for each input topic?
What do you mean by input topics? Are you referring to the topics used by the ekf_localization_node such as husky1/imu/data or husky2/husky_velocity_controller/odom?
Yes. I need to see sample messages so I can verify frame_ids in the messages themselves.