Skip to content

Deep Koopman Representation of Control for Autonomous Driving in F1TENTH Simulation Environment

Notifications You must be signed in to change notification settings

ARMLabCUICAR/F1TENTH-Koopman-Deploy

 
 

Repository files navigation

Deep Koopman Representation of Control for Autonomous Driving in F1TENTH Simulation Environment

Overview

This repository offer 3 different controllers to fulfill autonomous vehicle control: Pure pursuit, nonlinear model predictive control and deep koopman model predictive control.

Prerequisite

  1. Go to f1tenth official github page and follow the environment setup instruction: https://github.com/f1tenth/f1tenth_simulator
  2. Install ROS melodic on ubuntu 18.04: http://wiki.ros.org/melodic/Installation/Ubuntu
  3. Install required ROS package
sudo apt-get install ros-melodic-move-base ros-melodic-navigation ros-melodic-teb-local-planner python3-catkin-pkg-modules python3-rospkg-modules python3-empy
  1. Install necessary python package
pip3 install numpy cvxpy casadi csv os
  1. Build the working directory in python 3
roscd && cd ..
wstool init
wstool set -y src/geometry2 --git https://github.com/ros/geometry2 -v 0.6.5
wstool up
rosdep install --from-paths src --ignore-src -y -r
  1. Compile workspace with python3
catkin_make --cmake-args \
            -DCMAKE_BUILD_TYPE=Release \
            -DPYTHON_EXECUTABLE=/usr/bin/python3 \
            -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m \
            -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so
  1. Set the racing track to berlin for this experiment
  • Open simulator.launch file in f1tenth_simulator/launch directory
roscd f1tenth_simulator/launch
nano simulator.launch
  • Change the map argument from levine.yaml to berlin.yaml
  1. Run the predefined rviz environment in the simulator
  • Copy the simulator_2.rviz to f1tenth_simulator/launch directory
  • Open the same launch file as in the previous directory and change the simulator.rviz file to simulator_2.rviz at the bottom of the file

Run controllers

  1. Adaptive Pure pursuit
$ roslaunch f1tenth_simulator pure_pursuit.launch
  1. Nonlinear MPC based on kinematic bicycle model
$ roslaunch f1tenth_simulator kinematic_nonlinear_mpc_global.launch
  1. Koopman MPC
$ roslaunch f1tenth_simulator koopman_mpc_global.launch

About

Deep Koopman Representation of Control for Autonomous Driving in F1TENTH Simulation Environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 89.6%
  • MATLAB 10.4%