udaan.utils.assets.mujoco_asset_creator module

class udaan.utils.assets.mujoco_asset_creator.MujocoAssetCreator[source]

Bases: object

Adapted from IsaacGymEnvs

Parameters:

object (_type_) – _description_

__init__(name='mujoco_asset')[source]
actuator(parent)[source]
asset()[source]
body(parent, name, pos=array([0., 0., 0.]), quat=array([0., 0., 0., 1.]), mass=1.0, inertia=array([1., 1., 1.]), rgba=[0.8, 0.9, 0.8, 1.0])[source]
box(parent, name, pos=array([0., 0., 0.]), quat=array([0., 0., 0., 1.]), size=array([0.1, 0.1, 0.1]), mass=0.01, alpha=1.0, rgb=[0.1, 0.1, 0.5], density=1000)[source]
create_cable_payload(parent, name, pos, length=1, mass=0.15)[source]
create_flexible_cable_payload(parent, name, pos, N=5, length=1, mass=0.15, payload_rgb=(0.0, 0.8, 0.2))[source]

N-link cable + payload subtree. All child names are prefixed with name.

create_quadrotor0(parent, name, pos, **kwargs)[source]
cylinder(parent, name, pos=array([0., 0., 0.]), mass=0.01, density=1000, radius=0.1, length=0.1, alpha=1.0, rgb=[0.5, 0.1, 0.1])[source]
exclude_contact(body1, body2)[source]
fancy_asset()[source]
ground_plane(pos=array([0., 0., 0.]), size=2, friction=1.0, rgba=[0.8, 0.9, 0.8, 1.0])[source]

Create a ground plane

Parameters:
  • size (int, optional) – Size of the ground plane. Defaults to 10.

  • friction (float, optional) – Friction of the ground plane. Defaults to 1.0.

  • rgba (list, optional) – RGBA values of the ground plane. Defaults to [0.8, 0.9, 0.8, 1.0].

joint(parent, name, type, pos=array([0., 0., 0.]), axis=array([0., 0., 1.]), range=array([-1., 1.]), damping=0.1, stiffness=0.0, armature=0.0, limited=False)[source]
light()[source]
motor(parent, site, range=[], gear=array([0., 0., 0., 0., 0., 0.]))[source]
save_to(filename='mujoco_asset.xml', verbose=False)[source]

Save the asset to a file

Parameters:

filename (str, optional) – Name of the file to save to. Defaults to “mujoco_asset.xml”.

site(parent, name, type='box', pos=array([0., 0., 0.]), quat=array([0., 0., 0., 1.]), size=array([0.035, 0.035, 0.035]), rgba=[0.1, 0.1, 0.5, 1.0])[source]
spatial(parent, site1, site2, range=[0.0, 1.0], width=0.003, damping=0.0, stiffness=0.0, rgba=[0.9, 0.9, 0.9, 1.0])[source]
sphere(parent, name, pos=array([0., 0., 0.]), quat=array([0., 0., 0., 1.]), radius=0.1, mass=0.01, alpha=1.0, rgb=[0.1, 0.5, 0.1], density=1000)[source]
tendon(parent)[source]
velocity(parent, site, range=[-1.0, 1.0], kv=0.1, gear=array([0., 0., 0., 0., 0., 0.]))[source]