robopal.robots.base module

class robopal.robots.base.BaseRobot(scene: str = 'default', mount: str | Iterable[str] = None, manipulator: str | Iterable[str] = None, gripper: str | Iterable[str] = None, attached_body: str | Iterable[str] = None, specified_xml_path: str = None, agent_num: int = 0)[源代码]

基类:object

Base class for generating Data struct of the arm.

参数:
  • name(str) -- robot name

  • scene(str) -- scene name

  • mount(str) -- mount name

  • manipulator(str) -- manipulator name

  • gripper(str) -- gripper name

  • attached_body(str) -- Connect the end of manipulator and gripper at this body.

  • xml_path(str) -- If you have specified the xml path of your local robot,

it'll not automatically construct the xml file with input assets.

abstractmethod add_assets() None[源代码]

Add objects into the xml file.

property arm_actuator_indexes: Dict[str, ndarray]

robot info

property arm_actuator_names: Dict[str, ndarray]

robot info

property arm_joint_indexes: Dict[str, ndarray]

robot info

property arm_joint_names: Dict[str, ndarray]

robot info

build_from_string(xml_string)[源代码]
build_from_xml(xml_path)[源代码]
create_end_effector(gripper)[源代码]
get_arm_qacc(agent: str = 'agent0') ndarray[源代码]

Get arm joint accelerate of the specified agent.

参数:

agent -- agent name

返回:

joint position

get_arm_qpos(agent: str = 'agent0') ndarray[源代码]

Get arm joint position of the specified agent.

参数:

agent -- agent name

返回:

joint position

get_arm_qvel(agent: str = 'agent0') ndarray[源代码]

Get arm joint velocity of the specified agent.

参数:

agent -- agent name

返回:

joint position

get_arm_tau(agent: str = 'agent0') ndarray[源代码]

Get arm joint torque of the specified agent.

参数:

agent -- agent name

返回:

joint torque

get_base_xmat(agent: str = 'agent0') ndarray[源代码]
get_base_xpos(agent: str = 'agent0') ndarray[源代码]
get_base_xquat(agent: str = 'agent0') ndarray[源代码]
get_coriolis_gravity_compensation(agent: str = 'agent0') ndarray[源代码]
get_end_xmat(agent: str = 'agent0') ndarray[源代码]
get_end_xpos(agent: str = 'agent0') ndarray[源代码]
get_end_xquat(agent: str = 'agent0') ndarray[源代码]
get_end_xvel(agent: str = 'agent0') ndarray[源代码]

Computing the end effector velocity

参数:

agent -- agent name

返回:

end effector velocity, 6*1, [v, w]

get_full_jac(agent: str = 'agent0') ndarray[源代码]

Computes the full model Jacobian, expressed in the coordinate world frame.

参数:

agent -- agent name

返回:

Jacobian

get_full_jac_pinv(agent: str = 'agent0') ndarray[源代码]

Computes the full model Jacobian_pinv expressed in the coordinate world frame.

参数:

agent -- agent name

返回:

Jacobian_pinv

get_jac_dot(agent: str = 'agent0') ndarray[源代码]

Computing the Jacobian_dot in the joint frame. https://github.com/google-deepmind/mujoco/issues/411#issuecomment-1211001685

参数:

agent -- agent name

返回:

Jacobian_dot

get_mass_matrix(agent: str = 'agent0') ndarray[源代码]

Get Mass Matrix ref https://github.com/ARISE-Initiative/robosuite/blob/master/robosuite/controllers/base_controller.py#L61

参数:

agent -- agent name

返回:

mass matrix

property init_qpos: Dict[str, ndarray]

Robot's init joint position.

property jnt_num: int | Dict[str, int]

Number of joints.

property name: str

Robot name.

class robopal.robots.base.RobotMetaClass(name, bases, attrs)[源代码]

基类:type

Metaclass for registering robot arms