NVlabs / handover-sim

A simulation environment and benchmark for human-to-robot object handovers
https://handover-sim.github.io
BSD 3-Clause "New" or "Revised" License
83 stars 14 forks source link

The problem of robot in simulation #5

Closed barrycxg closed 1 year ago

barrycxg commented 1 year ago

It is a great job. I want to change robot type in simulation. Does the code provide an interface to change the urdf file of the robot?

ychao-nvidia commented 1 year ago

Yes. The robot body is currently specified in HandoverEnv here and here, which calls the Panda class defined here. To change the robot, you need to create another class like Panda and change the robot attributes defined here (including the URDF file). Note that the interface to the simulator here is using a library called easysim.

barrycxg commented 1 year ago

Thanks for your reply. But I have an another question. How to define root joint in your code? Which joint is related to the wrist in the variable "root trans" ?

Sorry to disturb you again and thanks for your kindness!

ychao-nvidia commented 1 year ago

How to define root joint in your code?

The kinematics of robot is all defined based on its URDF file.

Which joint is related to the wrist in the variable "root trans" ?

Assuming you are referring to the MANO hand, if you look at a MANO URDF file, the wrist joint should be joint7:

  <joint name="joint7" type="fixed">
   ...
  </joint>

root_trans here is a constant translation from the base of URDF to the wrist joint.

barrycxg commented 1 year ago

Thanks for your reply and patience. It helped me a lot.

barrycxg commented 1 year ago

I‘m sorry to disturb you. I‘m still confused that how to define the root joint in MANO hand. Is the root joint the wrist in your simulation? If not, where is the root joint of MANO Hand defined in the code?

Thanks for your patience!

ychao-nvidia commented 1 year ago

Is the root joint the wrist in your simulation?

No, the root joint is not the wrist. The root joint is a joint that has a constant translation (root_trans) from the wrist. This is an artifact from the MANO model.

If not, where is the root joint of MANO Hand defined in the code?

Again, the kinematics is defined in the URDF, not in the Python code. To generate the URDF for MANO, you need to follow the Installation section until step 5 to compile MANO assets (see this and this). The compilation leverages a submodule called mano_pybullet.

barrycxg commented 1 year ago

These do help! Thanks for your reply and patience.