💫 A goal-driven mapless end-to-end autonomous navigation of unmanned grounded vehicle (UGV) realized through Transformer-enabled deep reinforcement learning (DRL) algorithm.
🚙 A car-like mobile robot learns to autonomously navigate to a random goal position only through raw RGB images from one Fisheye camera and goal information in polar coordination system.
🔧 Realized in ROS Gazebo simulator with Ubuntu 20.04, ROS noetic, and Pytorch.
If you find this repository useful for your research, please consider starring ⭐ our repo and citing our paper.
@ARTICLE{huang2023goal,
author={Huang, Wenhui and Zhou, Yanxin and He, Xiangkun and Lv, Chen},
journal={IEEE Transactions on Intelligent Transportation Systems},
title={Goal-Guided Transformer-Enabled Reinforcement Learning for Efficient Autonomous Navigation},
year={2023},
volume={},
number={},
pages={1-14},
doi={10.1109/TITS.2023.3312453}}
Click the gif to zoom in 🔎
👉 GTRL Sim-to-Real Navigation Experiment Video 👈
1️⃣ ROS Noetic
2️⃣ Gazebo
3️⃣ Pytorch
Specify your own name for the virtual environment, e.g., gtrl:
conda create -n gtrl python=3.7
conda activate gtrl
pip install numpy tqdm natsort cpprb matplotlib einops squaternion opencv-python
sudo apt install python3-catkin-tools python3-osrf-pycommon
sudo apt-get install ros-noetic-cv-bridge
conda install spyder==5.2.2
cd to your workspace and clone the repo.
git clone https://github.com/OscarHuangWind/DRL-Transformer-SimtoReal-Navigation.git
cd ~/$your workspace/DRL-Transformer-SimtoReal-Navigation/catkin_ws
catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3
export PYTHONPATH=~/$your workspace/DRL-Transformer-SimtoReal-Navigation/catkin_ws/src/gtrl/scripts
export GAZEBO_RESOURCE_PATH=~/$your workspace/DRL-Transformer-SimtoReal-Navigation/catkin_ws/src/gtrl/launch
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ros/noetic/lib
Alternatively, you can select to write these variables to the ~/.bashrc file so that it can be automatically set when opening terminal.
source devel/setup.bash
Copy all the files under models folder to your default gazebo models folder.
cp -a ~/$your workspace/DRL-Transformer-SimtoReal-Navigation/catkin_ws/src/gtrl/models/. ~/.gazebo/models
import sys
sys.path.append('/home/$your workspace/DRL-Transformer-SimtoReal-Navigation/catkin_ws/src/gtrl/scripts')
cd ~/$your workspace/DRL-Transformer-SimtoReal-Navigation/catkin_ws/src/gtrl/scripts/SAC
Run it in the terminal:
python main.py
(Optional) Alternatively, if you have already installed spyder, just click the run file button in spyder.
killall -9 rosout roslaunch rosmaster gzserver nodelet robot_state_publisher gzclient python python3
Alternatively, you can add alias of these commands to the ~/.bashrc file:
alias k9='killall -9 rosout roslaunch rosmaster gzserver nodelet robot_state_publisher gzclient python python3'
And type the alias in the terminal to kill all the process:
k9