Command
Each message includes a command value that defines the content's type of the message's data.
Another feature included in Luos engine is the Object Dictionary (OD) , which aims to maintain interoperability of data format and command's type between servicesSoftware element run by Luos that can communicate with other services. It can be a driver or an app. .
Commands
Commands is a simple enum list from 0 to N allowing you to choose the data format you want to use on your message.
Internally, Luos engine also uses some messages to manage and detect your system. That's why Luos engine has some reserved commands at the begining of this list.
User's commands start at LUOS_LAST_RESERVED_CMD
.
Common registers for all services
Command Function GET_CMD asks a service to publish its data SET_CMD sets some undefined data
Generic data
Command Function COLOR color_t (R, G, B) IO_STATE char (True/False) RATIO ratio_t (percentage %) PEDOMETER long[2] (step number, step time millisecond) ILLUMINANCE illuminance_t (lx) VOLTAGE voltage_t (Volt) CURRENT current_t (Ampere) POWER power_t (Watt) TEMPERATURE temperature_t (°C) TIME time Second (float) FORCE force_t (Newton N) MOMENT moment_t (Newton meter N.m) CONTROL control_mode (control_mode_t)
Configuration commands
Command Function REGISTER a registered data [reg_add, data] REINIT char (True/False) PID pid_t float\[3\] = {p, i, d}
RESOLUTION resolution parameter for a sensor float REDUCTION reduction factor float (e.g. mechanical) DIMENSION dimension of an element m linear_position_t OFFSET decay float SETID sets Dynamixel ID
Space positioning
Command Function ANGULAR_POSITION angular_position_t (deg) ANGULAR_SPEED angular_speed_t (deg/s) LINEAR_POSITION linear_position_t (m) LINEAR_SPEED linear_speed_t (m/s) ACCEL_3D long[3](X, Y, Z axis linear acceleration data in Gees) GYRO_3D long[3](X, Y, Z axis rotational acceleration data in degrees per second) QUATERNION long[4] (sensor fused w, x, y, z rotational angles) COMPASS_3D long[3](magnetic field data in micro tesla on each axis) EULER_3D long[3](Pitch, roll, yaw based in degrees with frame reference) ROT_MAT short[9] (linear math 9 element matrix representation) LINEAR_ACCEL float[3] (linear acceleration in body frame coordinates) GRAVITY_VECTOR float[3] (Which access gravity effects) HEADING long (360 degrees from North with Y+ axis as the pointer)
Space positioning limits
Command Function ANGULAR_POSITION_LIMIT min angular_position_t (deg), max angular_position_t (deg) LINEAR_POSITION_LIMIT min linear_position_t (m), max linear_position_t (m) RATIO_LIMIT float(%) CURRENT_LIMIT float(A) ANGULAR_SPEED_LIMIT min angular_speed_t (deg/s), max angular_speed_t (deg/s) LINEAR_SPEED_LIMIT min linear_speed_t (m/s), max linear_speed_t (m/s) TORQUE_LIMIT max moment_t (Nm) TEMPERATURE_LIMIT max temperature_t (°C)
Specific register
Command Function PARAMETERS depends on the service. It can be: servo_parameters_t, imu_report_t, motor_mode_t ERROR_CMD
You can find the complete list of commands here .
If you want to create new commands for your custom services, you can create and add your own starting at LUOS_LAST_STD_CMD
. See how .