:dizzy: A goal-driven mapless end-to-end autonomous navigation of unmanned grounded vehicle (UGV) realized through Transformer-enabled deep reinforcement learning (DRL) algorithm.
:blue_car: 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.
:wrench: 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 :star: our repo and citing our paper.
@article{huang2024goal,
title={Goal-Guided Transformer-Enabled Reinforcement Learning for Efficient Autonomous Navigation},
author={Huang, Wenhui and Zhou, Yanxin and He, Xiangkun and Lv, Chen},
journal={IEEE Transactions on Intelligent Transportation Systems},
volume={25},
number={2},
pages={1832--1845},
year={2024},
publisher={IEEE}
}
Click the gif to zoom in :mag_right:
:point_right: GTRL Sim-to-Real Navigation Experiment Video :point_left:
:one: ROS Noetic
:two: Gazebo
:three: 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 rospkg rosnumpy yaml
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 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
main.py
import sys
sys.path.append('/home/$your workspace/DRL-Transformer-SimtoReal-Navigation/catkin_ws/src/gtrl/scripts')
env_lab.py (line 129)
fullpath = os.path.join('/home/$your workspace/DRL-Transformer-SimtoReal-Navigation/catkin_ws/src/drl_navigation/launch', launchfile)
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