Documentation Index
Fetch the complete documentation index at: https://docs.generalrobotics.dev/llms.txt
Use this file to discover all available pages before exploring further.
Humanoid
Inherits from: Robot
Abstract base class defining the interface for humanoid robots.
This class extends the base Robot class with additional methods specific to
humanoid locomotion and control.
Inherited methods
- From
Robot: addSensor, getImage, getState, getPosition, getOrientation, moveByVelocity, cleanup
init
Humanoid.__init__(server_port: int = 4774, enable_websocket: bool = True, client_timeout: float = 30.0) -> None
Initialize humanoid robot.
Port for WebSocket server (default 4774)
Whether to start the WebSocket server (default True)
Client timeout in seconds (default 30.0)
getJointAngles
Humanoid.getJointAngles() -> list[float]
Get current joint angles in radians.
Current joint angles in radians, ordered by joint index
Must be implemented by subclasses
setJointAngles
Humanoid.setJointAngles(angles: list, blocking: bool = True, moving_time: Optional[float] = None, accel_time: Optional[float] = None) -> None
Set joint angles in radians.
Commands the humanoid to move joints to the specified target angles.
Can be blocking or non-blocking depending on the blocking parameter.
List of target joint angles in radians
Wait for movement to complete (default True)
moving_time (Optional[float])
Time to complete the movement in seconds
accel_time (Optional[float])
Time to accelerate/decelerate in seconds
Must be implemented by subclasses
stop
Soft e-stop for the robot.
Should stop the robot from moving gracefully while maintaining
balance. The humanoid should remain standing in a stable pose.
Must be implemented by subclasses
setDefaultJointAngles
Humanoid.setDefaultJointAngles(joint_pos: list) -> None
Set the default joint position for the robot.
value of the joint position
setDefaultJointVelocities
Humanoid.setDefaultJointVelocities(joint_vel: list) -> None
Set the default joint velocity for the robot.
value of the joint velocity