habitat.articulated_agents.humanoids.KinematicHumanoid class

Methods

def _set_rest_pose_path(self, rest_pose_path)
Sets the parameters that indicate the reset state of the agent. Note that this function overrides _get_X_params, which is used to set parameters of the robots, but the parameters are so large that it is better to put that on a file
def _update_motor_settings_cache(self)
Updates the JointMotorSettings cache for cheaper future updates
def _validate_arm_ctrl_input(self, ctrl: typing.List[float])
Raises an exception if the control input is NaN or does not match the joint dimensions.
def _validate_ctrl_input(self, ctrl: typing.List[float], joints: typing.List[int])
Raises an exception if the control input is NaN or does not match the joint dimensions.
def calculate_ee_forward_kinematics(self, joint_state: numpy.ndarray, ee_index: int = 0) -> numpy.ndarray
Gets the end-effector position for the given joint state.
def calculate_ee_inverse_kinematics(self, ee_target_position: numpy.ndarray, ee_index: int = 0) -> numpy.ndarray
Gets the joint states necessary to achieve the desired end-effector configuration.
def clip_ee_to_workspace(self, pos: numpy.ndarray, ee_index: int = 0) -> numpy.ndarray
Clips a 3D end-effector position within region the robot can reach.
def close_gripper(self) -> None
Set gripper to the close state
def ee_link_id(self, ee_index: int = 0) -> int
Gets the Habitat Sim link id of the end-effector.
def ee_local_offset(self, ee_index: int = 0) -> _magnum.Vector3
Gets the relative offset of the end-effector center from the end-effector link.
def ee_transform(self, ee_index: int = 0) -> _magnum.Matrix4
Gets the transformation of the end-effector location. This is offset from the end-effector link location.
def get_joint_transform(self)
Returns the joints and base transform of the humanoid
Get a string listing all robot link and joint names for debugging purposes.
def get_robot_sim_id(self) -> int
Get the unique id for referencing the robot.
def open_gripper(self) -> None
Set gripper to the open state
def reconfigure(self) -> None
Instantiates the human in the scene. Loads the URDF, sets initial state of parameters, joints, motors, etc…
def reset(self) -> None
def set_fixed_arm_joint_pos(self, fix_arm_joint_pos)
Will fix the arm to a desired position at every internal timestep. Can be used for kinematic arm control.
def set_gripper_target_state(self, gripper_state: float) -> None
Set the gripper motors to a desired symmetric state of the gripper [0,1] -> [open, closed]
def set_joint_transform(self, joint_list: typing.List[float], offset_transform: _magnum.Matrix4, base_transform: _magnum.Matrix4) -> None
Sets the joints, base and offset transform of the humanoid
def set_rest_position(self) -> None
Sets the agents in a resting position
def update(self) -> None
Updates the camera transformations and performs necessary checks on joint limits and sleep states.
def update_base(self, rigid_state, target_rigid_state)

Special methods

def __init__(self, agent_cfg, sim, limit_robo_joints = False, fixed_base = False)

Properties

arm_joint_limits: typing.Tuple[numpy.ndarray, numpy.ndarray] get
Get the arm joint limits in radians
arm_joint_pos get set
Get the current arm joint positions.
arm_motor_forces: numpy.ndarray get set
Get the current torques on the arm joint motors
arm_motor_pos get set
Get the current target of the arm joints motors.
arm_velocity: numpy.ndarray get
Get the velocity of the arm joints.
base_pos get set
Get the humanoid base ground position
base_rot: float get set
base_transformation get
gripper_joint_pos get set
Get the current gripper joint positions.
inverse_offset_transform get
is_gripper_closed: bool get
True if all gripper joints are within eps of the closed state.
is_gripper_open: bool get
True if all gripper joints are within eps of the open state.
leg_joint_pos get set
Get the current arm joint positions.
leg_motor_pos get set
Get the current target of the leg joint motors.

Method documentation

def habitat.articulated_agents.humanoids.KinematicHumanoid.ee_local_offset(self, ee_index: int = 0) -> _magnum.Vector3

Gets the relative offset of the end-effector center from the end-effector link.

Parameters
ee_index the end effector index for which we want the link id