Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 31 additions & 31 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
name: Run Tests

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Install dependencies
run: poetry install

- name: Run tests
run: poetry run pytest
name: Run Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: poetry install
- name: Run tests
run: poetry run pytest
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/.venv/
/runs/
/site/
/.venv/
/runs/
/site/
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions .idea/DRL-robot-navigation-IR-SIM.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

112 changes: 56 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
**DRL Robot navigation in IR-SIM**

Deep Reinforcement Learning algorithm implementation for simulated robot navigation in IR-SIM. Using 2D laser sensor data
and information about the goal point a robot learns to navigate to a specified point in the environment.

![Example](https://github.com/reiniscimurs/DRL-robot-navigation-IR-SIM/blob/master/out.gif)

**Installation**

* Package versioning is managed with poetry \
`pip install poetry`
* Clone the repository \
`git clone https://github.com/reiniscimurs/DRL-robot-navigation.git`
* Navigate to the cloned location and install using poetry \
`poetry install`

**Training the model**

* Run the training by executing the train.py file \
`poetry run python robot_nav/train.py`

* To open tensorbord, in a new terminal execute \
`tensorboard --logdir runs`



**Sources**

| Package | Description | Source |
|:--------|:-------------------------------------------------------------:|------------------------------------:|
| IR-SIM | Light-weight robot simulator | https://github.com/hanruihua/ir-sim |
| PythonRobotics | Python code collection of robotics algorithms (Path planning) | https://github.com/AtsushiSakai/PythonRobotics |


**Models**

| Model | Description | Model Source |
|:----------|:-----------------------------------------------------------------------------------------------:|----------------------------------------------------------:|
| TD3 | Twin Delayed Deep Deterministic Policy Gradient model | https://github.com/reiniscimurs/DRL-Robot-Navigation-ROS2 |
| SAC | Soft Actor-Critic model | https://github.com/denisyarats/pytorch_sac |
| PPO | Proximal Policy Optimization model | https://github.com/nikhilbarhate99/PPO-PyTorch |
| DDPG | Deep Deterministic Policy Gradient model | Updated from TD3 |
| CNNTD3 | TD3 model with 1D CNN encoding of laser state | - |
| RCPG | Recurrent Convolution Policy Gradient - adding recurrence layers (lstm/gru/rnn) to CNNTD3 model | - |

**Max Upper Bound Models**

Models that support the additional loss of Q values exceeding the maximal possible Q value in the episode. Q values that exceed this upper bound are used to calculate a loss for the model. This helps to control the overestimation of Q values in off-policy actor-critic networks.
To enable max upper bound loss set `use_max_bound = True` when initializing a model.

| Model |
|:-------|
| TD3 |
| DDPG |
| CNNTD3 |

**DRL Robot navigation in IR-SIM**
Deep Reinforcement Learning algorithm implementation for simulated robot navigation in IR-SIM. Using 2D laser sensor data
and information about the goal point a robot learns to navigate to a specified point in the environment.
![Example](https://github.com/reiniscimurs/DRL-robot-navigation-IR-SIM/blob/master/out.gif)
**Installation**
* Package versioning is managed with poetry \
`pip install poetry`
* Clone the repository \
`git clone https://github.com/reiniscimurs/DRL-robot-navigation.git`
* Navigate to the cloned location and install using poetry \
`poetry install`
**Training the model**
* Run the training by executing the train.py file \
`poetry run python robot_nav/train.py`
* To open tensorbord, in a new terminal execute \
`tensorboard --logdir runs`
**Sources**
| Package | Description | Source |
|:--------|:-------------------------------------------------------------:|------------------------------------:|
| IR-SIM | Light-weight robot simulator | https://github.com/hanruihua/ir-sim |
| PythonRobotics | Python code collection of robotics algorithms (Path planning) | https://github.com/AtsushiSakai/PythonRobotics |
**Models**
| Model | Description | Model Source |
|:----------|:-----------------------------------------------------------------------------------------------:|----------------------------------------------------------:|
| TD3 | Twin Delayed Deep Deterministic Policy Gradient model | https://github.com/reiniscimurs/DRL-Robot-Navigation-ROS2 |
| SAC | Soft Actor-Critic model | https://github.com/denisyarats/pytorch_sac |
| PPO | Proximal Policy Optimization model | https://github.com/nikhilbarhate99/PPO-PyTorch |
| DDPG | Deep Deterministic Policy Gradient model | Updated from TD3 |
| CNNTD3 | TD3 model with 1D CNN encoding of laser state | - |
| RCPG | Recurrent Convolution Policy Gradient - adding recurrence layers (lstm/gru/rnn) to CNNTD3 model | - |
**Max Upper Bound Models**
Models that support the additional loss of Q values exceeding the maximal possible Q value in the episode. Q values that exceed this upper bound are used to calculate a loss for the model. This helps to control the overestimation of Q values in off-policy actor-critic networks.
To enable max upper bound loss set `use_max_bound = True` when initializing a model.
| Model |
|:-------|
| TD3 |
| DDPG |
| CNNTD3 |
10 changes: 5 additions & 5 deletions docs/api/IR-SIM/ir-marl-sim.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MARL-IR-SIM

::: robot_nav.SIM_ENV.marl_sim
options:
show_root_heading: true
# MARL-IR-SIM
::: robot_nav.SIM_ENV.marl_sim
options:
show_root_heading: true
show_source: true
10 changes: 5 additions & 5 deletions docs/api/IR-SIM/ir-sim.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# IR-SIM

::: robot_nav.SIM_ENV.sim
options:
show_root_heading: true
# IR-SIM
::: robot_nav.SIM_ENV.sim
options:
show_root_heading: true
show_source: true
20 changes: 10 additions & 10 deletions docs/api/Testing/test.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Testing

::: robot_nav.test
options:
show_root_heading: true
show_source: true

::: robot_nav.test_random
options:
show_root_heading: true
# Testing
::: robot_nav.test
options:
show_root_heading: true
show_source: true
::: robot_nav.test_random
options:
show_root_heading: true
show_source: true
10 changes: 5 additions & 5 deletions docs/api/Testing/testrnn.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Testing RNN

::: robot_nav.test_rnn
options:
show_root_heading: true
# Testing RNN
::: robot_nav.test_rnn
options:
show_root_heading: true
show_source: true
10 changes: 5 additions & 5 deletions docs/api/Training/train.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Training

::: robot_nav.train
options:
show_root_heading: true
# Training
::: robot_nav.train
options:
show_root_heading: true
show_source: true
10 changes: 5 additions & 5 deletions docs/api/Training/trainrnn.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Training RNN

::: robot_nav.train_rnn
options:
show_root_heading: true
# Training RNN
::: robot_nav.train_rnn
options:
show_root_heading: true
show_source: true
10 changes: 5 additions & 5 deletions docs/api/Utils/replay_buffer.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Replay/Rollout Buffer

::: robot_nav.replay_buffer
options:
show_root_heading: true
# Replay/Rollout Buffer
::: robot_nav.replay_buffer
options:
show_root_heading: true
show_source: true
10 changes: 5 additions & 5 deletions docs/api/Utils/utils.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Utils

::: robot_nav.utils
options:
show_root_heading: true
# Utils
::: robot_nav.utils
options:
show_root_heading: true
show_source: true
10 changes: 5 additions & 5 deletions docs/api/models/DDPG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DDPG

::: robot_nav.models.DDPG.DDPG
options:
show_root_heading: true
# DDPG
::: robot_nav.models.DDPG.DDPG
options:
show_root_heading: true
show_source: true
12 changes: 6 additions & 6 deletions docs/api/models/HCM.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Hardcoded Model

::: robot_nav.models.HCM.hardcoded_model
options:
show_root_heading: true
show_source: true
# Hardcoded Model
::: robot_nav.models.HCM.hardcoded_model
options:
show_root_heading: true
show_source: true
12 changes: 6 additions & 6 deletions docs/api/models/MARL/Attention.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Hard-Soft Attention

::: robot_nav.models.MARL.hardsoftAttention
options:
show_root_heading: true
show_source: true
# Hard-Soft Attention
::: robot_nav.models.MARL.hardsoftAttention
options:
show_root_heading: true
show_source: true
Loading
Loading