Autonomous-DriftingAutonomous Drifting using Reinforcement Learning
Autonomous-Drifting
Autonomous Drifting using Reinforcement Learning
Installation
- sudo ./setup_env.sh
- cd fyp_ws
- catkin_make
- . devel/setup.bash (add
source [full path to setup.bash]in your .bashrc) - roscd drift_car_env/scripts/
- sudo pip install -e .
- roscd drift_car/scripts/rl
- sudo pip install -r requirements.txt
The first time you open Gazebo, it will download all models from the Gazebo servers, which may take some time. Run rosrun gazebo_ros gazebo to run Gazebo and install models.
Commands
| To run | Command |
|---|---|
| ROS Core | roscore |
| Gazebo Simulator | roslaunch drift_car_gazebo drift_car.launch |
| Controller | roslaunch drift_car_gazebo_control drift_car_control.launch |
| Keyboard Teleop | rosrun drift_car_gazebo_control teleop_gazebo.py |
| Joystick Gazebo Controller | rosrun drift_car_gazebo_control joystick_gazebo.py |
| Joystick Car Controller | rosrun drift_car_gazebo_control joystick_car.py |
| Double Dueling Deep Q-Network | rosrun drift_car main.py |
PILCO
- Install MATLAB, enabled with Robotics System Toolbox.
- Add src/drift_car/scripts/rl/modules and src/drift_car/scripts/rl/pilco to MATLAB path.
- Start the bridge library with
rosrun drift_car_env matlab_bridge.py. - To train -
drift_car_learn. - To apply learned controller -
applyController.
Car Model
To run using the Monster Truck, rosed drift_car_gazebo drift_car.launch and toggle the comments to load truck.xacro.urdf.
评论
