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

Stopped after `sudo make autostart` #1

Closed Kashu7100 closed 1 year ago

Kashu7100 commented 1 year ago

Thank you for sharing the code for this awesome work.

I followed the setup in the README to set up your code and I would like to have some advice on the Running the Controller section. After running the second command (cd ~/go1_gym/go1_gym_deploy/docker; sudo make autostart), the code seems to stop after a while (please refer to the attached image).

I pressed [R2] several times at this moment but it did not do anything.

image

Do you have any suggestions about this situation?

Sincerely,

gmargo11 commented 1 year ago

Hi @Kashu7100 ,

Great to see you're trying out the code on your Go1!

To diagnose the issue, rather than using the autostart script, let's enter the container and start the controller manually. Can you let me know the output of the following commands? First instead of the autostart command:

cd ~/go1_gym/go1_gym_deploy/docker; sudo make run

And then, if that command successfully enters the docker container:

python3 setup.py install
cd go1_gym_deploy/scripts
python3 deploy_policy.py

Gabe

Kashu7100 commented 1 year ago

After python3 deploy_policy.py command, the process seems to stop at pkl_cfg = pkl.load(file)

image

Kashu7100 commented 1 year ago

After reading your paper, I noticed that my Go1's jetson board is normal nano (not NX). I think maybe the lack of computation power of my Go1 is causing this issue.

Do you think running without docker can help? Also, I want to check whether I can run the policy from my PC (not the onboard nano). I am wondering if there is a way to communicate with lcm_position from outside of Go1 via ethernet cable.

gmargo11 commented 1 year ago

Odd! But the parameters.pkl file is present at /home/isaac/go1_gym/runs/gait-conditioned-agility/pretrain-v0/train/025417.456545/parameters.pkl, right?

You could try ensuring this file is fully readable by all users by navigating to runs/gait-conditioned-agility/pretrain-v0/train/025417.456545/ and running chmod +777 parameters.pkl

Re: Other questions

Kashu7100 commented 1 year ago

Thank you for your advice. Actually, chmod +777 parameters.pkl works. After the chmod and starting the controller manually, the controller successfully works.

It seems like there are some stability issues with running the code, but I will look deeper! Also, it would be helpful if you can publish the source code for lcm_position file.

Thank you a lot.

gmargo11 commented 1 year ago

Great to hear that resolved the issue. I've just made the file permissions correct in the repo. I also added the source code for the lcm_position file.

Closing this issue since I think we've eliminated the original error. If you open a new issue with any stability problems you're referencing, happy to take a look.

Also, would love to see video if you take the system out for a successful walk :-) Thanks for being an early tester of the deployment code

Kashu7100 commented 1 year ago

Thank you for adding the source code for lcm_position.

It seems the following header files are required to compile:

#include "state_estimator_lcmt.hpp"
#include "leg_control_data_lcmt.hpp"
#include "pd_tau_targets_lcmt.hpp"
#include "rc_command_lcmt.hpp"

Some of them seemed like from the Cheetah Software but I could not figure it out.

Also, I will definitely post the video!

gmargo11 commented 1 year ago

Here's a fork of the unitree_legged_sdk with all of the files needed to build lcm_position: https://github.com/Improbable-AI/unitree_legged_sdk