Skip to content

Python API Reference

g1

Motion Plan Configuration module

Classes

AudioData

AudioData()

Audio stream data

Attributes
data property writable
data: list[int]

Binary data packet - for pcm format: 2560 bytes per 80ms, for json: text length or empty

format property writable
format: str

Audio format: 'pcm' (16000Hz 16-bit mono) or 'json' (UTF-8 text)

header property writable
header: Header

Message header with timestamp and frame ID

type property writable
type: str

Audio type identifier: 'waken_up' (wake-up event), 'denoise_chunk' (denoised audio), 'vad_begin' (VAD start), 'vad_chunk' (VAD audio), 'vad_end' (VAD end)

ControlStatus

ControlStatus(value: typing.SupportsInt)

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

ControllerName(value: typing.SupportsInt)

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

DepthData()

Depth image data

Attributes
data property writable
data: list[int]

Compressed depth data

depth_scale property writable
depth_scale: int

Depth scale/quantization factor

format property writable
format: str

Image format

header property writable
header: Header

Message header

height property writable
height: int

Image height

width property writable
width: int

Image width

DetectionAndSegmentationResult

DetectionAndSegmentationResult()

Single detection/segmentation result

Attributes
bbox property
bbox: tuple[int, int, int, int]

Bounding box as (x, y, width, height)

class_index property writable
class_index: int

Class index

class_name property writable
class_name: str

Class name

confidence property writable
confidence: float

Confidence score

keypoints property
keypoints: list[tuple[float, float]]

Keypoints as list of (x, y) tuples

DetectionResult

DetectionResult()

Perception detection result

Attributes
bounding_boxes property
bounding_boxes: list[tuple[int, int, int, int]]

Bounding boxes as list of (x, y, width, height)

class_indices property writable
class_indices: list[int]

List of class indices

class_names property writable
class_names: list[str]

List of class names

confidences property writable
confidences: list[float]

List of confidences

detection_results property writable
detection_results: list[DetectionAndSegmentationResult]

List of DetectionAndSegmentationResult

grasp_pose_result property writable
grasp_pose_result: list[list[float]]

Grasp pose results

instance_mask property
instance_mask: Any

Instance mask as numpy array (HxW or HxWxC), or None if empty

ocr_string property writable
ocr_string: list[str]

OCR results

point_clouds property
point_clouds: list

Point clouds as list of Nx3 numpy arrays

running_info property writable
running_info: str

Running info string

sensor_name property writable
sensor_name: str

Sensor name

target_point_poses property
target_point_poses: list[Annotated[NDArray[float32], '[4, 4]']]

List of 4x4 target point pose matrices (numpy)

target_poses property
target_poses: list[Annotated[NDArray[float32], '[4, 4]']]

List of 4x4 target pose matrices (numpy)

timestamp_ns property writable
timestamp_ns: int

Timestamp in nanoseconds

Functions
clear
clear() -> None

Clear all result fields

get_result_info
get_result_info() -> str

Get result summary string

ForceData

ForceData()

Force sensor data

Attributes
force property writable
force: Vector3

Force vector Vector3

timestamp_ns property writable
timestamp_ns: int

Timestamp (nanoseconds)

torque property writable
torque: Vector3

Torque vector Vector3

GalbotMotion

Functions
get_instance staticmethod
get_instance() -> GalbotMotion

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 box: length / width / height (l / w / h) / sphere: radius / - / - / cylinder: radius / height / -

[0.0, 0.0, 0.0]
key str

key for the obstacle. mesh / point_cloud: file path / depth_image: camera type (front_head / left_arm / right_arm)

''
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", key is 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_tool(chain: str, tool: str) -> MotionStatus

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.

clear_obstacle
clear_obstacle() -> MotionStatus

Remove all loaded obstacles

detach_target_object
detach_target_object(obstacle_id: str) -> MotionStatus

Remove the specified obstacle by ID

detach_tool
detach_tool(chain: str) -> MotionStatus

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_built_obstacles_list
get_built_obstacles_list() -> list[str]

Get the list of built obstacles.

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(only_end_effector: bool = False) -> list[str]

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_plan_config() -> tuple[MotionStatus, MotionPlanConfig]

get motion config

get_supported_chains
get_supported_chains() -> set[str]

Get the list of supported links.

get_supported_ee_frames
get_supported_ee_frames() -> set[str]

Get the list of supported end-effector frames.

get_supported_frames
get_supported_frames() -> set[str]

Get the list of supported reference frames.

get_supported_links() -> set[str]

Initialize system interface dependencies.

get_supported_obstacle_types
get_supported_obstacle_types() -> set[str]

Get the list of supported obstacle types.

get_supported_tool_list
get_supported_tool_list() -> set[str]

