Lab 5: How to Train Your Robot Dog!
Jaden Clark
CS 123
Let’s make Pupper walk!
CS 123
Lab Overview
3
Software installs
4
Rewards in RL
Goal: optimize the reward
reward
state
action
5
What’s a good reward…
Well… the reward is a function of the of the state and action at time t
state: 12-dof motor positions + velocities, roll/pitch/yaw, base velocities / orientation, foot contact forces/position, etc
action: 12-dof motor position commands
6
We want Pupper to follow a velocity command
Is a velocity following command sufficient?
7
We want Pupper to follow a velocity command
Is a velocity following command sufficient?
In practice… NO
8
We want Pupper to follow a velocity command
Is a velocity following command sufficient?
In practice… NO
Why???
9
Teaching Pupper to walk is like teaching a human
10
Teaching Pupper to walk is like teaching a human
Can we just teach a baby to walk by giving candy when it goes forward??
11
Teaching Pupper to walk is like teaching a human
Can we just teach a baby to walk by giving candy when it goes forward??
Need to give it auxiliary tasks…
12
Teaching Pupper to walk is like teaching a human
Shooting a basketball
13
Auxiliary rewards
Guiding gradient to correct optimum
14
Pupper needs auxiliary rewards too
How to encourage Pupper to walk with the correct gait?
Linear combination of differentiable rewards:
15
Pupper needs auxiliary rewards too
How to encourage Pupper to walk with the correct gait?
reward definitions: https://github.com/Nate711/pupperv3-mjx/blob/main/pupperv3_mjx/rewards.py
16
RL Workflow
17
Domain randomization
System identification is never perfect…
Which terms to randomize?
18
units is meters
Policy deployment
download saved file from colab
Copy the .sh file on your local machine
make it executable
run the file with ./deploy_policy.sh /path/to/your/policy.json
ctrl-b + d to exit tmux session
19
RL Workflow
20
Challenge: Train the most agile policy
extra credit for best policies…
21
Quick Tips
Safety
General
22
General safety
23
24
25
26
27