Giter Club home page Giter Club logo

localization-stack's Introduction

localization-stack

This ROS Package is for robot localization. When we have more than one localizatin sensor in our robot, we can fuse them to get a better odometry data. For sensor fusion, we use extended kalman filter. To learn in-depth about this package, please read my article how to use robot_localizaiton package. To use this package, you need any two of the following ROS messages:

1.nav_msgs/Odometry 2.geometry_msgs/TwistWithCovarianceStamped 3.sensor_msgs/IMU 4.geometry_msgs/PoseWithCovarianceStamped

We can fuse any two messages and will get a better odometry message as output.

Implementation Details:

First, install the package using sudo apt install ros-$ROS_DISTRO-robot-localization. We will use Gazebo Husky Robot Simulation. In this simulation, we will have a 4 wheel robot equipped with wheel encoder, IMU, GPS, and a LiDAR.

To install the Husky robot, run the following commands.

sudo apt install ros-$ROS_DISTRO-husky-simulator

Add the following line in your bashrc file.

export HUSKY_GAZEBO_DESCRIPTION=$(rospack find husky_gazebo)/urdf/description.gazebo.xacro

Connect a Logitech Gamepad F710 to your computer. We will use the joystick to control the robot. Then run the following commands too:

source ~/.bashrc 
roslaunch husky_gazebo husky_playpen.launch

You will see gazebo simulator starts along with all required plugins. You can find all the published topics from gazebo through rostopic list and see we have IMU messages published in /imu/data topic publishing IMU messages and /husky_velocity_controller/odom topic publishing wheel encoder odometry messages from the simulation. We will fuse these two messages to get a more accurate odometry.

Assuming you already have a catkin workspace, go to catkin_ws/src/ directory. Then run the following commands to install this package.

git clone https://github.com/zillur-av/localization-stack.git
cd ..
catkin_make
roslaunch localization-stack ekf_localization_local.launch

This will start the robot_localization package and you will see two odometry messages in the rviz window. Then, move the robot using the gamepad and you see two odometry messages get updated. The red color message is the wheel encoder odometry and the green color one is the fused odometry from our package.

Results

To understand whether our sensor fusion method works or not, move the robot. The ground/floor where the robot is moving is not perfect and as a result, you will see sometimes though the wheels are rotating, the robot is not moving. That will make a difference between two odom messages. Move the robot around and come back to the initial position. You will see the fused odom(the robot itself in rviz) gets back to initial position while the non filtered one does not.

Acknowledgement

localization-stack's People

Contributors

zillur-av avatar

Stargazers

 avatar  avatar

Watchers

 avatar

localization-stack's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.