Get the list of supported tools.

init
init() -> bool

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
remove_obstacle
remove_obstacle(obstacle_id: str) -> MotionStatus

Remove an obstacle by its ID

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.

set_motion_plan_config
set_motion_plan_config(config: MotionPlanConfig) -> MotionStatus

set motion config

GalbotNavigation

Functions
get_instance staticmethod
get_instance() -> GalbotNavigation

Get the GalbotNavigation singleton instance.

Returns:

Name Type Description
GalbotNavigation GalbotNavigation

The GalbotNavigation singleton instance.

check_goal_arrival
check_goal_arrival() -> bool

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_current_pose() -> typing.Annotated[list[float], 'FixedSize(7)']

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_navigation_status() -> NavigationTaskStatus

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
init() -> bool
 Initialize the GalbotNavigation object.

Returns:

Name Type Description
bool bool

True if initialization is successful, False otherwise.

is_localized
is_localized() -> bool

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 forbidden_modify_omni_item in /data/galbot/config/aphropm_pns_config/local_plan_config.toml must be set to false.

True

Returns:

Name Type Description
tuple tuple

(success: bool, status_string: str) - success: Whether the navigation is successful. - status_string: Status string.

relocalize
relocalize(init_pose: typing.Annotated[numpy.typing.ArrayLike, numpy.float64]) -> tuple
 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:状态描述字符串

stop_navigation
stop_navigation() -> tuple

Stop the current navigation task.

Returns:

Name Type Description
tuple tuple

(success: bool, status_string: str) - success: Whether the navigation is successfully stopped. - status_string: Status string.

GalbotOneFoxtrotSensor

GalbotOneFoxtrotSensor(value: typing.SupportsInt)

Members:

LEFT_WRIST_FORCE : Left wrist force sensor

RIGHT_WRIST_FORCE : Right wrist force sensor

GalbotPerception

Perception module interface

Functions
get_instance staticmethod
get_instance() -> GalbotPerception

Get the GalbotPerception singleton instance.

Returns:

Name Type Description
GalbotPerception GalbotPerception

The singleton instance.

get_latest_result
get_latest_result(module: PerceptionModule) -> tuple

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
init(enabled_modules: collections.abc.Set[PerceptionModule]) -> bool

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
run_once(module: PerceptionModule) -> bool

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
wait_for_new_result(module: PerceptionModule, timeout_s: typing.SupportsFloat = 5.0) -> bool

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_instance() -> GalbotRobot

Get the singleton instance of GalbotRobot.

Returns:

Name Type Description
GalbotRobot GalbotRobot

The singleton instance of GalbotRobot.

acquire_controller
acquire_controller(controller_name: ControllerName) -> ControlStatus

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
destroy() -> None

Clean up system and middleware resources.

Returns:

Type Description
None

None

execute_joint_trajectory
execute_joint_trajectory(trajectory: Trajectory, is_blocking: bool = True) -> ControlStatus

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_active_controller(joint_group: JointGroup) -> ControllerName

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_bms_information() -> dict

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(camera_id: SensorType) -> dict

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_depth_data(camera_id: SensorType) -> dict

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() -> dict

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_force_sensor_data(sensor_type: GalbotOneFoxtrotSensor) -> dict

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_frame_names() -> list[str]

Get all frame names.

Returns:

Name Type Description
list str

List of all frame names.

get_gripper_state
get_gripper_state(end_effector: JointGroup) -> GripperState

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_imu_data(sensor_id: SensorType) -> dict

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_joint_group_names() -> list[str]

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_lidar_data(sensor_id: SensorType) -> dict

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(arg0: typing.SupportsInt, arg1: LogLevel) -> dict

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_odom() -> dict

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_rgb_data(camera_id: SensorType) -> dict

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
get_sensor_extrinsic(sensor_id: SensorType, reference_frame: str = 'base_link') -> tuple

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(end_effector: JointGroup) -> SuctionCupState

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_ultrasonic_data(ultrasonic_type: UltrasonicType) -> dict

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_volume() -> float

Get current system global volume value.

Returns:

Name Type Description
float float

Current volume value, range 0.0 to 100.0.

init
init(enable_sensor_set: collections.abc.Set[SensorType] = ...) -> bool

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
is_running() -> bool

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_controller(joint_group: JointGroup) -> ControlStatus

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_controller(joint_group: JointGroup) -> ControlStatus

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
request_shutdown() -> None

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_batch(trajectory: Trajectory) -> ControlStatus

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(end_effector: JointGroup, activate: bool) -> ControlStatus

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_volume(volume: typing.SupportsFloat) -> bool

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_controller(joint_group: JointGroup) -> ControlStatus

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_audio_stream_output(stream_id: str = '') -> None

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() -> ControlStatus

