Skip to content
项目

reiniscimurs/DRL-Robot-Navigation-ROS2

在 GitHub 查看

关于

在 ROS2 Gazebo 仿真器中,使用深度强化学习实现移动机器人导航。机器人通过 DRL(SAC、TD3)神经网络,在仿真环境中学习前往随机目标点并避开障碍物。

系统与基础设施

这些数字如何统计

实测星标增长

24小时
0
7天
+1
15天
+2
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

DRL-Robot-Navigation-ROS2

Deep Reinforcement Learning for mobile robot navigation in ROS2 Gazebo simulator. Using DRL neural network (TD3, SAC), a robot learns to navigate to a random goal point in a simulated environment while avoiding obstacles. Obstacles are detected by laser readings and a goal is given to the robot in polar coordinates. Trained in ROS Gazebo simulator with PyTorch. Tested with ROS2 Foxy on Ubuntu 20.04 with python 3.8.10 and pytorch 1.10.0+cu113.

Training example:

ROS2 adapted from: https://github.com/tomasvr/turtlebot3_drlnav
TD3 adapted from: https://github.com/reiniscimurs/DRL-robot-navigation
SAC adapted from: https://github.com/denisyarats/pytorch_sac

Installation (Under Construction)

Main dependencies:

Clone the repository:

$ cd ~
### Clone this repo
$ git clone https://github.com/reiniscimurs/DRL-Robot-Navigation-ROS2.git

Install rosdep and colcon:

$ cd ~/DRL-Robot-Navigation-ROS2
$ sudo apt install python3-rosdep2
$ rosdep update
$ rosdep install -i --from-path src --rosdistro foxy -y
$ sudo apt update
$ sudo apt install python3-colcon-common-extensions # install colcon
$ colcon build

Setting up the sources:

$ export ROS_DOMAIN_ID=1
# Fill in the path to where you cloned the repository
$ export DRLNAV_BASE_PATH=~/DRL-Robot-Navigation-ROS2
# Source the path to models
$ export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:~/DRL-Robot-Navigation-ROS2/src/turtlebot3_simulations/turtlebot3_gazebo/models
# Export the type of robot you want to use
$ export TURTLEBOT3_MODEL=waffle
$ source /opt/ros/foxy/setup.bash
$ source install/setup.bash

To start gazebo simulator open a terminal and set up the sources (commands from above):

$ ros2 launch turtlebot3_gazebo ros2_drl.launch.py

To launch training, open another terminal and set up the same sources:

$ cd ~/DRL-Robot-Navigation-ROS2
$ python3 src/drl_navigation_ros2/train.py

To observe training in rviz, open a new terminal and run:

$ rviz2

To launch the tensorboard, open a new terminal and run:

$ cd ~/DRL-Robot-Navigation-ROS2
$ tensorboard --logdir runs

探索相关项目

加载中…