Ask Your Question

robot_localization setup for global estimation

asked 2020-10-24 05:30:54 -0500

xprior gravatar image

Hello all, I am trying to use robot_localization to filter some of the results from trying to incorporate the beacons position with amcl. Right now i use the beacons method to get a global position, and kind of tell amcl where i am with a certain covariance.

However this beacon method is very noisy, and I was thinking about using robot_localization to filter out some of the noise from the beacons, and to give an estimation from the beacons method and amcl.

I thought the robot_localization method would transform from map to odom based on the final result from the fusion of both amcl and beacons, but I keep getting an error:

  • [ WARN] [1603532931.467528858, 1602246684.573640600]: Could not obtain transform from odom to map. Error was "map" passed to lookupTransform argument target_frame does not exist.

Can anyone could help me setup robot_localization for global_position? I have a rosbag with odom, amcl, and beacons. The following is the launch file:

<arg name="initial_pose_x" default="27.3" />
<arg name="initial_pose_y" default="35.2" />
 <arg name="initial_pose_a" default="0" />
 <param name="/use_sim_time" value="true" />

<node pkg="rosbag" type="play" name="player" args="--clock /home/rafael/test_beacons/test.bag" />

<node pkg="map_server" type="map_server" name="map_server" args="/home/rafael/test_beacons/map.bag.yaml"
    <param name="frame_id" value="/map" />

<node type="rviz" name="rviz" pkg="rviz" />

<node pkg="amcl" type="amcl" name="amcl">
    <param name="tf_broadcast" value="false" />
    <param name="use_map_topic" value="true" />
    <param name="odom_model_type" value="diff" />
    <param name="gui_publish_rate" value="10.0" />
    <param name="laser_max_beams" value="450" />
    <param name="laser_max_range" value="40.0" />
    <param name="min_particles" value="1000" />
    <param name="max_particles" value="5000" />
    <param name="kld_err" value="0.05" />
    <param name="kld_z" value="0.99" />
    <param name="odom_alpha1" value="1.5" />
    <param name="odom_alpha2" value="1.5" />
    <param name="odom_alpha3" value="1.5" />
    <param name="odom_alpha4" value="1.5" />
    <param name="odom_alpha5" value="1.5" />
    <param name="laser_z_hit" value="0.5" />
    <param name="laser_z_short" value="0.05" />
    <param name="laser_z_max" value="0.05" />
    <param name="laser_z_rand" value="0.5" />
    <param name="laser_sigma_hit" value="0.05" />
    <param name="laser_lambda_short" value="0.1" />
    <param name="laser_model_type" value="likelihood_field" />
    <param name="laser_likelihood_max_dist" value="2.0" />
    <param name="update_min_d" value="0.10" />
    <param name="update_min_a" value="0.1" />
    <param name="odom_frame_id" value="odom" />
    <param name="base_frame_id" value="base_link" />
    <param name="global_frame_id" value="map" />
    <param name="resample_interval" value="1" />
    <param name="transform_tolerance" value="1.0" />
    <param name="recovery_alpha_slow" value="0.0" />
    <param name="recovery_alpha_fast" value="0.0" />
    <param name="initial_cov_xx" value="0.0025" />
    <param name="initial_cov_yy" value="0.0025" />
    <param name="initial_cov_aa" value="0.0289" />
    <param name="initial_pose_x" value="$(arg initial_pose_x)" />
    <param name="initial_pose_y" value="$(arg initial_pose_y)" />
    <param name="initial_pose_a" value="$(arg initial_pose_a)" />
    <remap from="scan ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-11-12 02:44:09 -0500

Tom Moore gravatar image

updated 2020-11-12 02:45:02 -0500

I thought the robot_localization method would transform from map to odom based on the final result from the fusion of both amcl and beacons

Do you have a node actually generating the odom->base_link transform, e.g., a wheel odometry node, or another instance of an EKF?

Anyway, there are a bunch of issues I see here:

  1. You are fusing the absolute pose from your wheel odometry, amcl, and the beacons. Your wheel odometry will be subject to drift, so eventually it will disagree so strongly with amcl and the beacons that the filter is going to rapidly oscillate back and forth between the states. Fuse the wheel encoder velocity, rather than the pose data.
  2. Are your beacons and amcl reporting in the same coordinate frame? amcl will be basing its pose on scan matching to a map. The beacons will need to be registered in that coordinate frame for those measurements to work.
  3. Please provide a sample message from every sensor input, as well as your EKF output topic
  4. You need to simplify. Start with just wheel odometry. Get the output looking like you want it to, and then add another sensor input.
  5. Just for clarity, I'd get all your frame_ids in the EKF config on separate lines. I'm sure yaml is OK with that formatting, but it makes things confusing.
  6. I actually think that amcl is the better way to go in this instance. If your beacon positions are noisy, then you need to make sure that noise is represented in their covariance. I'm not sure how that data is getting used by amcl, but even noisy pose estimates should really just serve as another measurement source to the particle filter. The EKF will allow you to reject beacon poses based on Mahalanobis distances, but that's an advanced parameter that is hard to tune.
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-10-24 05:30:54 -0500

Seen: 88 times

Last updated: Nov 12 '20