I am starting to set up awesome robot_localization package and I am using rotary encoders (
nav_msgs/Odometry, both pose and twist) and IMU (
sensor_msgs/Imu) which provides continuous data and Ultrawide band sensor which provides global absolute position data as a
nav_msgs/Odometry message (only pose, (x,y and yaw)) . As suggested on the wiki page of the package, I can fuse data from the encoders and the IMU in the
odom_frame which gives the transform
odom_frame -> base_link_frame. For the
map_frame, I can fuse data from rotary_encoders, IMU and Ultrawide band sensor (It is similar to GPS in the sense that it provides global absolute position data) and it gives the transfrom from
map_frame -> odom_frame but next I am using amcl to improve the pose_estimate and amcl also provides
map_frame->odom_frame transformation. So, I want to ask how should I deal with the transformations (specifically
map_frame->odom_frame), Should I just not use the
map_frame->odom_frame transformation from
robot_localization and let amcl take care of it, If yes how can I not use the transformation? Or is there any better way to deal with it?
If I give output of AMCL and UWB to second instance of
ekf_localization_node, it will give me the required transformation (
map_frame -> odom_frame) and will publish the output odometry message on
odometry/filtered topic but I am using move_base which expects robot pose on
/amcl_pose topic. So, I can remap the output on
amcl_pose and change the message type from
geometry_msgs/PoseWithCovarianceStamped, Does that sound okay?
Also, another approach which I am thinking is to run the first instance of
odom_frame) with rotary encoders and IMU as input which will give
odom_frame->base_link_frame transformation and then run second instance of
map_frame) with UWB, rotary encoders and IMU as input. I am slightly confused about how the second instance will work. Will it modify the
odom_frame -> base_link_frame tf by considering (or changing) the data from UWB in the
odom_frame? If yes, then I can directly use the modified
odom_frame->base_link_frame tf (which includes UWB, encoders and IMU) (and ignore
map_frame->odom_frame tf from second instance of
ekf_localization_node) in amcl and everything should be fine, right?
Thanks @Tom Moore for the answer! So just to clarify, run the first instance of
odom_frame with wheel odometry and IMU data as input which will give us the
odom_frame -> base_link_frame transformation. Then run the second instance of the
ekf_localization_node in the
map_frame with wheel odometry, IMU data, UWB data (it is in
amcl_pose which will give us the
map_frame -> odom_frame transformation using existing
odom_frame -> base_link_frame tf.
Thanks in advance.
Post score: 3
Comment by Tom Moore on 2015-09-25:
Re: edit 2, yes, sounds correct.
Comment by Naman on 2015-09-25:
Thanks a lot! :)
Comment by Punith on 2015-11-19:
@Naman In this case, How are you setting the initial pose in amcl? I mean do you use Rviz 2D Pose estimate or update the initial pose from UWB sensor as both are in map frame.
Comment by asimay_y on 2016-06-14:
hi, dear @Naman, did you solve this issue in reality? I'm doing same study on real UAV, but got very bad effect. could you please instruct me on this? thank you very much!
Comment by asimay_y on 2016-06-14:
dear @Naman, my issue is at here, i'm doing real experiment on UAV: http://answers.ros.org/question/236403/tf-problems-when-combine-robot_localization-gps-navigation-amcl-stack/