Lakshadeep / pre-grasp-approaching

https://lakshadeep.github.io/pgamr/
3 stars 1 forks source link

Two error about 'NameError' --------train/grasp_decision.py #10

Closed DevilCJS89 closed 5 months ago

DevilCJS89 commented 6 months ago

When I modify and run this code, new problems appear. It seems to be because the code is incomplete. Did I miss something?

run ' python train/grasp_decision.py'

error1

03/06/2024 10:39:05 [INFO] Experiment Algorithm: LRL
2024-06-03 02:39:07 [11,647ms] [Warning] [omni.physicsschema.plugin] ScaleOrientation is not supported for rigid bodies, prim path: /World/Cylinder. You may ignore this if the scale is close to uniform.
2024-06-03 02:39:07 [11,650ms] [Warning] [omni.physicsschema.plugin] ScaleOrientation is not supported for rigid bodies, prim path: /World/BaseTop. You may ignore this if the scale is close to uniform.
2024-06-03 02:39:24 [29,305ms] [Warning] [omni.physx.plugin] The rigid body at /World/ur5e/base has a possibly invalid inertia tensor of {1.0, 1.0, 1.0} and a negative mass, small sphere approximated inertia was used. Either specify correct values in the mass properties, or add collider(s) to any shape(s) that you wish to automatically compute mass properties for. If you do not want the objects to collide, add colliders regardless then disable the 'enable collision' property.
2024-06-03 02:39:24 [29,306ms] [Warning] [omni.physx.plugin] The rigid body at /World/ur5e/tool0 has a possibly invalid inertia tensor of {1.0, 1.0, 1.0} and a negative mass, small sphere approximated inertia was used. Either specify correct values in the mass properties, or add collider(s) to any shape(s) that you wish to automatically compute mass properties for. If you do not want the objects to collide, add colliders regardless then disable the 'enable collision' property.
2024-06-03 02:39:24 [29,306ms] [Warning] [omni.physx.plugin] The rigid body at /World/ur5e/world has a possibly invalid inertia tensor of {1.0, 1.0, 1.0} and a negative mass, small sphere approximated inertia was used. Either specify correct values in the mass properties, or add collider(s) to any shape(s) that you wish to automatically compute mass properties for. If you do not want the objects to collide, add colliders regardless then disable the 'enable collision' property.
Simulation start status:  True
MDP observation space low: [-3 -3 -3 -1 -1 -1 -1]
MDP observation space high: [3 3 3 1 1 1 1]
Error executing job with overrides: []
Traceback (most recent call last):
  File "train/grasp_decision.py", line 150, in main
    experiment(cfg, alg=LRL)
  File "train/grasp_decision.py", line 61, in experiment
    output_shape=action_space_discrete,
NameError: name 'action_space_discrete' is not defined

error2

  File "train/grasp_decision.py", line 87, in experiment
    agent = alg(mdp.info, actor_mu_params, actor_sigma_params, actor_optimizer, critic_params, batch_size,
NameError: name 'actor_mu_params' is not defined

error3

  File "train/grasp_decision.py", line 170, in main
    experiment(cfg, alg=LRL)
  File "train/grasp_decision.py", line 106, in experiment
    initial_replay_size, max_replay_size, warmup_transitions, tau, lr_alpha, critic_fit_params=None)
TypeError: __init__() missing 2 required positional arguments: 'tau' and 'lr_alpha'

I am puzzled for the errors, did I miss something? Thank you .

Lakshadeep commented 6 months ago

The original code used in the paper was too messy, so the code in this repository is refactored code and not fully tested. I originally had planned to fully test this code in July as I am too busy till the end of this month. Hopefully, I will find some time to look for errors this week.

DevilCJS89 commented 6 months ago

Thank you very much for your reply. I am looking forward to seeing the code after your testing. I'm a staunch supporter for this good job. My email is: devil_cjs@163.com

DevilCJS89 commented 5 months ago

I am looking forward to your update . Thank you !