Cannot import URDF into Gym

Hi here,

I am facing some problem about importing URDF into isaac gym.

I am using the following code, and I think there is no problem with the code because I am using the same one as shown in the examples:

asset_root = os.path.join(os.path.dirname(os.path.abspath(file)), ‘…/…/assets’)
LogBot_asset_file = “logbot/urdf/robotModelSimplified.urdf”

robot_asset_options = gymapi.AssetOptions()
robot_asset_options.default_dof_drive_mode = gymapi.DOF_MODE_NONE
robot_asset_options.collapse_fixed_joints = True
robot_asset_options.replace_cylinder_with_capsule = True
robot_asset_options.flip_visual_attachments = True
robot_asset_options.fix_base_link = self.cfg[“env”][“urdfAsset”][“fixBaseLink”]
robot_asset_options.density = 0.001
robot_asset_options.angular_damping = 0.0
robot_asset_options.linear_damping = 0.0
robot_asset_options.armature = 0.0
robot_asset_options.thickness = 0.01
robot_asset_options.disable_gravity = False

LogBot_asset = self.gym.load_asset(self.sim, asset_root, LogBot_asset_file, robot_asset_options)

logbot_handle = self.gym.create_actor(env_ptr, LogBot_asset, start_pose, “logbot”, i, 1, 0)

And I am facing the problem:

It seems like Gym cannot deal with STL and I generated the URDF from Solidworks, which can only export STL. I would like to ask is there any way to deal with that? Besides, can Gym deal with USD which I have not seen from any examples.

Many thanks in advance!


Problem solved. I rewrite the URDF file, but I still would like to know if we can use the USD file in gym or not?


I know with Isaac Gym Preview I need to modify the URDF and replace “package://robotModelSimplified” with “…/“or the pathing to work out correctly.

The formatting for this post won’t let me do “. . /“ (two periods) it seems to auto change it to …