qgallouedec / panda-gym

Set of robotic environments based on PyBullet physics engine and gymnasium.
MIT License
492 stars 106 forks source link

Set to move in a two-dimensional plane #95

Open ChenyangRan opened 4 weeks ago

ChenyangRan commented 4 weeks ago

Hi, I'm using the panda-gym to create my UR3 Reach. But when I set the initial pos, and set_action(np.array(0,0,0)), the ur3 switch its pos automatically. It seems to automatically align tcp with xyz in the environment. Could you please tell me how to fixed the initial pos and just move in 2D?

Before: 2024-06-14 18-46-59 的屏幕截图

set action is [0,0,0] 2024-06-14 18-47-25 的屏幕截图

qgallouedec commented 4 weeks ago

No 100% to understand. 0,0,0 is the position reached by the ee in the second image?

ChenyangRan commented 4 weeks ago

No 100% to understand. 0,0,0 is the position reached by the ee in the second image?

No, I want to do nothing. But the ee change its position.

qgallouedec commented 4 weeks ago

How have you set the neutral position? With self.neutral_joint_values? https://github.com/qgallouedec/panda-gym/blob/746ee4d89ecf1d17b14d22512d4cc2497d10ba49/panda_gym/envs/robots/panda.py#L45

ChenyangRan commented 4 weeks ago

self.neutral_joint_values = np.array([0.00, 0.41, 0.00, -1.85, 0.00, 2.26, 0.79, 0.00, 0.00])

I just have tested the neutral_joint_values, but it still hapeended. Start 2024-06-14 20-50-48 的屏幕截图

After 2024-06-14 20-52-11 的屏幕截图

qgallouedec commented 4 weeks ago

can you share the code of your robot?

ChenyangRan commented 4 weeks ago

It's ok. Thank you very much. upload.zip