# Kalman Filter with fiducials

**URL:** <https://forum.ubiquityrobotics.com/t/kalman-filter-with-fiducials/187>\
**Category:** General Questions\
**Created:** [October 26, 2018, 3:55am UTC](https://forum.ubiquityrobotics.com/t/kalman-filter-with-fiducials/187 "2018-10-26T03:55:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrissunny94](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/c/57b2e6/32.png) [@chrissunny94](https://forum.ubiquityrobotics.com/u/chrissunny94)\
**Post date:** [October 26, 2018, 3:55am UTC](https://forum.ubiquityrobotics.com/t/kalman-filter-with-fiducials/187/1 "2018-10-26T03:55:24Z")

</div>

In this topic , i will try to explain how kalman filter can be used in improving localization with the fiducial\_slam method .

In the case of magni , we have two sources of localization

- Directly from the wheel encoders (Odometry)

- The transform(s) coming from the Fiducials

_While the initial map is being build , its best that at least two fiducials are visible in the camera\_frame all the time . This way the transform of the fiducials with respect to the map will not be depend on the odometry coming from the encoders , think of the fiducial\_slam like our own local GPS system ._

That being said ,  
lets take a look at the published topics

- **Wheel\_encoder**  
/ubiquity\_motor\_controller/odom

- **/fiducial\_pose**

\*\*You may take a look at the below repository , since i dont have a robot right now , i have made a gazebo environment with Fiducials . It has a husky with a kinect sensor mounted \*\*

**[https://github.com/chrissunny94/husky](https://github.com/chrissunny94/husky)**

[https://github.com/chrissunny94/husky/blob/master/docs/husky.png?raw=true](https://github.com/chrissunny94/husky/blob/master/docs/husky.png?raw=true)

**The config file for the robot\_localization is here ,**  
[https://github.com/chrissunny94/husky/blob/master/fiducials/fiducial\_slam/params/ekf\_template.yaml](https://github.com/chrissunny94/husky/blob/master/fiducials/fiducial_slam/params/ekf_template.yaml)

I am still not clear about how to go about systematically tune the parameters to get the most optimum result but i will post on that in the days to come .

Cheers!

---

<div class="post-metadata">

**Author:** ![alexis](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/a/838e76/32.png) [@alexis](https://forum.ubiquityrobotics.com/u/alexis)\
**Post date:** [November 24, 2018, 10:39am UTC](https://forum.ubiquityrobotics.com/t/kalman-filter-with-fiducials/187/2 "2018-11-24T10:39:57Z")

</div>

Hi

Have you made progress on your attempts to use a kalman filter?  
Don’t you think the ultimate result could be improved by using an IMU? (such as this one that would directly connect on the PI and is natively compatible with ROS  
[https://www.robotshop.com/en/9-degrees-of-freedom-razor-m0-imu.html](https://www.robotshop.com/en/9-degrees-of-freedom-razor-m0-imu.html)  
[https://wiki.ros.org/razor\_imu\_9dof](https://wiki.ros.org/razor_imu_9dof)

Did you manage to get your hands on a real magni?

---

<div class="post-metadata">

**Author:** ![chrissunny94](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/c/57b2e6/32.png) [@chrissunny94](https://forum.ubiquityrobotics.com/u/chrissunny94)\
**Post date:** [November 25, 2018, 3:22am UTC](https://forum.ubiquityrobotics.com/t/kalman-filter-with-fiducials/187/3 "2018-11-25T03:22:37Z")

</div>

Yes I had the magni with me for a while , I was working on alternatives to an IMU such as visual odometry .

But I now realize that an IMU kalman filter fusion would have done a much better job as to obtaining a reliable odometry .I regret not having tried an IMUs such as what you suggested whilst I had the robot (Razor 9DOF that can easily be added to the Magni , via the USB ports.)

The configuration for IMU + encoder is easily available , check out the GitHub repos of husky or jackal . They use the robot\_localization package to do it .
