Repo symbol

autonomous_mobile_robots repository

localization particle-filter mobile-robots pid-control kalman-filter lqr extended-kalman-filters pd-controller lqr-controller mpc-control differential-drive-robot trajectory-tracking-mpc lqr-differential-drive
Repo symbol

autonomous_mobile_robots repository

localization particle-filter mobile-robots pid-control kalman-filter lqr extended-kalman-filters pd-controller lqr-controller mpc-control differential-drive-robot trajectory-tracking-mpc lqr-differential-drive
Repo symbol

autonomous_mobile_robots repository

localization particle-filter mobile-robots pid-control kalman-filter lqr extended-kalman-filters pd-controller lqr-controller mpc-control differential-drive-robot trajectory-tracking-mpc lqr-differential-drive
Repo symbol

autonomous_mobile_robots repository

localization particle-filter mobile-robots pid-control kalman-filter lqr extended-kalman-filters pd-controller lqr-controller mpc-control differential-drive-robot trajectory-tracking-mpc lqr-differential-drive
Repo symbol

autonomous_mobile_robots repository

localization particle-filter mobile-robots pid-control kalman-filter lqr extended-kalman-filters pd-controller lqr-controller mpc-control differential-drive-robot trajectory-tracking-mpc lqr-differential-drive hagen_gazebo hagen_gazebo1 hagen_control

Repository Summary

Description This repository contains different aspects of autonomous mobile robots including motion, control, and estimation. PID, LQR, and MPC controllers for differential drive robot are developed with ROS2. In addition, some filters are covered such as particle filter and ekf for localization.
Checkout URI https://github.com/walid-khaled/autonomous_mobile_robots.git
VCS Type git
VCS Version master
Last Updated 2023-03-07
Dev Status UNKNOWN
Released UNRELEASED
Tags localization particle-filter mobile-robots pid-control kalman-filter lqr extended-kalman-filters pd-controller lqr-controller mpc-control differential-drive-robot trajectory-tracking-mpc lqr-differential-drive
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
hagen_gazebo 1.0.0
hagen_gazebo1 0.4.0
hagen_control 0.0.0

README

Autonomous Mobile Robots

This repository contains an implementation of the Autonomous Mobile Robots course for ROCV master’s program at Innopolis University. The course is instructed by Geesara Prathap. So, this repository contains the course material besides my solutions for the assignments. In addition, I developed PID, LQR controllers for a differential drive robot. Trajectory-tracking error model was developed for applying MPC controller.

The course contents includes:

  • Motion control (Kinematics, control, and dubins path planning).
  • Estimation (Kalman filter, extended kalman filter, particle filter).
  • Localization (Monte carlo, and ekf localization).

Setup

  1. Install at least one simulator: Gazebo

  2. Install the appropriate ROS 2 version as instructed: here.

  3. Clone the repository:

    mkdir -p ~/ros2_ws/src
    cd ~/ros2_ws/src
    git clone https://github.com/Walid-khaled/autonomous_mobile_robots.git
    
  4. Install dependencies:

    cd ~/ros2_ws
    rosdep install --from-paths src --ignore-src -r -y
    
  5. Build and install:

    cd ~/ros2_ws
    colcon build
    

Run

Gazebo-classic

If you had Gazebo installed when compiling Hagen’s packages, Gazebo support should be enabled.

  1. Setup environment variables (the order is important):

    . /usr/share/gazebo/setup.sh
    . ~/ros2_ws/install/setup.bash
    

    Tip: If the command ros2 pkg list | grep hagen_gazebo comes up empty after setting up the environment, Gazebo support wasn’t correctly setup.

  2. Launch Hagen in a city (this will take some time to download models):

    ros2 launch hagen_gazebo hagen.launch.py world:=hagen_city.world
    
  3. Launch Hagen in an empty world:

    ros2 launch hagen_gazebo hagen.launch.py world:=hagen_empty.world
    

    To avoid these steps, in your terminal, naviagate to the repository directory and make the file “run.sh” executable, then run it to start the simulation directly.

    cd ~/ros2_ws/src/autonomous_mobile_robots
    chmod +x run.sh
    ./run.sh
    
  4. In a new terminal:

    . ~/ros2_ws/install/setup.bash
    ros2 run hagen_control desired_controller
    desired_controller should be replaced with one of these executables (PID, LQR, MPC)
    
  5. To reset the simulation:

    ros2 service call /reset_simulation std_srvs/srv/Empty
    

Main results

Control Strategies:

In “hagen_control/hagen_control/hagen_control_strategy.py”, specify one of the following controller at the main() and timer_callback() functions:

  • Control to reference pose
  • Control to reference pose via an intermediate point
  • Control to reference pose via an intermediate direction
  • Reference path control

After the simulation finish, a plot will be genereated to visualize the odometery data with respect to the actual one. For example this is the output for reference path control.

Figure_1

As shown, the odom data diverge by time when reaching the path points without any feedback from the odometery data.

PD Controller

A PD controller was developed to incorporate the odometery data as feedback. It is implemented in 2 stages; reaching the target position and correcting the orientation.

https://user-images.githubusercontent.com/90580636/205747639-0930f718-3cef-40f2-9913-4f9b7f47750d.mp4

Figure_1

File truncated at 100 lines [see the full file](https://github.com/walid-khaled/autonomous_mobile_robots/tree/master/README.md)

Repo symbol

autonomous_mobile_robots repository

localization particle-filter mobile-robots pid-control kalman-filter lqr extended-kalman-filters pd-controller lqr-controller mpc-control differential-drive-robot trajectory-tracking-mpc lqr-differential-drive
Repo symbol

autonomous_mobile_robots repository

localization particle-filter mobile-robots pid-control kalman-filter lqr extended-kalman-filters pd-controller lqr-controller mpc-control differential-drive-robot trajectory-tracking-mpc lqr-differential-drive
Repo symbol

autonomous_mobile_robots repository

localization particle-filter mobile-robots pid-control kalman-filter lqr extended-kalman-filters pd-controller lqr-controller mpc-control differential-drive-robot trajectory-tracking-mpc lqr-differential-drive
Repo symbol

autonomous_mobile_robots repository

localization particle-filter mobile-robots pid-control kalman-filter lqr extended-kalman-filters pd-controller lqr-controller mpc-control differential-drive-robot trajectory-tracking-mpc lqr-differential-drive