Robotics StackExchange | Archived questions

How to set up robot_localization config when using differential: true

I was reading the robot_localization docs and it says that when setting the differential parameter to true:

all pose (position and orientation) data is converted to a velocity by calculating the change in the measurement value between two consecutive time steps. The data is then fused as a velocity.

Does this mean that my config should set the position data to true or the velocity data to true?

i.e.

odom1_config: [true, true, false, # X Y Z
           true, true, true, # ROLL PITCH YAW
           false, false, false, # VX VY VZ
           false, false, false, # VR VP VY
           false, false, false] # AX AY AZ

or

odom1_config: [false, false, false, # X Y Z
           false, false, false, # ROLL PITCH YAW
           true, true, false, # VX VY VZ
           true, true, true, # VR VP VY
           false, false, false] # AX AY AZ

This is for an outdoor skid steer robot (twodmode false), with the odometry source described above coming from a ZED camera. The ZED odom topic only provides pose data, no Twist.

Asked by jorgemia on 2020-11-02 10:03:39 UTC

Comments

Answers

I believe the former is correct. Since your odom source has no velocity data there is nothing there to use. If your camera is providing odometry then another question is where in your TF tree it is connected. Odom sources should always be children of the odom frame directly, while inertia sources should be off base_link (or equivalent). But I think the differential parameter does not change this, even if it feel like the nature of the source has been modified.

Asked by chfritz on 2020-11-03 11:49:20 UTC

Comments

Ok, I think that makes sense because you're basically telling r_l which values to use for the differential parameter right? And they're actually fused as a velocity with the other sensors, but you still define the source as the actual data coming from your sensor (in my case x, y, roll, pitch, yaw).

My Tf tree looks like this: map -> odom -> base_footprint -> base_link -> zed_camera_centre and it seems to work correctly.

Asked by jorgemia on 2020-11-03 12:08:45 UTC