Skip to main content

Introduction to Aurora

# Introduction to Aurora

This document is an introduction to the Fourier Aurora SDK, outlining the main concepts of Aurora.

It is very helpful for developers new to Aurora who wish to understand how it works. Furthermore, Aurora is a system based on C++, requiring a certain foundation in the C++ programming language to fully comprehend the code.

What is Aurora?

Aurora is a system designed for real-time motion control of humanoid robots. It plays a significant role between the hardware layer and the upper software layers of the robot system. On one hand, Aurora interacts with hardware components such as sensors and actuators, collecting data and sending commands to them; on the other hand, Aurora utilizes a series of tools and libraries to create and execute motion control tasks. These tasks include various whole-body controllers for tracking targets such as linear velocity (for movement), Cartesian space control (for manipulation), and joint space control (for motion planning).

Aurora provides developers with a series of controllers to support high-level application development. Users can also create their own controllers according to Aurora's programming interfaces.

Centralized Data Structure and Task-Based Programming

The core features of Aurora are its centralized data structure and task-based programming model.

During Aurora's lifecycle, most work revolves around the creation, execution, and destruction of tasks. Each task is designed to achieve a specific function, such as reading data from sensors, processing data, or sending data to devices.

Aurora includes two types of tasks: Fixed Tasks and FSM Tasks (Finite State Machine Tasks). Fixed Tasks are automatically created and destroyed during the Aurora lifecycle and are used to execute fixed sets of operations, such as sensor data reading, device data sending, and data publishing/subscribing.

FSM Tasks can be dynamically created and destroyed during Aurora's runtime. They implement a series of motion control operations based on a finite state machine. Users can create their own FSM tasks by defining states and transitions and bind them to specified controllers.

aurora_dataflow

Aurora Dataflow Overview

Data exchange between tasks is accomplished through a shared data structure called RobotData. RobotData is a centralized data structure shared by all Aurora tasks, containing all the data required for task execution.

For example, a fixed task reads data from sensors and updates the corresponding fields in RobotData; an FSM task reads the current robot state and updates the command fields in RobotData; subsequently, another fixed task reads these commands and sends them to the devices.

Lifecycle Management

Task lifecycle management is implemented by the State Manager. During the initialization phase, the State Manager executes the init and enter functions of the task. Subsequently, the State Manager binds the task's execute function to a new thread and starts that thread to periodically execute the execute function. During the exit phase, the State Manager executes the task's exit interface and destroys the thread.

When the Aurora program starts, it first performs a self-check to ensure all necessary hardware components are available; then it creates and starts the State Manager, which in turn creates and runs all fixed tasks; thereafter, the State Manager enters the default FSM state (at this point, no FSM tasks are running).

When switching to a new FSM state, the State Manager stops the FSM tasks of the current state and destroys their threads, then initializes new FSM tasks according to the new state configuration and creates threads to run them.

When an exit signal is received, Aurora stops all tasks, destroys all threads, and shuts down the motor drives.

Obtaining the SDK

gitee: https://gitee.com/FourierIntelligence/fourieraurorasdk

github: https://github.com/FFTAI/fourier_aurora_sdk