Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from refactoring #129

Merged
merged 55 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
b7d982c
feat: configify lidar
retinfai Oct 5, 2023
1bafaa6
Merge pull request #116 from UoA-CARES/feat/configiy-lidar
retinfai Oct 20, 2023
b47ac3c
chore: update train yaml
retinfai Oct 20, 2023
26c2df0
Merge pull request #117 from UoA-CARES/chore/update-train-yaml
retinfai Oct 20, 2023
d46ffd8
feat: add progress to carbeat reward
retinfai Oct 20, 2023
9532ea3
Merge pull request #118 from UoA-CARES/chore/update-train-yaml
retinfai Oct 20, 2023
8c6d56e
feat: clean carbeat
retinfai Oct 20, 2023
26508b9
Merge pull request #119 from UoA-CARES/chore/update-train-yaml
retinfai Oct 20, 2023
d7b34ef
chore: set up updated train
retinfai Oct 21, 2023
c8123d4
feat: add args parser
retinfai Oct 21, 2023
b2ded1b
feat: add CarTrack and CarBeat to env factory
retinfai Oct 21, 2023
0e9ac4f
feat: add CarWall to env factory
retinfai Oct 21, 2023
8610637
feat: add CarGoal and CarBlock to env factory
retinfai Oct 21, 2023
1d7c56a
feat: integrate Network and Memory factory
retinfai Oct 23, 2023
28b712c
feat: add off policy training loop
retinfai Oct 23, 2023
20e7ffe
feat: add off policy evaluation loop
retinfai Oct 23, 2023
efee927
refactor: move training loops to module
retinfai Oct 23, 2023
8b302b4
chore: add safe guards to algorithm training loop
retinfai Oct 23, 2023
33ffc13
feat: add ppo train and evaluate
retinfai Oct 23, 2023
a88e564
feat: make carbeat car names dynamic
retinfai Oct 23, 2023
99d62fb
feat: make car name dynamic CarTrack
retinfai Oct 23, 2023
44e103b
feat: make CarBlock car name dynamic
retinfai Oct 23, 2023
832fe24
feat: make CarWall car name dynamic
retinfai Oct 23, 2023
c908126
feat: make CarGoal car name dynamic
retinfai Oct 23, 2023
ce82cc1
Merge branch 'master' into refactor/migrate-to-newrecord
retinfai Oct 23, 2023
aadf280
Merge branch 'master' into feat/make-car-dynamic
retinfai Oct 23, 2023
345e562
Merge branch 'master' into chore/clean-up
retinfai Oct 23, 2023
a818bd3
chore: remove bash scripts
retinfai Oct 23, 2023
542bb85
chore: fix imports controller package
retinfai Oct 23, 2023
f8bf7f4
Merge branch 'chore/clean-up' into 122-clean-up-repository
retinfai Oct 23, 2023
4b67b18
chore: remove unused imports
retinfai Oct 23, 2023
4d99402
chore: replace train
retinfai Oct 23, 2023
8071953
refactor: update test loop to Record
retinfai Oct 23, 2023
9e2b398
Update README.md
retinfai Oct 23, 2023
28b8f07
Merge pull request #124 from UoA-CARES/feat/make-car-dynamic
emilysteiner71 Oct 23, 2023
4299a2f
Merge branch 'master' into refactor/migrate-to-newrecord
emilysteiner71 Oct 23, 2023
e25c0ea
Merge pull request #125 from UoA-CARES/refactor/migrate-to-newrecord
emilysteiner71 Oct 23, 2023
b64ca6e
Merge pull request #127 from UoA-CARES/122-clean-up-repository
emilysteiner71 Oct 23, 2023
c64bb4b
Merge pull request #128 from UoA-CARES/retinfai-patch-1
emilysteiner71 Oct 23, 2023
e3d5c23
feat: integrate pydantic models into training
retinfai Oct 24, 2023
776c992
feat: add parse obs to CarBeat
retinfai Oct 24, 2023
bf67d37
feat: add parse obs to CarBlock
retinfai Oct 24, 2023
f4922d8
feat: add parse obs to CarGoal
retinfai Oct 24, 2023
8154090
feat: add parse obs to CarTrack
retinfai Oct 24, 2023
712a248
feat: add CarWall to parse obs
retinfai Oct 24, 2023
575e27b
feat: add obs log to ppo train
retinfai Oct 24, 2023
3ab45e6
docs: add comments to CarBlock and CarBeat
retinfai Oct 24, 2023
e2dbcec
docs: update CarBlock comments
retinfai Oct 24, 2023
c42de19
docs: add env description to CarGoal
retinfai Oct 24, 2023
b4e53dd
docs: add env description to CarTrack
retinfai Oct 24, 2023
f0c3879
docs: update CarWall environment
retinfai Oct 24, 2023
a7be3ec
Merge pull request #135 from UoA-CARES/docs/add-environment-comments
retinfai Oct 25, 2023
90d1ad0
Merge pull request #133 from UoA-CARES/132-integrate-pydantic-config-…
retinfai Oct 25, 2023
3a5a0bc
Merge pull request #134 from UoA-CARES/feat/add-parse-observation
retinfai Oct 25, 2023
5ec3377
Merge pull request #137 from UoA-CARES/132-integrate-pydantic-config-…
retinfai Oct 25, 2023
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
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ train:
reward_range: 1.0
collision_range: 0.2
observation_mode: 'no_position'
# actor_path & critic_path must exist, it can't be commented
actor_path: 'rl_logs/23_08_02_17:59:13/models/actor_checkpoint.pht'
critic_path: 'rl_logs/23_08_02_17:59:13/models/critic_checkpoint.pht'
# gamma: 0.95
# tau: 0.005
# g: 5
Expand Down
5 changes: 0 additions & 5 deletions helperScripts/0kill.sh

