This repository is a fork of DRL-robot-navigation with modifications to run with the Turtlebot3 and its 2D lidar sensor. All the base behavior should be credited to the original author. The fork however changes the structure of the project so everything can be executed directly via ROS.
- Clone the repository
git clone -b ros2 https://github.com/TannerGilbert/DRL-robot-navigation --recursive
- Install Python dependencies
pip3 install -r requirements.txt
- Build workspace
colcon build --symlink-install
Training can be started via:
ros2 launch td3_rl train_td3.launch.py
Note: Training can be sped up by increasing the simulation speed in the Gazebo environment. This can be done by changing the
real_time_update_rate
inTD3.world
. For example setting it to0
will make the simulation run as fast as possible.
The training can be configured inside the td3_config.yaml file.
Check training progress with Tensorboard:
$ cd src/TD3
$ tensorboard --logdir runs
After training, the model can be tested with the following command:
ros2 launch td3_rl test_td3.launch.py
The default behaviour for the inference script is to run indefinitetly until the robot crashes. If the environment should also be reset after a certain time td3_params/max_ep
needs to be set to a positive value.
This repository builds on the work of Reinis Cimurs.