# Setting the configuration file for turtlebot\_localization package Exercise 1.3

**URL:** <https://get-help.theconstruct.ai/t/setting-the-configuration-file-for-turtlebot-localization-package-exercise-1-3/13492>\
**Category:** Robot Localization With Sensor Data\
**Created:** [October 31, 2021, 11:28pm UTC](https://get-help.theconstruct.ai/t/setting-the-configuration-file-for-turtlebot-localization-package-exercise-1-3/13492 "2021-10-31T23:28:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vanguard478](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/vanguard478/32/3335_2.png) [@vanguard478](https://get-help.theconstruct.ai/u/vanguard478)\
**Post date:** [October 31, 2021, 11:28pm UTC](https://get-help.theconstruct.ai/t/setting-the-configuration-file-for-turtlebot-localization-package-exercise-1-3/13492/1 "2021-10-31T23:28:21Z")

</div>

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.

 ![EKF](https://get-help.robotigniteacademy.com/uploads/default/original/2X/8/8e3e165a5787988a7491bab89f901bed00df55a3.jpeg)

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?

---

<div class="post-metadata">

**Author:** ![albertoezquerro](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/albertoezquerro/32/7031_2.png) [@albertoezquerro](https://get-help.theconstruct.ai/u/albertoezquerro)\
**Post date:** [November 2, 2021, 9:31am UTC](https://get-help.theconstruct.ai/t/setting-the-configuration-file-for-turtlebot-localization-package-exercise-1-3/13492/2 "2021-11-02T09:31:20Z")

</div>

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:

```auto
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!

---

<div class="post-metadata">

**Author:** ![vanguard478](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/vanguard478/32/3335_2.png) [@vanguard478](https://get-help.theconstruct.ai/u/vanguard478)\
**Post date:** [November 2, 2021, 12:24pm UTC](https://get-help.theconstruct.ai/t/setting-the-configuration-file-for-turtlebot-localization-package-exercise-1-3/13492/3 "2021-11-02T12:24:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![albertoezquerro](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/albertoezquerro/32/7031_2.png) [@albertoezquerro](https://get-help.theconstruct.ai/u/albertoezquerro)\
**Post date:** [November 3, 2021, 9:53am UTC](https://get-help.theconstruct.ai/t/setting-the-configuration-file-for-turtlebot-localization-package-exercise-1-3/13492/4 "2021-11-03T09:53:03Z")

</div>

Exactly, you are right.
