Python API Reference
g1
Motion Plan Configuration module
Classes
AudioData
Audio stream data
Attributes
data
property
writable
Binary data packet - for pcm format: 2560 bytes per 80ms, for json: text length or empty
format
property
writable
Audio format: 'pcm' (16000Hz 16-bit mono) or 'json' (UTF-8 text)
ControlStatus
Members:
SUCCESS : Execution successful
TIMEOUT : Execution timeout
FAULT : Fault occurred, cannot continue execution
INVALID_INPUT : Input parameters do not meet requirements
INIT_FAILED : Internal communication component creation failed
IN_PROGRESS : Motion in progress but not reached target
STOPPED_UNREACHED : Stopped but not reached target
DATA_FETCH_FAILED : Data fetch failed
PUBLISH_FAIL : Data sending failed
COMM_DISCONNECTED : Connection failed
ControllerName
Members:
CHASSIS_POSE_CTRL : Chassis pose controller
CHASSIS_TWIST_CTRL : Chassis twist controller
LEG_PVT_BYPASS_CTRL : Leg PVT bypass controller
LEG_PVT_CTRL : Leg PVT controller
HEAD_PVT_BYPASS_CTRL : Head PVT bypass controller
HEAD_PVT_CTRL : Head PVT controller
LEFT_ARM_PVT_BYPASS_CTRL : Left arm PVT bypass controller
LEFT_ARM_PVT_CTRL : Left arm PVT controller
RIGHT_ARM_PVT_BYPASS_CTRL : Right arm PVT bypass controller
RIGHT_ARM_PVT_CTRL : Right arm PVT controller
LEFT_GRIPPER_CTRL : Left gripper controller
RIGHT_GRIPPER_CTRL : Right gripper controller
DepthData
Depth image data
Attributes
DetectionAndSegmentationResult
Single detection/segmentation result
Attributes
DetectionResult
Perception detection result
Attributes
bounding_boxes
property
Bounding boxes as list of (x, y, width, height)
detection_results
property
writable
List of DetectionAndSegmentationResult
instance_mask
property
Instance mask as numpy array (HxW or HxWxC), or None if empty
target_point_poses
property
List of 4x4 target point pose matrices (numpy)
target_poses
property
List of 4x4 target pose matrices (numpy)
Functions
ForceData
GalbotMotion
Functions
get_instance
staticmethod
Get the singleton instance of GalbotMotion.
Returns:
| Name | Type | Description |
|---|---|---|
GalbotMotion |
GalbotMotion
|
The singleton instance of GalbotMotion. |
add_obstacle
add_obstacle(obstacle_id: str, obstacle_type: str, pose: collections.abc.Sequence[typing.SupportsFloat], scale: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat], 'FixedSize(3)'] = [0.0, 0.0, 0.0], key: str = '', target_frame: str = 'world', ee_frame: str = 'ee_base', reference_joint_positions: collections.abc.Sequence[typing.SupportsFloat] = [], reference_base_pose: collections.abc.Sequence[typing.SupportsFloat] = [], ignore_collision_link_names: collections.abc.Sequence[str] = [], safe_margin: typing.SupportsFloat = 0.0, resolution: typing.SupportsFloat = 0.01) -> MotionStatus
Add an obstacle to the robot's collision detection system.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
obstacle_id |
str
|
Unique ID for the obstacle (cannot be duplicated) |
required |
obstacle_type |
str
|
Obstacle type. Options: box / sphere / cylinder / mesh / point_cloud / depth_image |
required |
pose |
list[float]
|
Position and orientation of the obstacle. Length 7: [x, y, z, qx, qy, qz, qw] |
required |
scale |
tuple[float]
|
Geometric size of the obstacle
|
[0.0, 0.0, 0.0]
|
key |
str
|
key for the obstacle.
|
''
|
target_frame |
str
|
Target coordinate frame. Options: world / base_link / motion chain name |
'world'
|
ee_frame |
str
|
End-effector coordinate frame. Only effective when target_frame is a motion chain name |
'ee_base'
|
reference_joint_positions |
list[float]
|
Robot joint state when loading obstacle. If empty, current joint state is used |
[]
|
reference_base_pose |
list[float]
|
Robot base pose in map coordinate frame. If empty, current base pose is used |
[]
|
ignore_collision_link_names |
list[str]
|
List of robot link names to ignore in collision detection |
[]
|
safe_margin |
float
|
Safe distance to obstacle. Collision is detected when obstacle distance is less than this value |
0.0
|
resolution |
float
|
Loading precision for some obstacle types. Defaults to 0.01 |
0.01
|
Returns:
| Name | Type | Description |
|---|---|---|
MotionStatus |
MotionStatus
|
Result of adding the obstacle |
attach_target_object
attach_target_object(obstacle_id: str, obstacle_type: str, pose: collections.abc.Sequence[typing.SupportsFloat], scale: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat], 'FixedSize(3)'] = [0.0, 0.0, 0.0], key: str = '', target_frame: str = 'world', ee_frame: str = 'ee_base', reference_joint_positions: collections.abc.Sequence[typing.SupportsFloat] = [], reference_base_pose: collections.abc.Sequence[typing.SupportsFloat] = [], ignore_collision_link_names: collections.abc.Sequence[str] = [], safe_margin: typing.SupportsFloat = 0.0, resolution: typing.SupportsFloat = 0.01) -> MotionStatus
Add an obstacle to the robot's collision detection system.
Notes
- GalbotMotion currently does NOT provide real-time obstacle perception / automatic environment updates.
- Obstacle inputs here are treated as manual environment setup for collision checking.
- For obstacle_type == "point_cloud",
keyis typically a point cloud file path provided by the user. - For obstacle_type == "depth_image", the camera type selects a depth source captured/loaded for the collision world; it is not a continuous real-time perception stream for motion planning.
Parameters: obstacle_id (str): Unique ID for the obstacle (cannot repeat) obstacle_type (str): Type of obstacle (box/sphere/cylinder/mesh/point_cloud/depth_image) pose (list[float]): Position and orientation of the obstacle (length 7: xyz+quat) scale (tuple[float]): Geometry size (box: l/w/h; sphere: r/-/-; cylinder: r/h/-) key (str): File path (mesh/point_cloud) or camera type (depth_image: front_head/left_arm/right_arm) target_frame (str): Target coordinate frame (world/base_link/chain name) ee_frame (str): End-effector frame (only valid if target_frame is a chain) reference_joint_positions (list[float]): Robot joint state when loading obstacle (current if empty) reference_base_pose (list[float]): Robot base pose in map frame (current if empty) ignore_collision_link_names (list[str]): Links to ignore collision with safe_margin (float): Safe distance (collision if < this value) resolution (float): Loading precision for some obstacle types
Returns: MotionStatus: Result of adding obstacle
attach_tool
Attach a tool to the specified robot motion chain (left_arm / right_arm).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chain |
str
|
The robot motion chain. |
required |
tool |
str
|
The tool to attach. |
required |
params |
dict
|
Additional parameters for the tool attachment. Defaults to default_param. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
MotionStatus
|
True if the tool attachment is successful, False otherwise. |
check_collision
check_collision(start: collections.abc.Sequence[RobotStates], enable_collision_check: bool = True, params: Parameter = ...) -> tuple[MotionStatus, list[bool]]
Check collision between robot and environment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start |
RobotStates
|
The robot states. |
required |
enable_collision_check |
bool
|
Whether to enable collision checking. Defaults to true. |
True
|
params |
dict
|
Additional parameters for the collision checking. Defaults to default_param. |
...
|
Notes
- GalbotMotion currently does NOT provide real-time obstacle perception / automatic environment updates.
- The environment for collision checking is the set of obstacles you manually load via add_obstacle() and attach_target_object().
Returns:
| Name | Type | Description |
|---|---|---|
bool |
tuple[MotionStatus, list[bool]]
|
True if there is a collision, False otherwise. |
detach_target_object
Remove the specified obstacle by ID
detach_tool
Detach a tool from the specified robot motion chain (left_arm / right_arm).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chain |
str
|
The robot motion chain. |
required |
params |
dict
|
Additional parameters for the tool detachment. Defaults to default_param. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
MotionStatus
|
True if the tool detachment is successful, False otherwise. |
forward_kinematics
forward_kinematics(target_frame: str, reference_frame: str = 'base_link', joint_state: collections.abc.Mapping[str, collections.abc.Sequence[typing.SupportsFloat]] = {}, params: Parameter = ...) -> tuple[MotionStatus, list[float]]
Perform forward kinematics to compute the pose of a target frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_frame |
str
|
The name of the target frame. |
required |
reference_frame |
str
|
The name of the reference frame. Defaults to "base_link". |
'base_link'
|
joint_state |
dict
|
A dictionary mapping joint names to their positions. Defaults to an empty dictionary. |
{}
|
params |
dict
|
Additional parameters for the forward kinematics. Defaults to default_param. |
...
|
Returns:
| Name | Type | Description |
|---|---|---|
Pose |
tuple[MotionStatus, list[float]]
|
The computed pose of the target frame. |
forward_kinematics_by_state
forward_kinematics_by_state(target_frame: str, reference_robot_states: RobotStates = None, reference_frame: str = 'base_link', params: Parameter = ...) -> tuple[MotionStatus, list[float]]
Perform forward kinematics to compute the pose of a target frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_frame |
str
|
The name of the target frame. |
required |
reference_robot_states |
RobotStates
|
The reference robot states. Defaults to nullptr. |
None
|
reference_frame |
str
|
The name of the reference frame. Defaults to "base_link". |
'base_link'
|
params |
dict
|
Additional parameters for the forward kinematics. Defaults to default_param. |
...
|
Returns:
| Name | Type | Description |
|---|---|---|
Pose |
tuple[MotionStatus, list[float]]
|
The computed pose of the target frame. |
get_end_effector_pose
get_end_effector_pose(end_effector_frame: str, reference_frame: str = 'base_link') -> tuple[MotionStatus, list[float]]
Get the pose of a specified end-effector frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
end_effector_frame |
str
|
The name of the end-effector frame. |
required |
reference_frame |
str
|
The name of the reference frame. Defaults to "base_link". |
'base_link'
|
Returns:
| Name | Type | Description |
|---|---|---|
Pose |
tuple[MotionStatus, list[float]]
|
The computed pose of the end-effector frame. |
get_end_effector_pose_on_chain
get_end_effector_pose_on_chain(chain_name: str, frame_id: str = 'EndEffector', reference_frame: str = 'base_link') -> tuple[MotionStatus, list[float]]
Get the pose of a specified end-effector frame on a given chain.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chain_name |
str
|
The name of the chain. |
required |
frame_id |
str
|
The name of the end-effector frame. Defaults to "EndEffector". |
'EndEffector'
|
reference_frame |
str
|
The name of the reference frame. Defaults to "base_link". |
'base_link'
|
Returns:
| Name | Type | Description |
|---|---|---|
Pose |
tuple[MotionStatus, list[float]]
|
The computed pose of the end-effector frame on the specified chain. |
get_link_names
Get robot link names from kinematic model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
only_end_effector |
bool
|
If true, returns only end-effector/tool links; if false, returns all links including base, intermediate, and end-effector links. Default: false (all links). |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
list |
list[str]
|
Vector of link name strings (empty if retrieval fails) |
Note
End-effector detection based on link having no child links in kinematic tree. Useful for forward kinematics queries or TF frame validation.
get_motion_plan_config
get motion config
get_supported_ee_frames
Get the list of supported end-effector frames.
get_supported_obstacle_types
Get the list of supported obstacle types.
init
Initialize the system interface dependencies.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if initialization is successful, False otherwise. |
inverse_kinematics
inverse_kinematics(target_pose: collections.abc.Sequence[typing.SupportsFloat], chain_names: collections.abc.Sequence[str], target_frame: str = 'EndEffector', reference_frame: str = 'base_link', initial_joint_positions: collections.abc.Mapping[str, collections.abc.Sequence[typing.SupportsFloat]] = {}, enable_collision_check: bool = True, params: Parameter = ...) -> tuple[MotionStatus, dict[str, list[float]]]
Perform inverse kinematics to compute the joint positions for a target pose.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_pose |
Pose
|
The target pose. |
required |
chain_names |
list of str
|
The list of chain names to consider. |
required |
target_frame |
str
|
The name of the target frame. Defaults to "EndEffector". |
'EndEffector'
|
reference_frame |
str
|
The name of the reference frame. Defaults to "base_link". |
'base_link'
|
initial_joint_positions |
dict
|
A dictionary mapping joint names to their initial positions. Defaults to an empty dictionary. |
{}
|
enable_collision_check |
bool
|
Whether to enable collision checking. Defaults to true. |
True
|
params |
dict
|
Additional parameters for the inverse kinematics. Defaults to default_param. |
...
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
tuple[MotionStatus, dict[str, list[float]]]
|
A dictionary mapping joint names to their computed positions. |
inverse_kinematics_by_state
inverse_kinematics_by_state(target_pose: collections.abc.Sequence[typing.SupportsFloat], chain_names: collections.abc.Sequence[str], target_frame: str = 'EndEffector', reference_frame: str = 'base_link', reference_robot_states: RobotStates = None, enable_collision_check: bool = True, params: Parameter = ...) -> tuple[MotionStatus, dict[str, list[float]]]
Perform inverse kinematics to compute the joint positions for a target pose.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_pose |
Pose
|
The target pose. |
required |
chain_names |
list of str
|
The list of chain names to consider. |
required |
target_frame |
str
|
The name of the target frame. Defaults to "EndEffector". |
'EndEffector'
|
reference_frame |
str
|
The name of the reference frame. Defaults to "base_link". |
'base_link'
|
reference_robot_states |
RobotStates
|
The reference robot states. Defaults to nullptr. |
None
|
enable_collision_check |
bool
|
Whether to enable collision checking. Defaults to true. |
True
|
params |
dict
|
Additional parameters for the inverse kinematics. Defaults to default_param. |
...
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
tuple[MotionStatus, dict[str, list[float]]]
|
A dictionary mapping joint names to their computed positions. |
motion_plan
motion_plan(target: RobotStates, start: RobotStates = None, reference_robot_states: RobotStates = None, enable_collision_check: bool = True, params: Parameter = ...) -> tuple[MotionStatus, dict[str, list[list[float]]]]
Plan a motion to a single waypoint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target |
Pose
|
The target pose. |
required |
start |
RobotStates
|
The initial robot states. Defaults to nullptr. |
None
|
reference_robot_states |
RobotStates
|
The reference robot states. Defaults to nullptr. |
None
|
enable_collision_check |
bool
|
Whether to enable collision checking. Defaults to true. |
True
|
params |
dict
|
Additional parameters for the motion planning. Defaults to default_param. |
...
|
Notes
- GalbotMotion currently does NOT provide real-time obstacle perception / automatic environment updates.
- If collision checking is enabled, collisions are checked against self-collision and obstacles that you manually load via add_obstacle()/attach_target_object().
- In contrast, the Navigation module (GalbotNavigation) may use real-time perception/avoidance depending on deployment; this is not currently integrated into GalbotMotion.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
tuple[MotionStatus, dict[str, list[list[float]]]]
|
True if the motion planning is successful, False otherwise. |
motion_plan_multi_waypoints
motion_plan_multi_waypoints(targets: collections.abc.Mapping[RobotStates, collections.abc.Sequence[collections.abc.Sequence[typing.SupportsFloat]]], start: collections.abc.Sequence[RobotStates] = [], reference_robot_states: RobotStates = None, enable_collision_check: bool = True, params: Parameter = ...) -> tuple[MotionStatus, dict[str, list[list[float]]]]
Plan a motion to multiple waypoints.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
targets |
dict of Pose
|
The target poses. |
required |
waypoint_poses |
list of list of float
|
The waypoint poses. |
required |
start |
RobotStates
|
The initial robot states. Defaults to nullptr. |
[]
|
reference_robot_states |
RobotStates
|
The reference robot states. Defaults to nullptr. |
None
|
enable_collision_check |
bool
|
Whether to enable collision checking. Defaults to true. |
True
|
params |
dict
|
Additional parameters for the motion planning. Defaults to default_param. |
...
|
Notes
- GalbotMotion currently does NOT provide real-time obstacle perception / automatic environment updates.
- If collision checking is enabled, collisions are checked against self-collision and obstacles that you manually load via add_obstacle()/attach_target_object().
- In contrast, the Navigation module (GalbotNavigation) may use real-time perception/avoidance depending on deployment; this is not currently integrated into GalbotMotion.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
tuple[MotionStatus, dict[str, list[list[float]]]]
|
True if the motion planning is successful, False otherwise. |
move_whole_body_joint_zero
move_whole_body_joint_zero(is_blocking: bool = True, leg_head_speed_rad_s: typing.SupportsFloat = 0.2, leg_head_timeout_s: typing.SupportsFloat = 15.0, params: Parameter = ...) -> MotionStatus
Move whole-body joints to the predefined zero (home) configuration.
- leg/head are commanded via GalbotRobot direct joint control
- left/right arms are planned via motion planner with collision checking enabled
set_end_effector_pose
set_end_effector_pose(target_pose: collections.abc.Sequence[typing.SupportsFloat], end_effector_frame: str, reference_frame: str = 'base_link', reference_robot_states: RobotStates = None, enable_collision_check: bool = True, is_blocking: bool = True, timeout: typing.SupportsFloat = -1.0, params: Parameter = ...) -> MotionStatus
Set the pose of a specified end-effector frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_pose |
Pose
|
The target pose. |
required |
end_effector_frame |
str
|
The name of the end-effector frame. |
required |
reference_frame |
str
|
The name of the reference frame. Defaults to "base_link". |
'base_link'
|
reference_robot_states |
RobotStates
|
The reference robot states. Defaults to nullptr. |
None
|
enable_collision_check |
bool
|
Whether to enable collision checking. Defaults to true. |
True
|
is_blocking |
bool
|
Whether to block until the motion is completed. Defaults to true. |
True
|
timeout |
float
|
The maximum time to wait for the motion to complete. Defaults to -1.0. |
-1.0
|
params |
dict
|
Additional parameters for the motion planning. Defaults to default_param. |
...
|
Returns:
| Name | Type | Description |
|---|---|---|
bool |
MotionStatus
|
True if the motion planning is successful, False otherwise. |
GalbotNavigation
Functions
get_instance
staticmethod
Get the GalbotNavigation singleton instance.
Returns:
| Name | Type | Description |
|---|---|---|
GalbotNavigation |
GalbotNavigation
|
The GalbotNavigation singleton instance. |
check_goal_arrival
Check whether the robot has reached the goal pose.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
Whether the robot has reached the goal pose. |
check_path_reachability
check_path_reachability(goal_pose: typing.Annotated[numpy.typing.ArrayLike, numpy.float64], start_pose: typing.Annotated[numpy.typing.ArrayLike, numpy.float64]) -> bool
Check whether there is a reachable path from the start pose to the goal pose in the map frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
goal_pose |
array
|
The goal pose [x, y, z, qx, qy, qz, qw], map frame. |
required |
start_pose |
array
|
The start pose [x, y, z, qx, qy, qz, qw], map frame. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
Whether there is a reachable path from the start pose to the goal pose. |
get_current_pose
Get the current pose of the robot.
Returns:
| Name | Type | Description |
|---|---|---|
array |
Annotated[list[float], 'FixedSize(7)']
|
[x, y, z, qx, qy, qz, qw], map frame |
get_navigation_status
Get the current navigation task state (UNKNOWN, RUNNING, SUCCESS, FAILED). Use when running non-blocking navigation to poll and exit error logic in time on FAILED or timeout.
Returns:
| Name | Type | Description |
|---|---|---|
NavigationTaskStatus |
NavigationTaskStatus
|
Current task state. |
init
Initialize the GalbotNavigation object.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if initialization is successful, False otherwise. |
is_localized
Check if the robot is localized.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the robot is localized, False otherwise. |
move_straight_to
move_straight_to(goal_pose: typing.Annotated[numpy.typing.ArrayLike, numpy.float64], is_blocking: bool = True, timeout: typing.SupportsFloat = 8) -> tuple
Navigate to the given pose in odom frame, disable collision check and enable omni-directional planning.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
goal_pose |
array
|
The goal pose [x, y, z, qx, qy, qz, qw], base_link frame. |
required |
is_blocking |
bool
|
Whether to block the call until the goal is reached, default false. |
True
|
timeout |
int
|
The timeout in seconds, default 8. |
8
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
tuple
|
(success: bool, status_string: str) - success: Whether the navigation is successful. - status_string: Status string. |
navigate_to_goal
navigate_to_goal(goal_pose: typing.Annotated[numpy.typing.ArrayLike, numpy.float64], enable_collision_check: bool = True, is_blocking: bool = False, timeout: typing.SupportsFloat = 8, omni_plan: bool = True) -> tuple
Plan and navigate to the given pose.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
goal_pose |
array
|
The goal pose [x, y, z, qx, qy, qz, qw], map frame. |
required |
collision_check |
bool
|
Whether to enable collision check, default true. |
required |
is_blocking |
bool
|
Whether to block the call until the goal is reached, default false. |
False
|
timeout |
int
|
The timeout in seconds, default 8. |
8
|
omni_plan |
bool
|
Whether to enable omni-directional planning, default true.
when configure omni_plan option, the parameter |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
tuple
|
(success: bool, status_string: str) - success: Whether the navigation is successful. - status_string: Status string. |
relocalize
Relocalize the robot to the given pose.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
init_pose |
array
|
The initial pose [x, y, z, qx, qy, qz, qw]. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
tuple
|
(success: bool, status_string: str) - success:是否重定位成功 - status_string:状态描述字符串 |
GalbotOneFoxtrotSensor
Members:
LEFT_WRIST_FORCE : Left wrist force sensor
RIGHT_WRIST_FORCE : Right wrist force sensor
GalbotPerception
Perception module interface
Functions
get_instance
staticmethod
Get the GalbotPerception singleton instance.
Returns:
| Name | Type | Description |
|---|---|---|
GalbotPerception |
GalbotPerception
|
The singleton instance. |
get_latest_result
Immediately return the latest available result (non-blocking).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
module |
PerceptionModule
|
The perception module. |
required |
Returns:
| Type | Description |
|---|---|
tuple
|
tuple[bool, DetectionResult]: (success, result). success is False if no data yet. |
init
Initialize perception modules, create communication channels and load models.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
enabled_modules |
set[PerceptionModule]
|
Set of modules to enable. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if all modules loaded successfully. |
run_once
Trigger a single inference for the specified module. Note: After init, wait ~10s for models to be ready before calling run_once.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
module |
PerceptionModule
|
The perception module to run once. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the command was sent successfully. |
wait_for_new_result
Block until the specified module produces a new result, or timeout.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
module |
PerceptionModule
|
The perception module. |
required |
timeout_s |
float
|
Timeout in seconds (default 5.0). |
5.0
|
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if new data arrived, False on timeout. |
GalbotRobot
Functions
get_instance
staticmethod
Get the singleton instance of GalbotRobot.
Returns:
| Name | Type | Description |
|---|---|---|
GalbotRobot |
GalbotRobot
|
The singleton instance of GalbotRobot. |
acquire_controller
Acquire a controller for a specific joint group.
Acquires the specified controller. This is the opposite operation of release_controller. It activates the specified controller strategy and grants it authority over the hardware.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
controller_name |
ControllerName
|
The controller to acquire. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ControlStatus |
ControlStatus
|
Result of the operation. |
check_trajectory_execution_status
check_trajectory_execution_status(joint_groups: collections.abc.Sequence[JointGroup] = []) -> list[TrajectoryControlStatus]
Get trajectory execution status for specified joint groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_groups |
List[str] or List[JointGroup]
|
Joint groups to query, can use strings or JointGroup enums (optional). |
[]
|
Returns:
| Type | Description |
|---|---|
list[TrajectoryControlStatus]
|
List[TrajectoryControlStatus]: List of trajectory execution statuses. |
destroy
Clean up system and middleware resources.
Returns:
| Type | Description |
|---|---|
None
|
None |
execute_joint_trajectory
Execute trajectory data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trajectory |
Trajectory
|
Trajectory data to execute. |
required |
is_blocking |
bool
|
Whether to block until trajectory execution completes (optional, default: True). |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
ControlStatus |
ControlStatus
|
Trajectory execution/sending result. |
execute_whole_body_target
execute_whole_body_target(joint_positions: collections.abc.Sequence[typing.SupportsFloat], x: typing.SupportsFloat, y: typing.SupportsFloat, yaw: typing.SupportsFloat, frame_id: str = 'odom', reference_frame_id: str = 'odom', is_blocking: bool = True, speed_rad_s: typing.SupportsFloat = 0.2, time_from_start_s: typing.SupportsFloat = 10.0, timeout_s: typing.SupportsFloat = 15.0) -> ControlStatus
Execute whole-body target with base pose and frame ids.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_positions |
List[float]
|
Whole-body joint positions. |
required |
x |
float
|
Target x position. |
required |
y |
float
|
Target y position. |
required |
yaw |
float
|
Target yaw (rad). |
required |
frame_id |
str
|
Frame id ("base_link"/"odom"/"map"). Default "odom". |
'odom'
|
reference_frame_id |
str
|
Reference frame id ("odom"/"map"). Default "odom". |
'odom'
|
is_blocking |
bool
|
Whether to block (optional, default: True). |
True
|
speed_rad_s |
float
|
Joint speed limit in rad/s (optional, default: 0.2). |
0.2
|
time_from_start_s |
float
|
Base interpolation duration in seconds (optional, default: 10.0). |
10.0
|
timeout_s |
float
|
Blocking timeout in seconds (optional, default: 15.0). |
15.0
|
get_active_controller
Get the active controller for a joint group enum.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_group |
JointGroup
|
The joint group to query. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ControllerName |
ControllerName
|
Active controller for the group. |
get_bms_information
Get EMS/BMS information.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
Dictionary containing the following keys: - 'voltage': Battery voltage in V - 'current': Battery current in A - 'battery_level': Battery level in % - 'temperature': Battery temperature in C - 'charging_status': Charging status (bool) - 'health_status': Health status (bool) - 'capacity': Remaining capacity in Ah |
dict
|
Returns empty dictionary on failure. |
get_camera_intrinsic
Get camera intrinsic parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
camera_id |
SensorType
|
Camera sensor ID to query. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
Dictionary containing camera intrinsic parameters. - header: Message header with timestamp and frame information - height: Image height in pixels - width: Image width in pixels - distortion_model: Distortion model, e.g., 'plumb_bob' - D: Distortion coefficients (list of float) - K: Camera intrinsic matrix (list of 9 float) - binning_x: Horizontal binning factor - binning_y: Vertical binning factor - roi: Region of interest (list of int) - camera_type: camera type ... Returns empty dictionary on failure. |
get_depth_data
Get latest depth image data from specified camera.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
camera_id |
SensorType
|
Depth camera sensor ID to query. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
Dictionary containing the following keys: - 'header': Message header with timestamp and frame information - 'format': Image format, e.g., 'depth16' or other - 'depth_scale': Depth scaling factor - 'height': Image height in pixels - 'width': Image width in pixels - 'data': Compressed depth image binary data (bytes). |
dict
|
Returns empty dictionary on failure. |
get_device_information
Get device information including model, serial number, firmware version, hardware version, and manufacturer.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
Dictionary containing the following keys: - 'model': Device model name or identifier (str) - 'serial_number': Unique serial number for device identification (str) - 'firmware_version': System firmware version string (str) - 'hardware_version': Hardware version or revision number (str) - 'manufacturer': Manufacturer name or company identifier (str) |
dict
|
Returns empty dictionary on failure. |
get_force_sensor_data
Get data from specified force sensor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sensor_type |
GalbotOneFoxtrotSensor
|
Force sensor enum to query. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
Dictionary containing the following keys: - 'timestamp_ns': Timestamp in nanoseconds - 'force': Force vector dictionary with 'x', 'y', 'z' keys - 'torque': Torque vector dictionary with 'x', 'y', 'z' keys |
dict
|
Returns empty dictionary on failure. |
get_frame_names
Get all frame names.
Returns:
| Name | Type | Description |
|---|---|---|
list |
str
|
List of all frame names. |
get_gripper_state
Get gripper state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
end_effector |
JointGroup
|
Gripper enum value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GripperState |
GripperState
|
Gripper state information. |
get_imu_data
Get data from specified IMU sensor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sensor_id |
SensorType
|
IMU sensor enum to query. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
Dictionary containing the following keys: - 'timestamp_ns': Timestamp in nanoseconds - 'accel': Acceleration Vector3 {'x': float, 'y': float, 'z': float} - 'gyro': Gyroscope Vector3 {'x': float, 'y': float, 'z': float} - 'magnet': Magnetometer Vector3 {'x': float, 'y': float, 'z': float} |
dict
|
Returns empty dictionary on failure. |
get_joint_group_names
Get available joint group names for the robot.
Returns:
| Type | Description |
|---|---|
list[str]
|
List[str]: Array of available joint group names, returns empty list on failure. |
get_joint_names
get_joint_names(only_active_joint: bool = True, joint_groups: collections.abc.Sequence[JointGroup] = []) -> list[str]
Get robot joint names.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
only_active_joint |
bool
|
Whether to only get active joints (optional, default: True). |
True
|
joint_groups |
List[str] or List[JointGroup]
|
Joint groups, can use strings or JointGroup enums (optional). |
[]
|
Returns:
| Type | Description |
|---|---|
list[str]
|
List[str]: Array of corresponding joint names. |
get_joint_positions
get_joint_positions(joint_groups: collections.abc.Sequence[JointGroup], joint_names: collections.abc.Sequence[str] = []) -> list[float]
Get joint positions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_groups |
List[str] or List[JointGroup]
|
Joint groups to query, can use strings or JointGroup enums. |
required |
joint_names |
List[str]
|
Specific joint names, takes priority over joint_groups (optional). |
[]
|
Returns:
| Type | Description |
|---|---|
list[float]
|
List[float]: Array of corresponding joint angles in radians. |
get_joint_states
get_joint_states(joint_group_vec: collections.abc.Sequence[JointGroup], joint_names_vec: collections.abc.Sequence[str] = []) -> list[JointState]
Get real-time joint states.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_group_vec |
List[str] or List[JointGroup]
|
Joint groups to query, can use strings or JointGroup enums (optional). |
required |
joint_names_vec |
List[str]
|
Specific joint names, takes priority over joint_group_vec (optional). |
[]
|
Returns:
| Type | Description |
|---|---|
list[JointState]
|
List[JointState]: Real-time state data for corresponding joints. |
get_lidar_data
Get latest point cloud data from specified LiDAR sensor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sensor_id |
SensorType
|
LiDAR sensor enum to query. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
Dictionary containing point cloud data fields and binary point data. Returns empty dictionary on failure. |
get_log_information
Get log information.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timewindow_s |
int64_t
|
Time window in seconds. |
required |
log_level |
int
|
Log level. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
Dictionary containing the following keys: - 'level': Log level - 'message': Log message |
dict
|
Returns empty dictionary on failure. |
get_odom
Get odometry information.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
Dictionary containing the following keys: - 'timestamp_ns': Timestamp in nanoseconds - 'position': Position array [x, y, z] in meters - 'orientation': Quaternion array [x, y, z, w] |
dict
|
Returns empty dictionary on failure. |
get_rgb_data
Get latest RGB image data from specified camera.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
camera_id |
SensorType
|
Camera sensor ID to query. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
Dictionary containing the following keys: - 'header': Message header with timestamp and frame information - 'format': Image format, e.g., 'jpeg' or 'png' - 'data': Compressed image binary data (bytes) |
dict
|
Returns empty dictionary on failure. |
get_sensor_extrinsic
Query sensor extrinsic transform (TF) from reference_frame to sensor frame. Note: Now we DO NOT implemented the extrinsic parameters of the ultrasonic sensor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sensor_id |
SensorType
|
Sensor enum to query. |
required |
reference_frame |
str
|
Reference coordinate frame (optional, default: "base_link"). |
'base_link'
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
(List[float], int)
|
Transform vector list and timestamp. Returns empty list on failure or if the transform is not available. |
get_suction_cup_state
Get suction cup state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
end_effector |
JointGroup
|
Suction cup enum value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
SuctionCupState |
SuctionCupState
|
Suction cup state information. |
get_transform
get_transform(target_frame: str, source_frame: str, timestamp_ns: typing.SupportsInt = 0, timeout_ms: typing.SupportsInt = 100) -> tuple
Query coordinate frame transform (TF).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_frame |
str
|
Target coordinate frame (e.g., map, base_link, imu_base_link; actual list is from get_frame_names()). |
required |
source_frame |
str
|
Source coordinate frame (e.g., map, base_link, imu_base_link; actual list is from get_frame_names()). |
required |
timestamp_ns |
int
|
Desired transform timestamp in nanoseconds, 0 for latest (optional, default: 0). |
0
|
timeout_ms |
int
|
Query timeout in milliseconds (optional, default: 100). |
100
|
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
(List[float], int)
|
Transform matrix list and timestamp. Returns empty list on failure. |
get_ultrasonic_data
Get data from specified ultrasonic sensor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ultrasonic_type |
UltrasonicType
|
Ultrasonic sensor enum to query. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
Dictionary containing the following keys: - 'timestamp_ns': Timestamp in nanoseconds - 'distance': Distance value in meters |
dict
|
Returns empty dictionary on failure. |
get_volume
Get current system global volume value.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
Current volume value, range 0.0 to 100.0. |
init
Initialize the singleton object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
enable_sensor_set |
set[SensorType]
|
Set of sensors to enable. |
...
|
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if initialization succeeded, False otherwise. |
is_running
Check if the system is running.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if system is running, False if shutdown signal captured and preparing to shutdown. |
release_controller
Release a controller for a specific joint group using enum.
Releases the specified controller for the given joint group. This puts the controller in a released state where it stops sending commands to the joints. This is the opposite operation of acquire_controller.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_group |
JointGroup
|
Enum of the joint group. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ControlStatus |
ControlStatus
|
Result of the operation. |
reload_controller
Reload a controller for a specific joint group using enum.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_group |
JointGroup
|
Enum of the joint group. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ControlStatus |
ControlStatus
|
Result of the operation. |
request_shutdown
Send SIGINT signal to request shutdown.
Returns:
| Type | Description |
|---|---|
None
|
None |
set_base_pose
set_base_pose(x: typing.SupportsFloat, y: typing.SupportsFloat, yaw: typing.SupportsFloat, frame_id: str = 'odom', reference_frame_id: str = 'odom', is_blocking: bool = True, timeout_s: typing.SupportsFloat = 15.0) -> ControlStatus
Set base pose command with frame ids.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x |
float
|
Target x position. |
required |
y |
float
|
Target y position. |
required |
yaw |
float
|
Target yaw (rad). |
required |
frame_id |
str
|
Frame id ("base_link"/"odom"/"map"). Default "odom". |
'odom'
|
reference_frame_id |
str
|
Reference frame id ("odom"/"map"). Default "odom". |
'odom'
|
is_blocking |
bool
|
Whether to block until command execution completes (optional, default: True). |
True
|
timeout_s |
float
|
Blocking timeout in seconds (optional, default: 15.0). |
15.0
|
Returns:
| Name | Type | Description |
|---|---|---|
ControlStatus |
ControlStatus
|
Command sending result. |
set_base_velocity
set_base_velocity(linear_velocity: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat], 'FixedSize(3)'], angular_velocity: typing.Annotated[collections.abc.Sequence[typing.SupportsFloat], 'FixedSize(3)'], duration_s: typing.SupportsFloat = 0.0) -> ControlStatus
Set base velocity command.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
linear_velocity |
List[float]
|
Linear velocity command [vx, vy, vz] in m/s. |
required |
angular_velocity |
List[float]
|
Angular velocity command [wx, wy, wz] in rad/s. |
required |
duration_s |
float
|
Duration in seconds before auto-stop (optional, default: 0.0). If <= 0.0, no automatic stop is performed. |
0.0
|
Returns:
| Name | Type | Description |
|---|---|---|
ControlStatus |
ControlStatus
|
Command sending result. |
set_gripper_command
set_gripper_command(end_effector: JointGroup, width_m: typing.SupportsFloat, velocity_mps: typing.SupportsFloat = 0.03, effort: typing.SupportsFloat = 30, is_blocking: bool = True) -> ControlStatus
Set gripper command.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
end_effector |
JointGroup
|
Gripper enum value. |
required |
width_m |
float
|
Target gripper width in meters. |
required |
velocity_mps |
float
|
Gripper motion speed in m/s (optional, default: 0.03). |
0.03
|
effort |
float
|
Gripper effort in Nm (optional, default: 30). |
30
|
is_blocking |
bool
|
Whether to block until action completes (optional, default: True). |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
ControlStatus |
ControlStatus
|
Command execution/sending result. |
set_joint_commands
set_joint_commands(joint_commands: collections.abc.Sequence[JointCommand], joint_groups: collections.abc.Sequence[JointGroup] = [], joint_names: collections.abc.Sequence[str] = [], time_from_start_s: typing.SupportsFloat = 10.0) -> ControlStatus
Set joint commands with JointGroup enums.
This interface is suitable for high-frequency control usage
For standard joints (legs, head, arms, etc.), only the position field in each JointCommand will be effective;
other fields such as velocity, current/effort, are ignored.
For gripper joints, the position field represents gripper width and both velocity and effort fields are supported and effective.
Gripper motion uses whichever is slower between the specified velocity and time_from_start_s. Therefore, when setting the gripper velocity,
time_from_start_s can be set to 0 (fastest arrival), and the gripper will be controlled directly by the specified velocity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_commands |
List[JointCommand]
|
List of joint commands to control. |
required |
joint_groups |
List[str] or List[JointGroup]
|
Joint groups to control, can use strings or enums (optional). |
[]
|
joint_names |
List[str]
|
Specific joint names, takes priority over joint_groups (optional). |
[]
|
time_from_start_s |
float
|
Time in seconds from the start of the motion to execute the command (optional, default: 10.0). |
10.0
|
Returns:
| Name | Type | Description |
|---|---|---|
ControlStatus |
ControlStatus
|
Result of command execution. |
set_joint_commands_batch
Set joint commands in batch mode (non-blocking).
Sets multiple joint command trajectory points in real-time control mode, supporting one-time submission of trajectory control commands for multiple time points. Provides a non-blocking high-frequency trajectory execution interface. Similar to set_joint_commands but supports batch trajectory control, suitable for scenarios such as VLA inference batch output.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trajectory |
Trajectory
|
Trajectory data structure containing waypoints with joint commands. Each TrajectoryPoint contains time_from_start and a list of JointCommand. JointCommand includes position (rad), velocity (rad/s), acceleration (rad/s²), effort (N·m), Kp (position gain), and Kd (velocity gain). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ControlStatus |
ControlStatus
|
Command submission result. Returns immediately without waiting for execution completion (non-blocking). |
set_joint_positions
set_joint_positions(joint_positions: collections.abc.Sequence[typing.SupportsFloat], joint_groups: collections.abc.Sequence[JointGroup] = [], joint_names: collections.abc.Sequence[str] = [], is_blocking: bool = True, speed_rad_s: typing.SupportsFloat = 0.2, timeout_s: typing.SupportsFloat = 15.0) -> ControlStatus
Set target joint positions for specified joint groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_positions |
List[float]
|
Array of joint angles in radians. |
required |
joint_groups |
List[str] or List[JointGroup]
|
Joint groups to control, can use strings or enums (optional). |
[]
|
joint_names |
List[str]
|
Specific joint names, takes priority over joint_groups (optional). |
[]
|
is_blocking |
bool
|
Whether to block until command execution completes (optional, default: True). |
True
|
speed_rad_s |
float
|
Maximum joint speed in rad/s (optional, default: 0.2). |
0.2
|
timeout_s |
float
|
Maximum blocking wait time in seconds (optional, default: 15.0). |
15.0
|
Returns:
| Name | Type | Description |
|---|---|---|
ControlStatus |
ControlStatus
|
Execution result status. |
set_suction_cup_command
Set suction cup command.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
end_effector |
JointGroup
|
Suction cup enum value. |
required |
activate |
bool
|
Whether to activate the suction cup. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ControlStatus |
ControlStatus
|
Command sending result. |
set_volume
Set system global volume value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
volume |
float
|
Target volume value, range 0.0 to 100.0. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
Returns the volume setting result. True indicates the volume was set successfully, False indicates the volume setting failed. |
start_controller
Start a controller for a specific joint group using enum.
Starts the specified controller for the given joint group. This puts the controller in an active state where it can send commands to the joints. This is the opposite operation of stop_controller.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_group |
JointGroup
|
Enum of the joint group. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ControlStatus |
ControlStatus
|
Result of the operation. |
start_microphone_stream_input
start_microphone_stream_input(callback: typing.Callable, chunk_size: typing.SupportsInt = 2560, use_raw_audio: bool = False) -> str
Start microphone streaming audio input.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
callback |
callable
|
Audio data callback function with signature: void(dict audio_data). The audio_data dict contains: - 'header': Message header with timestamp and frame information - 'type': Audio data type ('waken_up', 'denoise_chunk', 'vad_begin', 'vad_chunk', 'vad_end') - 'format': Audio format ('pcm', 'json') - 'data': Audio binary data (bytes) |
required |
chunk_size |
int
|
Audio data chunk size in bytes, default value 2560. Dynamic configuration not supported yet |
2560
|
use_raw_audio |
bool
|
Whether to use raw audio, default false. Dynamic configuration not supported yet. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Stream ID used to identify the audio input stream. |
stop_audio_stream_output
Stop the specified audio output stream or all active audio output streams playback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stream_id |
str
|
Audio output stream ID to stop. Empty string means stop all active audio output streams (optional, default: ""). |
''
|
Returns:
| Type | Description |
|---|---|
None
|
None |
stop_base
Stop base motion.
Returns:
| Name | Type | Description |
|---|---|---|
ControlStatus |
ControlStatus
|
Command sending result. |
stop_controller
Stop a controller for a specific joint group using enum.
Stops the specified controller for the given joint group. This puts the controller in a stopped state where it no longer sends commands to the joints. This is the opposite operation of start_controller.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_group |
JointGroup
|
Enum of the joint group. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ControlStatus |
ControlStatus
|
Result of the operation. |
stop_microphone_stream_input
Stop the specified microphone streaming audio input.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stream_id |
str
|
Audio input stream ID to stop. Empty string stops all active streams (optional, default: ""). |
''
|
Returns:
| Type | Description |
|---|---|
None
|
None |
stop_trajectory_execution
Stop all currently executing trajectories.
Returns:
| Name | Type | Description |
|---|---|---|
ControlStatus |
ControlStatus
|
Command sending result. |
switch_controller
Switch controller for a specific joint group.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
controller_name |
ControllerName
|
The controller to switch to. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ControlStatus |
ControlStatus
|
Result of the operation. |
wait_for_shutdown
Sleep continuously until shutdown signal is received.
Returns:
| Type | Description |
|---|---|
None
|
None |
write_audio_stream_output
Write PCM format audio data chunk to audio output stream for real-time playback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
audio_chunk |
bytes or str
|
Audio data chunk in PCM format (16000 Hz, 16-bit little-endian), single channel. |
required |
stream_id |
str
|
Audio stream ID to distinguish different audio sources. Empty string means use default stream (optional, default: ""). |
''
|
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if audio data has been successfully written and playback task issued, False if write failed. |
zero_whole_body_and_base
zero_whole_body_and_base(frame_id: str = 'odom', reference_frame_id: str = 'odom', is_blocking: bool = True, leg_head_speed_rad_s: typing.SupportsFloat = 0.2, leg_head_timeout_s: typing.SupportsFloat = 15.0, params: ... = None) -> tuple[..., ControlStatus]
One-key zero: move whole-body joints to zero and base (x,y,yaw) to zero with frames.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
frame_id |
str
|
Frame id ("base_link"/"odom"/"map"). Default "odom". |
'odom'
|
reference_frame_id |
str
|
Reference frame id ("odom"/"map"). Default "odom". |
'odom'
|
is_blocking |
bool
|
Whether to block on joint zeroing (optional, default: True). |
True
|
leg_head_speed_rad_s |
float
|
Leg/head joint speed limit in rad/s (optional, default: 0.2). |
0.2
|
leg_head_timeout_s |
float
|
Leg/head blocking timeout in seconds (optional, default: 15.0). |
15.0
|
params |
Parameter | None
|
Motion planning parameters (optional, default: None). |
None
|
GripperState
Gripper state information
Attributes
Header
ImuData
JointCommand
Single joint command object
Attributes
JointGroup
Members:
HEAD : Head joint group
LEFT_ARM : Left arm joint group
RIGHT_ARM : Right arm joint group
LEG : Leg joint group
CHASSIS : Chassis joint group
LEFT_GRIPPER : Left gripper
RIGHT_GRIPPER : Right gripper
LEFT_SUCTION_CUP : Left suction cup
RIGHT_SUCTION_CUP : Right suction cup
LidarData
LiDAR point cloud data
Attributes
LogLevel
Members:
TRACE : Trace level
DEBUG : Debug level
INFO : Info level
WARN : Warning level
ERROR : Error level
CRITICAL : Critical level
MotionStatus
Members:
SUCCESS
TIMEOUT
FAULT
INVALID_INPUT
INIT_FAILED
IN_PROGRESS
STOPPED_UNREACHED
DATA_FETCH_FAILED
PUBLISH_FAIL
COMM_DISCONNECTED
STATUS_NUM
UNSUPPORTED_FUNCRION
NavigationTaskStatus
Members:
UNKNOWN
RUNNING
SUCCESS
FAILED
OdomData
Odometry data
Attributes
orientation
property
writable
Orientation quaternion [x, y, z, w]
position
property
writable
Position [x, y, z] (meters)
Parameter
Parameter(direct_execute: bool, blocking: bool, timeout: typing.SupportsFloat, actuate: str, tool_pose: bool, check_collision: bool, frame: str = 'base_link')
Functions
get_actuate_type
Get the actuation type (only link, including torso, including legs).
get_blocking
Get whether to wait synchronously for trajectory execution or planning completion.
get_direct_execute
Get whether to directly execute the trajectory after planning.
get_timeout
Get the maximum waiting time for trajectory execution or planning completion (in seconds).
set_actuate
Set the actuation type (only link, including torso, including legs).
set_blocking
Set whether to wait synchronously for trajectory execution or planning completion.
set_check_collision
Set whether to perform collision detection.
set_direct_execute
Set whether to directly execute the trajectory after planning.
set_move_line
Set whether to use linear movement for planning.
set_reference_frame
Set the reference coordinate frame for planning.
set_timeout
Set the maximum waiting time for trajectory execution or planning completion (in seconds).
PerceptionModule
Perception module type
Members:
LIGHT_STEREO : Lightweight stereo depth
FOUNDATION_STEREO : High-precision stereo depth
PointField
Point cloud field description information
PointFieldDataType
Members:
UNKNOWN
INT8
UINT8
INT16
UINT16
INT32
UINT32
FLOAT32
FLOAT64
RgbData
SUCTION_ACTION_STATE
Suction cup action state enumeration
Members:
IDLE : Not sucking
SUCKING : Currently sucking
SUCCESS : Suction successful
FAILED : Suction failed
SeedType
Members:
RANDOM_SEED
RANDOM_PROGRESSIVE_SEED
USER_DEFINED_SEED
SensorType
Members:
HEAD_LEFT_CAMERA : Head left camera
HEAD_RIGHT_CAMERA : Head right camera
LEFT_ARM_CAMERA : Left arm camera
RIGHT_ARM_CAMERA : Right arm camera
LEFT_ARM_DEPTH_CAMERA : Left arm depth camera
RIGHT_ARM_DEPTH_CAMERA : Right arm depth camera
BASE_LIDAR : Base LiDAR
TORSO_IMU : Torso IMU
BASE_ULTRASONIC : Base ultrasonic sensor
StateCheckType
Members:
EUCLIDEAN_DISTANCE
RADIAN_DISTANCE
SuctionCupState
Suction cup state information
Attributes
action_state
property
writable
Current suction cup action state (SUCTION_ACTION_STATE enum)
TerminationConditionType
Members:
TIMEOUT
TIMEOUT_AND_EXACT_SOLUTION
Timestamp
Trajectory
TrajectoryControlStatus
Members:
INVALID_INPUT : Input parameters do not meet requirements
RUNNING : Currently running
COMPLETED : Reached target position
STOPPED_UNREACHED : Stopped but not reached target
ERROR : Error occurred, cannot continue execution
DATA_FETCH_FAILED : Failed to fetch execution data
TrajectoryPoint
Single trajectory point object
Attributes
joint_command_vec
property
writable
joint_command_vec(List[JointCommand]): List of specific joint commands to execute
UltrasonicData
UltrasonicType
Members:
FRONT_LEFT : Front left
FRONT_RIGHT : Front right
RIGHT_LEFT : Right left
RIGHT_RIGHT : Right right
BACK_LEFT : Back left
BACK_RIGHT : Back right
LEFT_LEFT : Left left
LEFT_RIGHT : Left right
Vector3
Functions
check_motion_status
Convert a MotionStatus enum value to a string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
status |
MotionStatus
|
The motion status to convert. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The string representation of the motion status. |
create_joint_state
Create a JointStates instance.
Returns:
| Name | Type | Description |
|---|---|---|
JointStates |
JointStates
|
A new JointStates instance. |
create_parameter
create_parameter(direct_execute: bool, blocking: bool, timeout: typing.SupportsFloat, actuate: str, tool_pose: bool, check_collision: bool, frame: str = 'base_link') -> Parameter
Create a Parameter instance.
Notes
- GalbotMotion currently does NOT provide real-time obstacle perception / automatic environment updates.
- Attached objects are part of the manually-maintained collision world used by motion planning/checking.
- For obstacle_type == "point_cloud",
keyis typically a point cloud file path provided by the user. - For obstacle_type == "depth_image", this is a manual input to construct collision obstacles; it is not a continuous real-time perception stream for motion planning.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
direct_execute |
bool
|
Whether to execute the motion directly. |
required |
blocking |
bool
|
Whether to block the execution until completion. |
required |
timeout |
float
|
Maximum time to wait for the motion to complete. |
required |
actuate |
str
|
Actuation type (position/velocity/torque). |
required |
tool_pose |
bool
|
Whether the motion is for a tool pose. |
required |
check_collision |
bool
|
Whether to check for collisions. |
required |
frame |
str
|
Coordinate frame for the motion. Defaults to "base_link". |
'base_link'
|
Returns:
| Name | Type | Description |
|---|---|---|
Parameter |
Parameter
|
A new Parameter instance. |