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

Fix up small stuff #111

Merged
merged 4 commits into from
Sep 5, 2023
Merged
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
9 changes: 7 additions & 2 deletions helperScripts/1manual.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ trap cleanup SIGINT SIGTERM

cd ~/autonomous_f1tenth/

export GZ_PARTITION=50
export ROS_DOMAIN_ID=50
if [ -n "$1" ]; then
export GZ_PARTITION=$1
export ROS_DOMAIN_ID=$1
else
export GZ_PARTITION=50
export ROS_DOMAIN_ID=50
fi

. install/setup.bash

Expand Down
13 changes: 10 additions & 3 deletions helperScripts/2train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,21 @@ trap cleanup SIGINT SIGTERM

cd ~/autonomous_f1tenth/

export GZ_PARTITION=100
export ROS_DOMAIN_ID=100
if [ -n "$1" ]; then
export GZ_PARTITION=$1
export ROS_DOMAIN_ID=$1
else
export GZ_PARTITION=100
export ROS_DOMAIN_ID=100
fi

. install/setup.bash

colcon build
ros2 launch reinforcement_learning train.launch.py &

gz sim -g &
if [ "$1" == "y" ] || [ "$1" == "Y" ]; then
gz sim -g &
fi

wait
9 changes: 7 additions & 2 deletions helperScripts/3test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ trap cleanup SIGINT SIGTERM

cd ~/autonomous_f1tenth/

export GZ_PARTITION=150
export ROS_DOMAIN_ID=150
if [ -n "$1" ]; then
export GZ_PARTITION=$1
export ROS_DOMAIN_ID=$1
else
export GZ_PARTITION=150
export ROS_DOMAIN_ID=150
fi

. install/setup.bash

Expand Down
2 changes: 1 addition & 1 deletion src/environments/environments/CarBeatEnvironment.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(self,
collision_range=0.2,
step_length=0.5,
track='track_1',
observation_mode='full',
observation_mode='lidar_only',
max_goals=500):
super().__init__('car_beat_environment')

Expand Down
2 changes: 1 addition & 1 deletion src/reinforcement_learning/config/train.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ train:
observation_mode: 'lidar_only'
evaluate_every_n_steps: 2000
evaluate_for_m_episodes: 3
# actor_path & critic_path must exist, it can't be commented
# actor_path & critic_path must exist for retrain.sh, 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
Expand Down