Setting the configuration file for turtlebot_localization package Exercise 1.3

I tried to update the initial state of the robot config file in the turtlebot localization, but still i n RVIZ the /odometry/filtered and /noisy_odom are offset from each other. I have tried publishing to /cmd_vel topic after I have started both the nodes for noisy_odom and the turtlebot_localization package.
, so that the robot starts in the [0,0] position. I even used the initial_state parameter in the configuration file as mentioned in the exercise.

Also I would like to know is my line of reasoning for imu0: /imu/data in the param file is correct :

  1. Upon checking the /imu/data topic , I observed the we are measuring the Orientation, Angular Velocities and Linear Acceleration.

  2. No position change is measured, we observe orientation change only along Yaw axis(True value), no linear velocities are measured, we do measure the angular velocity along the Yaw axis(True) and finally we measure the linear acceleration along the x-axis(True).

  3. Also, I am a bit confused about why we are not including the y-axis linear acceleration. Does this have to do with the fact that we are only publishing x-direction linear velocity to the robot?

Also the frame setting for the map_frame is simply map. I checked the rviz available frames, but there isnt any map frame available. Is this (map) a default frame used when we use rviz?

Hello @vanguard478 ,

The initial_state variable is used to correct this offset. For instance, if your robot starts in the position [-1,-1] w.r.t the world origin, then you would set this variable to:

initial_state: [-1.0, -1.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]
  1. That is correct

  2. That is also correct.

  3. Exactly. Since this is a differential drive robot (you can send velocities in the Y axis), it does not make sense to measure accelerations in the Y axis.

  4. For this example, the map_frame is not used since we are not publishing any kind of external map. So you can comment out this parameter.

Hope this helps!

1 Like

Thanks a lot for the clarification.
Regarding the 3rd Point:
I am a bit confused as the robot can have accelerations in x,y-axes.
Just to confirm, even if we were sending y- axis velocities to /cmd_vel topic , even then we would be just using(considering the last row for linear accelerations) a True value for imu0: /imu/data configuration in x-direction only and False for y-direction as this is a differential drive where motors can accelerate the bot only along x-axis and rotate the bot by using different accelerations on Left and right wheels. So basically there is no intrinsic acceleration along the y-axis for a differential drive.

Exactly, you are right.