API reference
package
rae_sdk
package
package
rae_sdk.robot
package
module
module
module
module
package
module
module
module
package
rae_sdk.robot.api
module
rae_sdk.robot.api.performance
function
function
variable
variable
variable
variable
function
variable
variable
variable
function
function
function
package
rae_sdk.robot.api.ros
module
module
rae_sdk.robot.api.ros.ros_interface
constant
class
ROSInterface
A class that manages ROS2 functionalities for a robot or a system. It includes initializing ROS2 context, creating and managing nodes, publishers, and subscribers. It also handles the startup and shutdown processes for ROS2. Attributes ---------- _name (str): Name of the ROS2 node. _context (rclpy.context.Context | None): The ROS2 context. _node (rclpy.node.Node | None): The ROS2 node. _publishers (dict[str, Publisher]): Dictionary of ROS2 publishers. _subscribers (dict[str, Subscription]): Dictionary of ROS2 subscribers. _service_clients (dict[str, Client]): Dictionary of ROS2 service clients. _action_clients (dict[str, dict[ActionClient]]): Dictionary of ROS2 action clients. _timers (dict[str, Timer]): Dictionary of ROS2 timers. _tf_buffer: The TF2 buffer. _tf_listener: The TF2 listener. _executor (Executor): The ROS2 executor. _executor_thread (threading.Thread): The thread for the ROS2 executor. _launch_service (LaunchService): The ROS2 launch service. _stop_event (multiprocessing.Event): The event for stopping the ROS2 launch service. _process (multiprocessing.Process): The process for running the ROS2 launch service. Methods ------- start_hardware_process(): Starts the hardware process for ROS2. start(): Initializes and starts the ROS2 node and executor. stop_ros_process(): Stops the ROS2 hardware process. stop(): Shuts down the ROS2 node and context. create_publisher(topic_name, msg_type, qos_profile): Creates a publisher for a given topic. publish(topic_name, msg): Publishes a message on a given topic. create_subscriber(topic_name, msg_type, callback, qos_profile): Creates a subscriber for a given topic. create_timer(timer_name, period, callback): Creates a timer for a given topic. create_service_client(srv_name, srv_type): Creates a service client for a given service. call_async_srv(srv_name, req): Calls a service asynchronously. create_action_client(action_name, action_type): Creates an action client for a given action. call_async_action_simple(action_name, goal): Calls an action asynchronously. call_async_action(action_name, goal, goal_response_callback, goal_result_callback, goal_feedback_callback): Calls an action asynchronously.
class
rae_sdk.robot.api.ros.ros_interface.ROSInterface
method
property
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
module
rae_sdk.robot.audio
class
AudioController
A class for controlling the robot's audio. Attributes ---------- ros_interface (ROSInterface): An object for managing ROS2 communications and functionalities. audio_client (Client): A ROS2 client for playing audio. assets_path (str): The path to the robot's assets directory. Methods ------- play_audio_file(audio_file_path): Plays an audio file. honk(): Plays a horn sound. play_random_sfx(): Plays a random sound effect.
class
rae_sdk.robot.audio.AudioController
module
rae_sdk.robot.display
function
class
DisplayController
A class for controlling the robot's display. Attributes ---------- _ros_interface (ROSInterface): An object for managing ROS2 communications and functionalities. _bridge (CvBridge): An object for converting between ROS2 and OpenCV image formats. _screen_width (int): The width of the robot's display. _screen_height (int): The height of the robot's display. _assets_path (str): The path to the robot's assets directory. Methods ------- stop(): Stops the display. display_default(): Displays the default image on the robot's display. display_face(payload): Displays a face on the robot's display. display_image(image_data): Displays an image on the robot's display. display_imu_data(imu_data): Displays IMU data on the robot's display. display_animation(): Displays an animation on the robot's display. ball_callback(): Callback method for displaying an animation on the robot's display.
class
rae_sdk.robot.display.DisplayController
method
method
method
method
method
method
method
method
variable
variable
variable
variable
variable
variable
module
rae_sdk.robot.led
class
LEDController
A class for controlling the robot's LEDs. Attributes ---------- ros_interface (ROSInterface): An object for managing ROS2 communications and functionalities. Methods ------- set_leds(payload): Sets the robot's LEDs to a given color.
class
rae_sdk.robot.led.LEDController
module
rae_sdk.robot.navigation
class
NavigationController
A class for controlling the robot's movement. Attributes ---------- ros_interface (ROSInterface): An object for managing ROS2 communications and functionalities. Methods ------- move(linear, angular): Moves the robot in a given direction.
class
rae_sdk.robot.navigation.NavigationController
method
method
method
package
rae_sdk.robot.perception
module
rae_sdk.robot.perception.detections
class
rae_sdk.robot.perception.detections.Detections
module
rae_sdk.robot.perception.perception_system
variable
class
PerceptionSystem
A class for managing camera functionalities in a robot, interfacing with both depthai and robothub libraries. It includes initialization and management of camera streams, publishing capabilities, and camera device control. Attributes ---------- ros_context_manager (dai_ros.ROSContextManager): Manager for ROS context. dai_node (dai_ros.ROSNode): ROS node for depthai operations. device_mxid (str): The serial number of the depthai device. device_info (dai.DeviceInfo): Information about the depthai device. device (dai.Device): The depthai device instance. cal_handler: Calibration handler for the depthai device. pipeline: The pipeline for camera data processing. rh_stream_handles (dict): Handles for RobotHub video streams. ros_stream_handles (dict): Handles for ROS video streams. Methods ------- stop(): Closes the depthai device connection. add_rh_stream(stream_name): Adds a RobotHub stream with the given name. add_ros_img_stream(stream_name): Adds a ROS Image stream with the given name. add_ros_imu_stream(stream_name): Adds a ROS IMU stream with the given name. add_queue(name, callback): Adds a queue to the device for handling callbacks. add_composable_node(package_name, plugin_name, options): Adds a composable node to the ROS context manager. start_pipeline(pipeline): Starts the camera pipeline and initializes ROS node and context. publish_rh(name, color_frame, timestamp, metadata): Publishes video data to RobotHub. publish_ros(name, msg): Publishes a message to a ROS topic. get_image(stream_name): Retrieves an image from the specified stream.
class
rae_sdk.robot.perception.perception_system.PerceptionSystem
method
method
method
method
method
method
method
method
method
method
method
method
method
variable
method
method
method
method
method
method
variable
variable
variable
module
rae_sdk.robot.perception.pipeline
module
rae_sdk.robot.robot
class
Robot
A class representing a robot, integrating various controllers for movement, display, and LED management and interfacing with ROS2 for communication and control. Attributes ---------- ros_interface (ROSInterface): An object for managing ROS2 communications and functionalities. led (LEDController): Controls the robot's LEDs. display (DisplayController): Manages the robot's display. navigation (NavigationController): Handles the robot's movement. audio (AudioController): Controls the robot's audio. state (StateController): Manages the robot's state information. perception (PerceptionSystem): Handles the robot's perception system. Methods ------- start(): Initializes the robot's components and starts ROS2 communications. stop(): Stops the ROS2 communications and shuts down the robot's components.
class
rae_sdk.robot.robot.Robot
method
method
method
property
property
perception
Create perception system if it doesn't exist and return it.
property
property
property
property
property
module
rae_sdk.robot.robot_options
class
RobotOptions
A class for storing the robot's options. Attributes ---------- start_hardware (bool): Whether to start the robot's hardware. launch_mock (bool): Whether to launch the robot's mock interfaces if start_hardware=True. name (str): The robot's name. namespace (str): The robot's namespace. launch_controllers (bool): Whether to launch the robot's controllers.
class
rae_sdk.robot.robot_options.RobotOptions
method
property
property
property
property
property
module
rae_sdk.robot.state
class
StateController
A class for managing the robot's state. Attributes ---------- ros_interface (ROSInterface): An object for managing ROS2 communications and functionalities. battery_state (BatteryState): Stores the current state of the robot's battery. Methods ------- battery_state_cb(data): Callback method for updating battery state.
class