Stop base motion.

Returns:

Name Type Description
ControlStatus ControlStatus

Command sending result.

stop_controller
stop_controller(joint_group: JointGroup) -> ControlStatus

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_microphone_stream_input(stream_id: str = '') -> None

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_trajectory_execution() -> ControlStatus

Stop all currently executing trajectories.

Returns:

Name Type Description
ControlStatus ControlStatus

Command sending result.

switch_controller
switch_controller(controller_name: ControllerName) -> ControlStatus

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
wait_for_shutdown() -> None

Sleep continuously until shutdown signal is received.

Returns:

Type Description
None

None

write_audio_stream_output
write_audio_stream_output(audio_chunk: str, stream_id: str = '') -> bool

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

GripperState()

Gripper state information

Attributes
effort property writable
effort: float

Gripper torque (newton-meters)

is_moving property writable
is_moving: bool

Whether currently moving

joint_positions property writable
joint_positions: list[float]

Joint positions array

timestamp_ns property writable
timestamp_ns: int

Timestamp (nanoseconds)

velocity property writable
velocity: float

Gripper velocity (meters/second)

width property writable
width: float

Gripper width (meters)

Header

Header()

Message header

Attributes
frame_id property writable
frame_id: str

Frame ID

timestamp_ns property writable
timestamp_ns: int

Timestamp (nanoseconds since epoch)

ImuData

ImuData()

IMU data

Attributes
accel property writable
accel: Vector3

Acceleration Vector3

gyro property writable
gyro: Vector3

Gyroscope Vector3

magnet property writable
magnet: Vector3

Magnetometer Vector3

timestamp_ns property writable
timestamp_ns: int

Timestamp (nanoseconds)

JointCommand

JointCommand()

Single joint command object

Attributes
acceleration property writable
acceleration: float
  • acceleration (float): Joint acceleration
effort property writable
effort: float
  • effort (float): Joint torque (N·m)
position property writable
position: float
  • position (float): Joint target position (radians)
velocity property writable
velocity: float
  • velocity (float): Joint velocity (radians/second)

JointGroup

JointGroup(value: typing.SupportsInt)

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

LidarData()

LiDAR point cloud data

Attributes
data property writable
data: list[int]

Point cloud binary data

fields property writable
fields: list[PointField]

Point field description list

header property writable
header: Header

Message header

height property writable
height: int

Point cloud height

is_bigendian property writable
is_bigendian: bool

Whether big-endian

is_dense property writable
is_dense: bool

Whether dense

point_step property writable
point_step: int

Bytes per point

row_step property writable
row_step: int

Bytes per row

width property writable
width: int

Point cloud width

LogLevel

LogLevel(value: typing.SupportsInt)

Members:

TRACE : Trace level

DEBUG : Debug level

INFO : Info level

WARN : Warning level

ERROR : Error level

CRITICAL : Critical level

MotionStatus

MotionStatus(value: typing.SupportsInt)

Members:

SUCCESS

TIMEOUT

FAULT

INVALID_INPUT

INIT_FAILED

IN_PROGRESS

STOPPED_UNREACHED

DATA_FETCH_FAILED

PUBLISH_FAIL

COMM_DISCONNECTED

STATUS_NUM

UNSUPPORTED_FUNCRION

NavigationTaskStatus

NavigationTaskStatus(value: typing.SupportsInt)

Members:

UNKNOWN

RUNNING

SUCCESS

FAILED

OdomData

OdomData()

Odometry data

Attributes
orientation property writable
orientation: Annotated[list[float], 'FixedSize(4)']

Orientation quaternion [x, y, z, w]

position property writable
position: Annotated[list[float], 'FixedSize(3)']

Position [x, y, z] (meters)

timestamp_ns property writable
timestamp_ns: int

Timestamp (nanoseconds)

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_actuate_type() -> str

Get the actuation type (only link, including torso, including legs).

get_blocking
get_blocking() -> bool

Get whether to wait synchronously for trajectory execution or planning completion.

get_check_collision
get_check_collision() -> bool

Get whether to perform collision detection.

get_direct_execute
get_direct_execute() -> bool

Get whether to directly execute the trajectory after planning.

get_reference_frame
get_reference_frame() -> str

Get the reference coordinate frame for planning.

get_timeout
get_timeout() -> float

Get the maximum waiting time for trajectory execution or planning completion (in seconds).

get_tool_pose
get_tool_pose() -> bool

Get whether to use tool pose for actuation.

set_actuate
set_actuate(actuate: str) -> None

Set the actuation type (only link, including torso, including legs).

set_blocking
set_blocking(blocking: bool) -> None

Set whether to wait synchronously for trajectory execution or planning completion.

