robosuite.models.robots package#
Subpackages#
- robosuite.models.robots.manipulators package
- Submodules
- robosuite.models.robots.manipulators.baxter_robot module
- robosuite.models.robots.manipulators.iiwa_robot module
- robosuite.models.robots.manipulators.jaco_robot module
- robosuite.models.robots.manipulators.kinova3_robot module
- robosuite.models.robots.manipulators.manipulator_model module
ManipulatorModel
ManipulatorModel.add_gripper()
ManipulatorModel.arm_actuators
ManipulatorModel.arm_joints
ManipulatorModel.arm_type
ManipulatorModel.base_actuators
ManipulatorModel.base_joints
ManipulatorModel.base_xpos_offset
ManipulatorModel.default_base
ManipulatorModel.default_controller_config
ManipulatorModel.default_gripper
ManipulatorModel.eef_name
ManipulatorModel.gripper_mount_pos_offset
ManipulatorModel.gripper_mount_quat_offset
ManipulatorModel.head_actuators
ManipulatorModel.head_joints
ManipulatorModel.init_base_qpos
ManipulatorModel.init_qpos
ManipulatorModel.init_torso_qpos
ManipulatorModel.legs_actuators
ManipulatorModel.legs_joints
ManipulatorModel.models
ManipulatorModel.top_offset
ManipulatorModel.torso_actuators
ManipulatorModel.torso_joints
ManipulatorModel.update_actuators()
ManipulatorModel.update_joints()
- robosuite.models.robots.manipulators.panda_robot module
- robosuite.models.robots.manipulators.sawyer_robot module
- robosuite.models.robots.manipulators.ur5e_robot module
- Module contents
Submodules#
robosuite.models.robots.robot_model module#
- class robosuite.models.robots.robot_model.RobotModel(fname: str, idn=0)#
Bases:
MujocoXMLModel
Base class for all robot models.
- Parameters:
fname (str) – Path to relevant xml file from which to create this robot instance
idn (int or str) – Number or some other unique identification string for this robot instance
- add_base(base: RobotBaseModel)#
Mounts a base to the robot. Bases are defined in robosuite.models.bases
- add_leg_base(leg_base: LegBaseModel)#
Mounts @mobile_base to arm.
Throws error if robot already has a mobile base or if mobile base type is incorrect.
- Parameters:
base (mobile) – mount MJCF model
- Raises:
ValueError – [mobile base already added]
- add_mobile_base(mobile_base: MobileBaseModel)#
Mounts @mobile_base to arm.
Throws error if robot already has a mobile base or if mobile base type is incorrect.
- Parameters:
base (mobile) – mount MJCF model
- Raises:
ValueError – [mobile base already added]
- add_mount(mount: MountModel)#
Mounts @mount to arm.
Throws error if robot already has a mount or if mount type is incorrect.
- Parameters:
mount (MountModel) – mount MJCF model
- Raises:
ValueError – [mount already added]
- property all_actuators: List#
Returns: list: (Default is no actuators; i.e.: empty list)
- property all_joints: List#
Returns: list: (Default is no joints; i.e.: empty list)
- property base_xpos_offset: Dict[str, ndarray]#
Defines the dict of various (x,y,z) tuple offsets relative to specific arenas placed at (0,0,0) Assumes robot is facing forwards (in the +x direction) when determining offset. Should have entries for each arena case; i.e.: “bins”, “empty”, and “table”)
- Returns:
- Dict mapping arena names to robot offsets from the global origin (dict entries may also be lambdas
for variable offsets)
- Return type:
dict
- property bottom_offset: ndarray#
Returns vector from model root body to model bottom. By default, this is equivalent to this robot’s mount’s (bottom_offset - top_offset) + this robot’s base offset
- Returns:
(dx, dy, dz) offset vector
- Return type:
np.array
- property contact_geom_rgba#
RGBA color to assign to all contact geoms for this model
- Returns:
(r,g,b,a) values from 0 to 1 for this model’s set of contact geoms
- Return type:
4-array
- property default_base: str#
Defines the default mount type for this robot that gets added to root body (base)
- Returns:
Default base name to add to this robot
- Return type:
str
- property default_controller_config: Dict[str, str]#
Defines the name of default controller config file in the controllers/config directory for this robot.
- Returns:
- Dictionary containing arm-specific default controller config names
e.g.: {“right”: “default_panda”, “left”: “default_panda”}
- Return type:
dict
- property dof: int#
Defines the number of DOF of the robot
- Returns:
robot DOF
- Return type:
int
- property horizontal_radius: float#
Returns maximum distance from model root body to any radial point of the model. This method takes into account the mount horizontal radius as well
- Returns:
radius
- Return type:
float
- property init_qpos: ndarray#
Defines the default rest qpos of this robot
- Returns:
Default init qpos of this robot
- Return type:
np.array
- property models: List[MujocoXMLModel]#
Returns a list of all m(sub-)models owned by this robot model. By default, this includes the mount model, if specified
- Returns:
models owned by this object
- Return type:
list
- property naming_prefix: str#
Generates a standardized prefix to prevent naming collisions
- Returns:
Prefix unique to this model.
- Return type:
str
- set_base_ori(rot: ndarray)#
Rotates robot by rotation @rot from its original orientation.
- Parameters:
rot (3-array) – (r,p,y) euler angles specifying the orientation for the robot base
- set_base_xpos(pos: ndarray)#
Places the robot on position @pos.
- Parameters:
pos (3-array) – (x,y,z) position to place robot base
- set_joint_attribute(attrib: str, values: ndarray, force=True)#
Sets joint attributes, e.g.: friction loss, damping, etc.
- Parameters:
attrib (str) – Attribute to set for all joints
values (n-array) – Values to set for each joint
force (bool) – If True, will automatically override any pre-existing value. Otherwise, if a value already exists for this value, it will be skipped
- Raises:
AssertionError – [Inconsistent dimension sizes]
- set_mujoco_model(mujoco_model: MjModel | None = None)#
- property top_offset: ndarray#
Returns vector from model root body to model top. Useful for, e.g. placing models on a surface. Must be defined by subclass.
- Returns:
(dx, dy, dz) offset vector
- Return type:
np.array
- class robosuite.models.robots.robot_model.RobotModelMeta(name, bases, class_dict)#
Bases:
type
Metaclass for registering robot arms
- robosuite.models.robots.robot_model.create_robot(robot_name, *args, **kwargs)#
Instantiates a Robot object.
- Parameters:
robot_name (str) – Name of the robot to initialize
*args – Additional arguments to pass to the specific Robot class initializer
**kwargs – Additional arguments to pass to the specific Robot class initializer
- Returns:
Desired robot
- Return type:
- Raises:
Exception – [Invalid robot name]
- robosuite.models.robots.robot_model.register_robot(target_class)#
Module contents#
- robosuite.models.robots.is_robosuite_robot(robot: str) bool #
robot is robosuite repo robot if can import robot class from robosuite.models.robots