ControlInput & ControlState#
rb::ControlInput<T> and rb::ControlState<T> are the data structs passed
through Robot::Control(). ControlState<T> carries the current measured
state into the callback and ControlInput<T> carries the next control output
back to the robot.
Header
Header |
|
Declaration
Namespace |
|
Kind |
|
Primary role |
Carry measured state into the real-time callback and the generated command output back out. |
Public Attributes
Struct |
Main fields |
Description |
|---|---|---|
|
|
Measured state snapshot passed into the real-time callback. |
|
|
Outgoing control command returned from the callback. |
Units & Encodings
Field |
Unit / encoding |
Notes |
|---|---|---|
|
|
Real-time callback timestamp. |
|
|
Measured joint positions in model order. |
|
|
Measured joint velocities in model order. |
|
|
Measured joint currents. |
|
|
Measured joint torques. |
|
|
Commanded joint targets returned from the callback. |
|
Dimensionless |
Integer gain value per joint. The public C++ headers do not define a fixed range. |
|
|
Joint feedforward torque term. |
Detailed Reference
-
template<typename T>
struct ControlState# Robot control state information.
Represents the current state of robot real-time control including position, velocity, and torque.
- Template Parameters:
T – Robot model type
Public Members
-
Eigen::Vector<double, T::kRobotDOF> current = {Eigen::Vector<double, T::kRobotDOF>::Zero()}#
Current joint currents [A].
-
Eigen::Vector<bool, T::kRobotDOF> is_ready = {Eigen::Vector<bool, T::kRobotDOF>::Constant(false)}#
Whether the joint is ready for control.
-
Eigen::Vector<double, T::kRobotDOF> position = {Eigen::Vector<double, T::kRobotDOF>::Zero()}#
Current joint positions [rad].
-
double t = {0.}#
Current time [s].
-
template<typename T>
struct ControlInput# Robot control input parameters.
Represents control input parameters for robot real-time control including mode, target, and gains.
- Template Parameters:
T – Robot model type
Public Members
-
Eigen::Vector<unsigned int, T::kRobotDOF> feedback_gain = {Eigen::Vector<unsigned int, T::kRobotDOF>::Zero()}#
Feedback gains for each joint.
-
Eigen::Vector<double, T::kRobotDOF> feedforward_torque = {Eigen::Vector<double, T::kRobotDOF>::Zero()}#
Feedforward torque for each joint [Nm].
-
bool finish = {false}#
Whether to finish the current control operation.
Related Types
Examples
real_time_control_command.cppis the canonical example for both structs.