Skip to content

Latest commit

 

History

History
107 lines (71 loc) · 3.61 KB

README.md

File metadata and controls

107 lines (71 loc) · 3.61 KB

Line Trace DQN

Line trace robot simulation with reinforcement learning, Deep Q-Network.

The final report of "Intelligent Informatics", Creative Informatics, the University of Tokyo.

Requirements

  • Ubuntu 18.04
  • ROS Melodic
  • Python 3.6.x (must be installed on the system like /usr/bin/python3)

Installation

Clone packages.

$ mkdir -p ~/catkin_ws/src  
$ cd ~/catkin_ws/src  
$ wstool init .  
$ wstool set --git line_trace_dqn [email protected]:ketaro-m/line_trace_dqn.git -y  
$ wstool update  
$ wstool merge -t . line_trace_dqn/.rosinstall  
$ wstool update  

Build packages.

$ cd ..  
$ rosdep install -y -r --from-paths src --ignore-src  
$ source /opt/ros/${ROS_DISTRO}/setup.bash  
$ catkin build line_trace_dqn  
$ source ./devel/setup.bash

Usage

1. Launch Gazebo simulator

$ roslaunch line_trace_dqn turtlebot3_linetrace.launch  

(ex. Python sample scripts)

$ roslaunch line_trace_dqn test_rospy.launch script:=follower  

2. Train DQN

$ roslaunch line_trace_dqn result_graph.launch # realtime score/action plot  
$ # roslaunch line_trace_dqn turtlebot3_dqn_train.launch --ros-args # see the parameter descriptions  
$ roslaunch line_trace_dqn turtlebot3_dqn_train.launch lr:=0.1  

3. Plot learning results

$ rosrun line_trace_dqn log_plotter.py  

References

Gazebo setup

Gazebo Tips

Python3

Sample

OpenCV

DQN