~enan/ros-rl

RL implementations with ROS and Gazebo
td3: fix handling of data when using gpu device
td3: fix indexing in select_action
Update requirements

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~enan/ros-rl
read/write
git@git.sr.ht:~enan/ros-rl

You can also use your local clone with git send-email.

Lane Follower with Reinforcement Learning
=========================================

A lane-following vehicle is trained with reinforcement learning to
achieve minimal self-driving capabilities along a track. Currently it
only recognizes straight roads and left and right turns.



How to run
----------

1. Build and source the catkin package

    catkin_make
    source devel/setup.bash

2. Run the environment

    roslaunch driving_track run.launch

3. Set up a python environment for RL

    source venv/bin/activate
    pip install -r requirements.txt

4. Run the agent

    python src/qlearning.py # or
    python src/ddpg.py      # or
    python src/td3.py


Remarks
-------

o Q-Learning complete
  Q-learning is completely implemented. The agent trains well
  consistently and performs as desired.

o DDPG outdated
  Currently DDPG implementation is out-of-date with the utils and
  envs. TD3 is the main focus now. Once it's finished, DDPG will be
  updated to accommodate the changes made in utils and envs.

o Two-dimensional action space
  As of now TD3 can't train using (turn,speed) as action space. It
  didn't converge for 1d action space (turn) either, but in some
  episodes it resulted in good-enough returns. 2d action space should
  work, too. Probably needs hyperparam tuning.