robopal: a multi-platform, modular robot simulation framework based on MuJoCo, mainly used for reinforcement learning and control algorithm implementation of robotic arms.
ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 1 dimension(s) and the array at index 2 has 2 dimension(s) #14
python demo_tele_calibrate.py
INFO:root:Activated agents: ['arm0']
Press arrow keys to move the end effector along the x/y-axis.
Press ctrl + arrow keys to move the end effector along the z-axis.
Press shift + arrow keys to rotate the end effector along the x/y-axis.
Press ctrl + shift + arrow keys to rotate the end effector along the z-axis.
Press esc to exit.
Traceback (most recent call last):
File "/home/hjx/hjx_file/mujoco_file/robopal/robopal/demos/demo_tele_calibrate.py", line 34, in
env.step(action)
File "/home/hjx/hjx_file/mujoco_file/robopal/robopal/envs/robot.py", line 66, in wrapper
ret = func(self, *args, **kwargs)
File "/home/hjx/hjx_file/mujoco_file/robopal/robopal/envs/robot.py", line 77, in step
joint_inputs = self.controller.step_controller(action)
File "/home/hjx/hjx_file/mujoco_file/robopal/robopal/controllers/task_ik_controller.py", line 64, in step_controller
ret[agent] = self.ik(p_goal, r_goal, agent)
File "/home/hjx/hjx_file/mujoco_file/robopal/robopal/controllers/task_ikcontroller.py", line 77, in ik
x, = minimize.least_squares(x, ik_target, self.robot.mani_joint_bounds[agent], jacobian=jac_target, eps=1e-6, verbose=0)
File "/home/hjx/anaconda3/envs/hjx/lib/python3.9/site-packages/mujoco/minimize.py", line 247, in least_squares
r = residual(x)
File "/home/hjx/hjx_file/mujoco_file/robopal/robopal/controllers/task_ik_controller.py", line 75, in
ik_target = lambda x: self._ik_res(x, pos=pos, quat=quat, reg_target=x_prev, radius=radius, reg=.01, agent=agent)
File "/home/hjx/hjx_file/mujoco_file/robopal/robopal/controllers/task_ik_controller.py", line 107, in _ik_res
return np.hstack((res_pos, res_quat, res_reg))
File "/home/hjx/anaconda3/envs/hjx/lib/python3.9/site-packages/numpy/core/shape_base.py", line 357, in hstack
return _nx.concatenate(arrs, 0, dtype=dtype, casting=casting)
ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 1 dimension(s) and the array at index 2 has 2 dimension(s)
/home/hjx/anaconda3/envs/hjx/lib/python3.9/site-packages/glfw/init.py:914: GLFWError: (65537) b'The GLFW library is not initialized'
warnings.warn(message, GLFWError)
python demo_tele_calibrate.py INFO:root:Activated agents: ['arm0'] Press arrow keys to move the end effector along the x/y-axis. Press ctrl + arrow keys to move the end effector along the z-axis. Press shift + arrow keys to rotate the end effector along the x/y-axis. Press ctrl + shift + arrow keys to rotate the end effector along the z-axis. Press esc to exit. Traceback (most recent call last): File "/home/hjx/hjx_file/mujoco_file/robopal/robopal/demos/demo_tele_calibrate.py", line 34, in
env.step(action)
File "/home/hjx/hjx_file/mujoco_file/robopal/robopal/envs/robot.py", line 66, in wrapper
ret = func(self, *args, **kwargs)
File "/home/hjx/hjx_file/mujoco_file/robopal/robopal/envs/robot.py", line 77, in step
joint_inputs = self.controller.step_controller(action)
File "/home/hjx/hjx_file/mujoco_file/robopal/robopal/controllers/task_ik_controller.py", line 64, in step_controller
ret[agent] = self.ik(p_goal, r_goal, agent)
File "/home/hjx/hjx_file/mujoco_file/robopal/robopal/controllers/task_ikcontroller.py", line 77, in ik
x, = minimize.least_squares(x, ik_target, self.robot.mani_joint_bounds[agent], jacobian=jac_target, eps=1e-6, verbose=0)
File "/home/hjx/anaconda3/envs/hjx/lib/python3.9/site-packages/mujoco/minimize.py", line 247, in least_squares
r = residual(x)
File "/home/hjx/hjx_file/mujoco_file/robopal/robopal/controllers/task_ik_controller.py", line 75, in
ik_target = lambda x: self._ik_res(x, pos=pos, quat=quat, reg_target=x_prev, radius=radius, reg=.01, agent=agent)
File "/home/hjx/hjx_file/mujoco_file/robopal/robopal/controllers/task_ik_controller.py", line 107, in _ik_res
return np.hstack((res_pos, res_quat, res_reg))
File "/home/hjx/anaconda3/envs/hjx/lib/python3.9/site-packages/numpy/core/shape_base.py", line 357, in hstack
return _nx.concatenate(arrs, 0, dtype=dtype, casting=casting)
ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 1 dimension(s) and the array at index 2 has 2 dimension(s)
/home/hjx/anaconda3/envs/hjx/lib/python3.9/site-packages/glfw/init.py:914: GLFWError: (65537) b'The GLFW library is not initialized'
warnings.warn(message, GLFWError)