This file was deleted.

28 changes: 0 additions & 28 deletions helperScripts/1manual.sh

This file was deleted.

30 changes: 0 additions & 30 deletions helperScripts/2train.sh

This file was deleted.

28 changes: 0 additions & 28 deletions helperScripts/3test.sh

This file was deleted.

12 changes: 0 additions & 12 deletions helperScripts/4openGZ.sh

This file was deleted.

50 changes: 0 additions & 50 deletions helperScripts/retrain.sh

This file was deleted.

9 changes: 5 additions & 4 deletions src/controllers/controllers/controller.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import rclpy
import math
from geometry_msgs.msg import Twist
from message_filters import Subscriber, ApproximateTimeSynchronizer
import rclpy
from rclpy import Future
from rclpy.node import Node

from geometry_msgs.msg import Twist
from message_filters import Subscriber, ApproximateTimeSynchronizer
from sensor_msgs.msg import LaserScan
from nav_msgs.msg import Odometry

from environments.util import process_lidar, process_odom, reduce_lidar
from environments.util import process_odom, reduce_lidar

class Controller(Node):
def __init__(self, node_name, car_name, step_length):
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/controllers/ftg_controller.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from .controller import Controller
from rclpy import Future
from std_msgs.msg import Empty
from environments.track_reset import track_info
from environments.termination import reached_goal
from environments.util import reduce_lidar, process_odom
from rclpy import Future
from .controller import Controller

class FTGController(Controller):

Expand Down
2 changes: 1 addition & 1 deletion src/controllers/controllers/ftg_policy.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .controller import Controller
import rclpy
import numpy as np
from .controller import Controller

def main():
rclpy.init()
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/controllers/random.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .controller import Controller
import rclpy
import numpy as np
import random
from .controller import Controller

def main():
rclpy.init()
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/controllers/rl_controller.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .controller import Controller
from rclpy import Future
from std_msgs.msg import Empty
from .controller import Controller
from environments.util import reduce_lidar, process_odom
from rclpy import Future

class RLController(Controller):

Expand Down
2 changes: 1 addition & 1 deletion src/controllers/controllers/rl_policy.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .rl_controller import RLController
import rclpy
from cares_reinforcement_learning.util.NetworkFactory import NetworkFactory
from cares_reinforcement_learning.util.helpers import denormalize
from .rl_controller import RLController

def main():
rclpy.init()
Expand Down
2 changes: 2 additions & 0 deletions src/environment_interfaces/srv/CarBeatReset.srv
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
float64 gx # goal x
float64 gy # goal y
string car_one
float64 cx_one # car_one x
float64 cy_one # car_one y
float64 cyaw_one # car_one yaw
string car_two
float64 cx_two # car_two x
float64 cy_two # car_two y
float64 cyaw_two # car_two yaw
Expand Down
1 change: 1 addition & 0 deletions src/environment_interfaces/srv/Reset.srv
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ float64 gy # goal y
float64 cx # car x
float64 cy # car y
float64 cyaw # car yaw
string car_name
string flag # flag
---
bool success
Loading