Jan 2021 - Mar 2021, Northwestern ME-495 Sensing, Navigation and Machine Learning for Robotics

I. Introduction

This is the final project of the course ME-495 Sensing, Navigation and Machine Learning for Robotics.

Purpose and scope

The main goal of this project is to implement the kinematics, sensory system and SLAM (Feature-Based Kalman Filter) for the Turtlebot from scrach. The result of the project is demonstrated in RVIZ simulation.

Turtlebot

TurtleBot3 is a small, affordable, programmable, ROS-based mobile robot for use in education, research, hobby, and product prototyping. It dramatically reduce the size of the platform required and lower the price without having to sacrifice its functionality and quality, while at the same time offering expandability.

The TurtleBot3’s core technology is SLAM, Navigation and Manipulation, making it suitable for the purpose of this project. The TurtleBot can run SLAM(simultaneous localization and mapping) algorithms to build a map and can drive around your room. Also, it can be controlled remotely from a laptop, joypad or Android-based smart phone.

However, in the scope of this project, everything was built from scratch (even some fundamental libraries), without using any of those built-in functionalities.


II. Key ROS Packages

Robot Description

This package contains the URDF files and basic debugging, testing and visualization code for the Turtlebot.

The key parameters can be adjusted externally within the corresponding yaml file.

Rigi2d Library

This library provides the basic calculations for the rigid 2D transforms.

Important classes:

Transform2D: Defines a rigid body transformation in 2 dimensions and its corresponding oeprations

Vector2D: Defines 2-Dimensional Vector and its corresponding operations

Twist2D: Defines 2-Dimensional Twist and its corresponding operations

Pose2D: Stores the 2D pose of the robot, including x, y and theta

Diff_drive Library

This library consists the key modeling of the kinematics of a differential drive robot with a given wheel base and wheel radius.

Important functions:

wheel_twist: Convert a desired twist to the equivalent wheel velocities required to achieve that twist

body_twist: Convert wheel velocities to body twist of the robot

update_pose: By taking in the new wheel positions of the robot from the encoders, calculate the new pose(x, y and theta) of the robot by performing rigid 2D transforms

Turtlebot Simulation

This package creates a simulated environment for the SLAM operation. Those tubes and walls shown in the video at the top are all defined in this package.

What it does is to publish fake laser scanner data generated based on the simulated environment as if the robot was detecting those objects in real life.

Feature-Based Kalman Filter SLAM

The feature-based kalman filter basically combines the information from both the odometry model and the measurement model and makes estimation of the current position of the robot and the important environment landmarks.

The odometry update is performed by computing the encoder readings and transfered with forward kinematics.

The measurement model relates the system states to the measurements of the environment landmarks (tubes in this case)

After the two models are established, a prediction of the robot’s next pose is made based on the odometry model. Then an update of the position of the robot and the environment landmarks is made based on the measurement model.

Each incoming measurement is associated with an existing landmark state unless it is the first time that the robot has seen the landmark. And since the correspondence between the measurements and the landmarks is made, duplicated detection of landmarks can be prevented.


III. System Performance

In general the whole system performs quite consistently while in low speed. As shown in the video at the top, the red trace indicates the odometry model path of the robot which is largely deviated from the blue and green traces which indicates the robot’s real path and the SLAM model path.

Such a deviation is caused by the robot hitting one of the landmarks and get stuck, while the wheels are keep spinning which makes the odometry think that it is still moving forward.

The SLAM model was proven to compensate such deviation from odometry by making updates based on its measurements of the surrounding environment landmarks and therefore is proven to be functional and successful for the scope of this project.

VI. Future Work

  • Perform real life test of the SLAM system
  • Implement other kinds of SLAM models and compare the results.

Github Page:

Since it is the final project of a course of the Northwestern University, the github page is kept private to prevent potential plagiarism.