https://github.com/RTIS-Lab/f1tenth_gym_rl
Uses the gymnasium
api: https://gymnasium.farama.org/
python -m venv .venv
source .venv/bin/activate
pip install -e f1tenth_gym
pip install stable-baselines3\[extra\]
For convinience, add an entry to your .ssh/config
file:
Host rtis-lab-internal
User kurt
IdentityFile ~/.ssh/kwilso24
HostName 10.76.2.29
The
IdentityFile
line is optional, but highly recommended. If you have an SSH key, replace the path, and send it to the lab machine usingssh-copy-id
. See https://www.ssh.com/academy/ssh/keygen and https://www.ssh.com/academy/ssh/agent
With this in place, you can now do ssh rtis-lab-internal
.
I just give some example commands here. See https://www.digitalocean.com/community/tutorials/how-to-use-rsync-to-sync-local-and-remote-directories for more details
rsync
allows file/folder upload and download from a remote machine, and saves time by only sending modified files.
To send a folder called rl2024
to your home directory on the lab PC: rsync -azv rl2024 rtis-lab-internal:
And to update your copy with whatever is on the lab PC: rsync -azv rtis-lab-internal:rl2024 .
Always use the machine name (or IP address), and then a colon to specify the path of the file/folder of interest. For example: rsync -azv rtis-lab-internal:rl2024/checkpoint ./
unlike
cp
andscp
, trailing slashes in file paths are important! See https://www.digitalocean.com/community/tutorials/how-to-use-rsync-to-sync-local-and-remote-directories
Install the Remote - SSH extension. Open the command pallete (Control-Shift-P) and type ssh
- look for Remote SSH - Connect to Host...
command.
The Python extension for VSCode adds a tensorboard command - use it.
Use the command tmux before running your code so that you can detach from it and not have to worry about something interupting.
Here are commands you can do while not inside a tmux session.
tmux # creates new session
tmux ls # displays all tmux sessions
tmux attach # brings you into the most recent tmux session
tmux attach -t <id> # brings you into the specified tmux session that matches the id from ls
Then you can use these commands while you’re in the tmux session.
ctrl + B and D # detaches you from the tmux session
ctrl + D # destroys this tmux session
Imitation Learning: https://imitation.readthedocs.io/en/latest/
params (dict, default={'mu': 1.0489, 'C_Sf':, 'C_Sr':, 'lf': 0.15875, 'lr': 0.17145, 'h': 0.074, 'm': 3.74, 'I': 0.04712, 's_min': -0.4189, 's_max': 0.4189, 'sv_min': -3.2, 'sv_max': 3.2, 'v_switch':7.319, 'a_max': 9.51, 'v_min':-5.0, 'v_max': 20.0, 'width': 0.31, 'length': 0.58}): dictionary of vehicle parameters.
mu: surface friction coefficient
C_Sf: Cornering stiffness coefficient, front
C_Sr: Cornering stiffness coefficient, rear
lf: Distance from center of gravity to front axle
lr: Distance from center of gravity to rear axle
h: Height of center of gravity
m: Total mass of the vehicle
I: Moment of inertial of the entire vehicle about the z axis
s_min: Minimum steering angle constraint
s_max: Maximum steering angle constraint
sv_min: Minimum steering velocity constraint
sv_max: Maximum steering velocity constraint
v_switch: Switching velocity (velocity at which the acceleration is no longer able to create wheel spin)
a_max: Maximum longitudinal acceleration
v_min: Minimum longitudinal velocity
v_max: Maximum longitudinal velocity
width: width of the vehicle in meters
length: length of the vehicle in meters
Variables to try randomizing: