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

ypeError: action() takes 3 positional arguments but 4 were given #259

Open
hanyangyu1021 opened this issue Nov 28, 2024 · 3 comments
Open

Comments

@hanyangyu1021
Copy link

I can suceessfully run in PyRep, but when i run RLBench, it crashed. Why?

root@autodl-container-bf2c4487e6-930da208:/mnt/nas-a6000/hanyangyu/projects/robot/RLBench# python ./examples/single_task_rl.py
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Reset Episode
['reach the red target', 'touch the red ball with the panda gripper', 'reach the red sphere']
[ 0.04562055 -0.0573288 0.04520147 0.05530244 0.0132626 -0.12701392
0.03001259 1. ]
Traceback (most recent call last):
File "./examples/single_task_rl.py", line 42, in
obs, reward, terminate = task.step(action)
File "/mnt/nas-a6000/hanyangyu/projects/robot/RLBench/rlbench/task_environment.py", line 99, in step
self._action_mode.action(self._scene, action)
File "/mnt/nas-a6000/hanyangyu/projects/robot/RLBench/rlbench/action_modes/action_mode.py", line 35, in action
self.arm_action_mode.action(scene, arm_action, ignore_collisions)
TypeError: action() takes 3 positional arguments but 4 were given
QObject::~QObject: Timers cannot be stopped from another thread
QMutex: destroying locked mutex
QMutex: destroying locked mutex

@hanyangyu1021
Copy link
Author

xvfb-run -a python ./examples/imitation_learning.py
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Traceback (most recent call last):
File "./examples/imitation_learning.py", line 39, in
demos = np.array(demos).flatten()
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
QObject::~QObject: Timers cannot be stopped from another thread
QMutex: destroying locked mutex

@Lyy-iiis
Copy link

I also meet the same problem when running examples, have you solved it yet ?

@Lyy-iiis
Copy link

I fix this problem by modify line 35 in rlbench/action_modes/action_mode.py to self.arm_action_mode.action(scene, arm_action). It seems work now.

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

2 participants