Yet another problem with robot_localization and amcl
Hi there,
I've read several threads about robot_localization with amcl and odometry data, but I have not being able to make it work.
What I did:
amcl config file:
tf_broadcast: false
ekf config file
publish_tf: true map_frame: "/map" odom_frame: "/base_odom_link" base_link_frame: "/base_footprint_link" world_frame: "/map" odom0: "/dev/odom" pose0: "/amcl_pose"
The odometry/filtered
topic is almost the same as the /dev/odom
, which means it is filtering the odom_frame. This looked to me as if the ekf could not read the config file and went to its default settings. But I checked the rqt_graph and it listens to the right odom and pose topic.
If a set the tf_broadcast
of the amcl to true. The scan matches in RVIZ jump between the amcl and ekf tf, which is somehow the same as odom.
What am I missing?
Edit 1: in response to comments from @Nicholash Bedi
odom0_config: [true, true, false,
false, false, true,
true, true, false,
false, false, true,
false, false, false]
odom0_differential: true
odom0_relative: false
pose0_config: [true, true, false,
false, false, true,
false, false, false,
false, false, false,
false, false, false]
pose0_differential: false
pose0_relative: false
Edit 2: uploaded pics of my config files.
Hopefully you can see the error.
Edit 3 In response to @Tom Moore -> output of rostopic echo /amcl_pose and /dev/odom. I am sorry for the very very late response
odom
header:
seq: 161063
stamp:
secs: 1495189822
nsecs: 753257722
frame_id: base_odom_link
child_frame_id: base_footprint_link
pose:
pose:
position:
x: -0.0955580770969
y: -0.127791434526
z: 0.0
orientation:
x: 0.0
y: -0.0
z: -0.00566518455002
w: -0.999983952713
covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
twist:
twist:
linear:
x: 0.0
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.0
covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
amcl
header:
seq: 185
stamp:
secs: 1495187483
nsecs: 905225829
frame_id: /map
pose:
pose:
position:
x: 2.232329958
y: 4.91519891085
z: 0.0
orientation:
x: 0.0
y: 0.0
z: 0.692934073576
w: 0.721000949845
covariance: [0.0028978789516864722, -0.0026280780170626628, 0.0, 0.0, 0.0, 0.0, -0.0026280780170626628, 0.018904477044003443, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0 ...
What are your pose/odom config, differential, and relative set to?
Can you paste (a) your full launch/config files, and (b) sample messages from every input? Thanks!
(Just a heads-up: you have two sources of pose data measuring X and Y, and they are not going to agree).
Hi Tom, thx for the help. I noticed from the debug file (didn't look at the code) that the ekf node changes the frame ids from '/map' to 'map' and tries to work with pose with frame id '/map' so it throws an error. I changed my config from '/map' to '//map' and it seems to work.
I will still paste the launch/config files and sample messages from both inputs when I get the chance. Thanks!
Can you please post sample input messages? I would like to see one message from
/dev/odom
andamcl_pose
. My first guess is that you need to get rid of the forward slashes at the start of your frame names in the EKF config.@Tom Moore Sry for the late response