Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 1516

Is it possible to use robot_localization for multiple robots?

$
0
0
Hello all, I'm working on a small, multi-robot simulation using Husky robots. I've been using the base [husky_simulator](http://wiki.ros.org/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: ![image description](/upfiles/14551518842841426.png) But when launched from within the namespace, with multiple robots, looks like this: ![image description](/upfiles/14551516003959805.png) 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.0182353 Max Delay: 0.04 Frame: husky1/front_left_wheel_link published by unknown_publisher Average Delay: 0.0185882 Max Delay: 0.04 Frame: husky1/front_right_wheel_link published by unknown_publisher Average Delay: 0.0185882 Max Delay: 0.04 Frame: husky1/imu_link published by unknown_publisher Average Delay: 0.0182353 Max Delay: 0.04 Frame: husky1/inertial_link published by unknown_publisher Average Delay: 0.0182353 Max Delay: 0.04 Frame: husky1/laser_mount_link published by unknown_publisher Average Delay: 0.0182353 Max Delay: 0.04 Frame: husky1/rear_bumper_link published by unknown_publisher Average Delay: 0.0182353 Max Delay: 0.04 Frame: husky1/rear_left_wheel_link published by unknown_publisher Average Delay: 0.0185882 Max Delay: 0.04 Frame: husky1/rear_right_wheel_link published by unknown_publisher Average Delay: 0.0185882 Max Delay: 0.04 Frame: husky1/topPlate published by unknown_publisher Average Delay: 0.0182353 Max Delay: 0.04 Frame: husky1/top_chassis_link published by unknown_publisher Average Delay: 0.0182353 Max Delay: 0.04 Frame: husky1/top_plate_link published by unknown_publisher Average Delay: 0.0182353 Max Delay: 0.04 Frame: husky1/user_rail_link published by unknown_publisher Average Delay: 0.0182353 Max Delay: 0.04 Frame: husky2/base_footprint published by unknown_publisher Average Delay: 0.0188824 Max Delay: 0.03 Frame: husky2/base_laser published by unknown_publisher Average Delay: 0.0188824 Max Delay: 0.03 Frame: husky2/front_bumper_link published by unknown_publisher Average Delay: 0.0188824 Max Delay: 0.03 Frame: husky2/front_left_wheel_link published by unknown_publisher Average Delay: 0.0188824 Max Delay: 0.03 Frame: husky2/front_right_wheel_link published by unknown_publisher Average Delay: 0.0188824 Max Delay: 0.03 Frame: husky2/imu_link published by unknown_publisher Average Delay: 0.0188824 Max Delay: 0.03 Frame: husky2/inertial_link published by unknown_publisher Average Delay: 0.0188824 Max Delay: 0.03 Frame: husky2/laser_mount_link published by unknown_publisher Average Delay: 0.0188824 Max Delay: 0.03 Frame: husky2/rear_bumper_link published by unknown_publisher Average Delay: 0.0188824 Max Delay: 0.03 Frame: husky2/rear_left_wheel_link published by unknown_publisher Average Delay: 0.0188824 Max Delay: 0.03 Frame: husky2/rear_right_wheel_link published by unknown_publisher Average Delay: 0.0188824 Max Delay: 0.03 Frame: husky2/topPlate published by unknown_publisher Average Delay: 0.0188824 Max Delay: 0.03 Frame: husky2/top_chassis_link published by unknown_publisher Average Delay: 0.0188824 Max Delay: 0.03 Frame: husky2/top_plate_link published by unknown_publisher Average Delay: 0.0188824 Max Delay: 0.03 Frame: husky2/user_rail_link published by unknown_publisher Average Delay: 0.0188824 Max Delay: 0.03 All Broadcasters: Node: unknown_publisher 200.59 Hz, Average Delay: 0.0186471 Max Delay: 0.04 And this is what my localization.yaml file looks like (it is left the same for both): map_frame: map odom_frame: odom base_link_frame: base_link world_frame: odom two_d_mode: true frequency: 50 odom0: husky_velocity_controller/odom odom0_config: [false, false, false, false, false, false, true, true, true, false, false, true, false, false, false] odom0_differential: false odom0_queue_size: 10 imu0: imu/data imu0_config: [false, false, false, true, true, true, false, false, false, true, true, true, false, false, false] imu0_differential: true imu0_queue_size: 10 imu0_remove_gravitational_acceleration: true print_diagnostics: true I notice there are no "base_link" frames for the multi-robot version, but I'm not sure what this could mean. Edit 2: Here is the output from rqt_map on the working single robot: ![image description](/upfiles/14552322821908099.png) And now the output from the multi robot: ![image description](/upfiles/14552322963525903.png) So it looks like there are for input topics coming into the localization node for husky1. Here are examples of all: /tf transforms: - header: seq: 0 stamp: secs: 1597 nsecs: 300000000 frame_id: husky1/base_link child_frame_id: husky1/front_left_wheel_link transform: translation: x: 0.256 y: 0.2854 z: 0.03282 rotation: x: 0.0 y: 0.144187547375 z: 0.0 w: 0.989550378294 - header: seq: 0 stamp: secs: 1597 nsecs: 300000000 frame_id: husky1/base_link child_frame_id: husky1/front_right_wheel_link transform: translation: x: 0.256 y: -0.2854 z: 0.03282 rotation: x: 0.0 y: 0.157750826895 z: 0.0 w: 0.98747894996 - header: seq: 0 stamp: secs: 1597 nsecs: 300000000 frame_id: husky1/base_link child_frame_id: husky1/rear_left_wheel_link transform: translation: x: -0.256 y: 0.2854 z: 0.03282 rotation: x: 0.0 y: -0.158428913083 z: 0.0 w: 0.987370386177 - header: seq: 0 stamp: secs: 1597 nsecs: 300000000 frame_id: husky1/base_link child_frame_id: husky1/rear_right_wheel_link transform: translation: x: -0.256 y: -0.2854 z: 0.03282 rotation: x: 0.0 y: -0.192699433619 z: 0.0 w: 0.981257829667 /husky1/imu/data header: seq: 23902 stamp: secs: 1776 nsecs: 540000000 frame_id: base_link orientation: x: 0.000136499101278 y: 1.42176279272e-05 z: 0.00338303918051 w: 0.999994268089 orientation_covariance: [2.6030820491461885e-07, 0.0, 0.0, 0.0, 2.6030820491461885e-07, 0.0, 0.0, 0.0, 0.0] angular_velocity: x: -0.00250481986211 y: 0.000314847644066 z: -0.00384896932272 angular_velocity_covariance: [2.5e-05, 0.0, 0.0, 0.0, 2.5e-05, 0.0, 0.0, 0.0, 2.5e-05] linear_acceleration: x: -0.00435986520834 y: 0.00647963661132 z: 9.79696593816 linear_acceleration_covariance: [2.5e-05, 0.0, 0.0, 0.0, 2.5e-05, 0.0, 0.0, 0.0, 2.5e-05] --- /husky1/husky_controller_velocity/odom header: seq: 29601 stamp: secs: 1890 nsecs: 960000000 frame_id: odom child_frame_id: base_link pose: pose: position: x: 0.00760542738025 y: -3.62838407179e-05 z: 0.0 orientation: x: 0.0 y: 0.0 z: -0.000862957133054 w: 0.999999627652 covariance: [0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.03] twist: twist: linear: x: 3.82179164307e-05 y: 0.0 z: 0.0 angular: x: 0.0 y: 0.0 z: -1.04046111105e-07 covariance: [0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.03] --- And /tf_static Which doesn't seem to be publishing anything. Thanks all!

Viewing all articles
Browse latest Browse all 1516

Latest Images

Trending Articles



Latest Images