ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

understanding dual ekf outputs in robot_localization

asked 2022-09-17 08:11:25 -0500

elgarbe gravatar image

updated 2022-09-17 11:04:00 -0500

Hi, I have a robot with wheel encoders, RTK GPS and an IMU (with magnetometer). I run two EKF instances, the first one fuse encoders (velocity, not position), Yaw and Z axis angular velocity from the IMU. The second one adds the odometry_gpd from navsat_transform node. I get /odometry/filtered and /odometry/filtered_map topics The first one is from odom to base_link (header.frame_id=odom and child_frame_id = base_link), the second one is from map to base_link. Is that ok?

I made a test that get me confused. I put my robot in a table with the wheels on the air. I drive the motors forward (at 1 meter/sec). I look at tf on rviz. I was expecting that odom frame will move forward and base_link will be quiet at 0,0. But I see odom frame is in the same position that map frame and base_link moves forwards. That does not make sense to me, because it is likely the GPS is not correcting anything. I mean, let say that GPS is reporting at 1 Hz, so between two GPS readings I expect that odom frame does not moves and base_link moves forward 1 meter, (because of the wheel encoders), but as soon as the GPS report a new data then base_link will have to move at 0,0 (because the GPS is telling that the robot doesn't move at all) and odom frame will needs to move 1 meter forward in order to maintain consistency. Am I wrong? Is not the expected behavior?

EDIT 1: This is the rqt_graph image description

I made another test, I remove wheel encoders to the map EKF, now if I drive the motors with the wheels on the air the base_link frame is still with map frame and odom frame is moving. But if I let the robot run on the ground again the odom frame moves, but not base_link. It's likely something is disconected...

Thank and best regards.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-09-17 12:37:09 -0500

elgarbe gravatar image

Never mind. The filter was not using gps data because the timestamps of NavSat messages were in the future wrt to the ros time. ublox ros driver use GPS time and my OBC was out of date/time. Once I set the date/time on the RL computer it start working as expected.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-09-17 08:11:25 -0500

Seen: 146 times

Last updated: Sep 17 '22