set_check_collision
set_check_collision(check_collision: bool) -> None

Set whether to perform collision detection.

set_direct_execute
set_direct_execute(direct_execute: bool) -> None

Set whether to directly execute the trajectory after planning.

set_move_line
set_move_line(move_line: bool) -> None

Set whether to use linear movement for planning.

set_reference_frame
set_reference_frame(frame: str) -> None

Set the reference coordinate frame for planning.

set_timeout
set_timeout(timeout: typing.SupportsFloat) -> None

Set the maximum waiting time for trajectory execution or planning completion (in seconds).

set_tool_pose
set_tool_pose(tool_pose: bool) -> None

Set whether to use tool pose for actuation.

PerceptionModule

PerceptionModule(value: typing.SupportsInt)

Perception module type

Members:

LIGHT_STEREO : Lightweight stereo depth

FOUNDATION_STEREO : High-precision stereo depth

PointField

PointField()

Point cloud field description information

Attributes
count property writable
count: int

Number of field elements

datatype property writable
datatype: ...

Data type (DataType enum)

name property writable
name: str

Field name, e.g., x, y, z, intensity, rgb

offset property writable
offset: int

Byte offset of field in a single point

PointFieldDataType

PointFieldDataType(value: typing.SupportsInt)

Members:

UNKNOWN

INT8

UINT8

INT16

UINT16

INT32

UINT32

FLOAT32

FLOAT64

PrimitiveType

PrimitiveType(value: typing.SupportsInt)

Members:

LINE

CYLINDER

RgbData

RgbData()

Compressed image data

Attributes
data property writable
data: list[int]

Compressed binary data

format property writable
format: str

Image format

header property writable
header: Header

Message header

RobotStatesType

RobotStatesType(value: typing.SupportsInt)

Members:

POSE

JOINT

ROBOT_STATES

SUCTION_ACTION_STATE

SUCTION_ACTION_STATE(value: typing.SupportsInt)

Suction cup action state enumeration

Members:

IDLE : Not sucking

SUCKING : Currently sucking

SUCCESS : Suction successful

FAILED : Suction failed

SeedType

SeedType(value: typing.SupportsInt)

Members:

RANDOM_SEED

RANDOM_PROGRESSIVE_SEED

USER_DEFINED_SEED

SensorType

SensorType(value: typing.SupportsInt)

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

StateCheckType(value: typing.SupportsInt)

Members:

EUCLIDEAN_DISTANCE

RADIAN_DISTANCE

SuctionCupState

SuctionCupState()

Suction cup state information

Attributes
action_state property writable
action_state: SUCTION_ACTION_STATE

Current suction cup action state (SUCTION_ACTION_STATE enum)

activation property writable
activation: bool

Whether currently sucking

pressure property writable
pressure: float

Current pressure (Pa)

timestamp_ns property writable
timestamp_ns: int

Timestamp (nanoseconds)

TerminationConditionType

TerminationConditionType(value: typing.SupportsInt)

Members:

TIMEOUT

TIMEOUT_AND_EXACT_SOLUTION

Timestamp

Timestamp()

High-precision timestamp

Attributes
nanosec property writable
nanosec: int

Nanoseconds

sec property writable
sec: int

Seconds

Trajectory

Trajectory()

Trajectory object

Attributes
joint_groups property writable
joint_groups: list[str]

List of joint group names

joint_names property writable
joint_names: list[str]

List of joint names

points property writable
points: list[TrajectoryPoint]

List of trajectory points (TrajectoryPoint list)

TrajectoryControlStatus

TrajectoryControlStatus(value: typing.SupportsInt)

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

TrajectoryPoint()

Single trajectory point object

Attributes
joint_command_vec property writable
joint_command_vec: list[JointCommand]
  • joint_command_vec (List[JointCommand]): List of specific joint commands to execute
time_from_start_second property writable
time_from_start_second: float
  • time_from_start_second (float): Time from trajectory start (seconds)

UltrasonicData

UltrasonicData()

Ultrasonic sensor data

Attributes
distance property writable
distance: float

Distance (meters)

timestamp_ns property writable
timestamp_ns: int

Timestamp (nanoseconds)

UltrasonicType

UltrasonicType(value: typing.SupportsInt)

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

Vector3()

Three-dimensional vector

Attributes
x property writable
x: float

X coordinate

y property writable
y: float

Y coordinate

z property writable
z: float

Z coordinate

Functions

check_motion_status

check_motion_status(arg0: MotionStatus) -> str

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_joint_state() -> JointStates

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", key is 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.

create_pose_state

create_pose_state() -> PoseState

Create a PoseState instance.

Returns:

Name Type Description
PoseState PoseState

A new PoseState instance.