Improbable-AI / walk-these-ways

Sim-to-real RL training and deployment tools for the Unitree Go1 robot.
https://gmargo11.github.io/walk-these-ways/
Other
492 stars 129 forks source link

Generating your own actuator network training data #30

Closed vassil-atn closed 1 year ago

vassil-atn commented 1 year ago

Hi @gmargo11,

Thanks for including the actuator network training and evaluation scripts! I was wondering how you go about generating the training data for the network. From the scripts it seems that you only need joint position and velocity measurements, torques measurements (tau_est?), desired joint positions and torques - is the last one the computed torques based on the PD law?

Do you run random commands or directly run a pretrained policy on the real robot and save the data? I was thinking of running my policy with the robot hung up and then recording the expected vs real torques and joint angles / velocities, but I'd be curious to know how you did it, too!

Thanks!

gmargo11 commented 1 year ago

Hi @Vassil17 ,

I generated the training data for the actuator network by the following procedure:

  1. Train a policy without actuator network
  2. Deploy the policy and record the joint position and velocity command + the measured joint position, velocity, and torque at various walking speeds and gaits. The "L2" button should start and stop logging during deployment (https://github.com/Improbable-AI/walk-these-ways/blob/master/go1_gym_deploy/utils/deployment_runner.py#L168)
  3. Train the actuator network on this data

Re: your question

From the scripts it seems that you only need joint position and velocity measurements, torques measurements (tau_est?), desired joint positions and torques - is the last one the computed torques based on the PD law?

Yes, the last one is the computed torques based on PD law. They aren't used to train the actuator network, only to visualize the difference between the learned model and ideal model

-Gabe