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

Revision history [back]

Here is your EKF config:

    odom_frame: odom 
    base_link_frame: base_link

So you are telling it that your world frame is odom and your body frame is base_link.

Then you give it measurements. In a nav_msgs/Odometry message, the pose data is reported in the header.frame_id frame, and the velocity data is reported in the child_frame_id. The pose data will always need to be transformed to your world frame (odom) before the filter can use it, and the velocity data will always need to be transformed to your body frame (base_link).

Your camera data is also in the odom frame, so it's happy to use the pose data from it (no transform is needed, because that's the same as your EKF config). However, your camera velocity data is in the camera_base_link frame, so you need to provide a transform from base_link->camera_base_link, or the EKF won't know how to transform that data. Use a static_transform_publisher or something.

header:
  stamp:
    sec: 1611602305
    nanosec: 640852033
  frame_id: odom  # This matches your EKF config, so no transform is needed
child_frame_id: camera_base_link  # This requires a transform to your base_link frame

Similarly, your wheel encoder data velocity is in a frame called wheel_base_link. So you need to provide the transform from base_link->wheel_base_link (or change the wheel odom child_frame_id to base_link).

header:
  stamp:
    sec: 1611604450
    nanosec: 440700380
  frame_id: odom
child_frame_id: wheel_base_link  # This requires a transform to your base_link frame