adam.model.mj_factory.mujoco_model#

Classes#

MujocoOrigin

MujocoInertia

MujocoInertial

MujocoLink

MujocoJoint

MujocoModelFactory

Factory that builds a model starting from a mujoco.MjModel.

Functions#

_normalize_quaternion(→ numpy.ndarray)

_rotate_vector(→ numpy.ndarray)

Rotate a vector using quaternion [w, x, y, z].

Module Contents#

class adam.model.mj_factory.mujoco_model.MujocoOrigin[source]#
xyz: numpy.ndarray[source]#
rpy: numpy.ndarray[source]#
class adam.model.mj_factory.mujoco_model.MujocoInertia[source]#
ixx: float[source]#
ixy: float[source]#
ixz: float[source]#
iyy: float[source]#
iyz: float[source]#
izz: float[source]#
class adam.model.mj_factory.mujoco_model.MujocoInertial[source]#
mass: float[source]#
inertia: MujocoInertia[source]#
origin: MujocoOrigin[source]#
name: str[source]#
inertial: MujocoInertial[source]#
visuals: list[source]#
collisions: list[source]#
class adam.model.mj_factory.mujoco_model.MujocoJoint[source]#
name: str[source]#
parent: str[source]#
child: str[source]#
joint_type: str[source]#
axis: numpy.ndarray | None[source]#
origin: MujocoOrigin[source]#
limit: adam.model.abc_factories.Limits | None[source]#
adam.model.mj_factory.mujoco_model._normalize_quaternion(quat: numpy.ndarray) numpy.ndarray[source]#
adam.model.mj_factory.mujoco_model._rotate_vector(quat: numpy.ndarray, vec: numpy.ndarray) numpy.ndarray[source]#

Rotate a vector using quaternion [w, x, y, z].

class adam.model.mj_factory.mujoco_model.MujocoModelFactory(mj_model: mujoco.MjModel, math: adam.core.spatial_math.SpatialMath)[source]#

Bases: adam.model.abc_factories.ModelFactory

Factory that builds a model starting from a mujoco.MjModel.

math[source]#
mujoco[source]#
mj_model[source]#
name[source]#
_child_map[source]#
_joints = [][source]#
_import_mujoco()[source]#
_model_exists(mj_model)[source]#
_body_name(body_id: int) str[source]#
_joint_name(joint_id: int) str[source]#
_build_child_map() dict[str, list[str]][source]#
_joint_origin(body_id: int, joint_id: int | None) MujocoOrigin[source]#
_build_limits(joint_id: int, joint_type: str) adam.model.abc_factories.Limits | None[source]#
_joint_type(mj_type: int) str[source]#
_build_joint(body_id: int, joint_id: int | None, parent_name: str, joint_type: str) adam.model.std_factories.std_joint.StdJoint[source]#
_build_joints() list[adam.model.std_factories.std_joint.StdJoint][source]#
abstractmethod build_joint(joint) adam.model.std_factories.std_joint.StdJoint[source]#

build the single joint

Returns:

Joint

build the single link :returns: Link

get_joints() list[adam.model.std_factories.std_joint.StdJoint][source]#
Returns:

the list of the joints

Return type:

list[Joint]

_has_non_fixed_joint(link_name: str) bool[source]#
Returns:

the list of the link

Return type:

list[Link]

get_frames() list[adam.model.std_factories.std_link.StdLink][source]#
Returns:

the list of the frames

Return type:

list[Link]