When using gym.get_asset_actuator_count or get_asset_actuator_joint_name with the default shadow_hand_with_fingertips.urdf asset then it only returns 0.
The asset is loaded in with:
shadow_hand_asset = self.gym.load_urdf(self.sim, asset_root, shadow_hand_asset_file, asset_options)
The actuator counts and actuator names are used like this:
self.num_shadow_hand_actuators = self.gym.get_asset_actuator_count(shadow_hand_asset)
actuated_dof_names = [self.gym.get_asset_actuator_joint_name(shadow_hand_asset, i) for i in range(self.num_shadow_hand_actuators)]
self.actuated_dof_indices = [self.gym.find_asset_dof_index(shadow_hand_asset, name) for name in actuated_dof_names]
Asset:
shadowhand_with_fingertips.urdf (47.4 KB)
Hi Ulfrend,
Your implementation looks correct, but have you tried to use the gym.load_asset()
function instead of gym.load_urdf
? I use this function to load all of my (custom) URDFs and have not encountered any problems with the other functions that you are using.
Hi, I have tried both load_asset functions.
It reads the mesh counts just fine, for some reason it’s having problem with the actuators. May I see an example of your URDF that works?
In that case I assume the shadow_hand URDF that comes with Isaac Gym is broken, in their example script they use the MuJoCo file.
Unfortunately I cannot share the URDFs that I have created, but it is identical to the KUKA iiwa URDF that they provide (mine just have some robot specific changes), have a look at: /isaacgym/assets/urdf/kuka_allegro_description/kuka.urdf
Tried with the kuka urdf and same issue, finds the bodies, shapes, dofs but not the actuators…
I tried some testing with other URDF files and I have come to the conclusion that the function only works with MuJoCo files. If you put print(self.gym.get_asset_actuator_count(shadow_hand_asset))
into the _create_envs()
function of the ShadowHand.py
script it will print the number of actuators as it should. But that script uses the shadow_hand.xml
file from the mjcf directory and I have not gotten it to work with URDF files.
I also tried with the other function called get_actor_actuator_count(envs, actor_handle)
which returns the same value, but it only works with MuJoCo files also.
Thank you so much for confirming that the problem is not just on my end.
I will try to re-write my URDFs into MuJoCo then… that will be painful.
Hope they will fix this in the next update
Hi @Ulfrend,
We are looking into supporting URDF actuators (transmissions) for the next release.
The actuator API in Isaac Gym is a fairly lightweight wrapper over the DOF properties, so you could also use DOF properties directly to configure the joint behaviours.
It was an omission on our part that the URDF versions of Shadow Hand don’t work with the sample RL task - sorry about that. We switched to the MJCF version quite early in the process.
1 Like