RLBench icon indicating copy to clipboard operation
RLBench copied to clipboard

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

Open hanyangyu1021 opened this issue 1 year ago • 3 comments

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 avatar Nov 28 '24 05:11 hanyangyu1021

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

hanyangyu1021 avatar Nov 28 '24 05:11 hanyangyu1021

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

Lyy-iiis avatar Dec 14 '24 02:12 Lyy-iiis

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.

Lyy-iiis avatar Dec 14 '24 03:12 Lyy-iiis