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

Canot run the training script successfully #1

Open
Revindell opened this issue Aug 29, 2024 · 6 comments
Open

Canot run the training script successfully #1

Revindell opened this issue Aug 29, 2024 · 6 comments

Comments

@Revindell
Copy link

Hi muyue1202,

Thanks for sharing this project. I have an issue running the training script. After I ran the script, I got an error message which shows

Traceback (most recent call last):
  File "scripts/train.py", line 256, in <module>
    train_go1(headless=False)
  File "scripts/train.py", line 216, in train_go1
    runner.learn(num_learning_iterations=100000, init_at_random_ep_len=True, eval_freq=100)
  File "/home/deyu.fu/quadruped_locomotion_project/go1_gym_learn/ppo_cse/__init__.py", line 141, in learn
    actions_train = self.alg.act(obs[:num_train_envs], privileged_obs[:num_train_envs],
  File "/home/deyu.fu/quadruped_locomotion_project/go1_gym_learn/ppo_cse/ppo.py", line 86, in act
    self.transition.actions = self.actor_critic.act(obs_history).detach()
TypeError: act() missing 1 required positional argument: 'depth_obs'

After I checked the source code, I do see that the method ActorCritic.act requires a parameter called depth_obs, which is missing when this function is called. Can you help me fix this issue? Thanks!

@baoping-ma
Copy link

I have the same as your question, if need the insert the camera?

@muye1202
Copy link
Owner

muye1202 commented Sep 12, 2024

Sorry guys I just saw this, let me take a look and get back to you ASAP

This might be due to the training and deployment pipeline are using the same actor_critic structure. Deployment requires camera input for depth observation (the depth_ons in the error message); I will try adding depth_obs to the pipeline.

@baoping-ma
Copy link

Excuse me, have you made any progress on the solution you mentioned (adding the depth_obs to the pipeline)? Thank you!

@baoping-ma
Copy link

Great job. Can you help with that? Appreciate very much.

TypeError: act() missing 1 required positional argument: 'depth_obs'

@baoping-ma
Copy link

Hi muyue1202,嗨,muyue1202,

Thanks for sharing this project. I have an issue running the training script. After I ran the script, I got an error message which shows感谢您分享这个项目。我在运行训练脚本时遇到问题。运行脚本后,我收到一条错误消息,显示

Traceback (most recent call last):
  File "scripts/train.py", line 256, in <module>
    train_go1(headless=False)
  File "scripts/train.py", line 216, in train_go1
    runner.learn(num_learning_iterations=100000, init_at_random_ep_len=True, eval_freq=100)
  File "/home/deyu.fu/quadruped_locomotion_project/go1_gym_learn/ppo_cse/__init__.py", line 141, in learn
    actions_train = self.alg.act(obs[:num_train_envs], privileged_obs[:num_train_envs],
  File "/home/deyu.fu/quadruped_locomotion_project/go1_gym_learn/ppo_cse/ppo.py", line 86, in act
    self.transition.actions = self.actor_critic.act(obs_history).detach()
TypeError: act() missing 1 required positional argument: 'depth_obs'

After I checked the source code, I do see that the method ActorCritic.act requires a parameter called depth_obs, which is missing when this function is called. Can you help me fix this issue? Thanks!在我检查源代码后,我确实看到方法 ActorCritic.act 需要一个名为 height_obs 的参数,但在调用该函数时缺少该参数。你能帮我解决这个问题吗?谢谢!

Have you solved this problem? How was it solved? Can you share? Thank you very much!

@muye1202
Copy link
Owner

Hi guys

Sorry for the delay, the depth_obs in go1_gym_learn/ppo_cse/actor_critic.py is required if you want the robot to have image observation as input during training. If you do not want to use visual info during training you can use og_actor_critic.py in the same folder, that file does not require depth_obs.

Thanks again for looking at our repo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants