OptimalControlCommandBuilder#

rb::OptimalControlCommandBuilder describes an optimal-control request that will be solved by the robot-side optimal-control path. It is the command-layer counterpart to OptimalControl.

Header

Header

#include <rby1-sdk/robot_command_builder.h>

Declaration

Namespace

rb

Kind

class

Primary role

Hold optimal-control targets and solver tuning parameters.

Public Member Functions

Method

Purpose

Notes

SetCommandHeader(...)

Attach shared header metadata.

Uses CommandHeaderBuilder.

AddCartesianTarget(...) and AddJointPositionTarget(...)

Add task-space and joint-space objectives.

These define most of the optimization goal.

SetCenterOfMassTarget(...)

Add a COM objective.

Useful for balance or posture tasks.

SetVelocityLimitScaling(...), SetAccelerationLimitScaling(...), SetErrorScaling(...)

Tune scaling applied to the optimization problem.

Useful when adapting solver aggressiveness.

SetPatience(...) and SetStopCost(...)

Tune solver termination behavior.

Useful during iterative optimization tuning.

Key Numeric Parameters

Method

Unit / encoding

Notes

AddCartesianTarget(..., T, translation_weight, rotation_weight)

SE(3), Dimensionless

T carries translation in meters. The two weights are objective weights.

SetCenterOfMassTarget(..., pose, weight)

m, Dimensionless

COM target position is a 3-vector in meters.

AddJointPositionTarget(..., target_position, weight)

rad, Dimensionless

Joint-space target plus its objective weight.

SetErrorScaling(...), SetVelocityLimitScaling(...), SetAccelerationLimitScaling(...)

Dimensionless

Internal optimization scalings. Proto comments document positive ranges for the limit-scaling terms.

SetStopCost(...), SetMinDeltaCost(...)

Dimensionless

Objective thresholds used by solver termination logic.

SetPatience(patience)

Iteration count

Number of iterations tolerated without sufficient improvement.

Detailed Reference

class OptimalControlCommandBuilder#

Public Functions

OptimalControlCommandBuilder()#
~OptimalControlCommandBuilder()#
OptimalControlCommandBuilder &AddCartesianTarget(const std::string &ref_link_name, const std::string &link_name, const math::SE3::MatrixType &T, double translation_weight, double rotation_weight)#
OptimalControlCommandBuilder &AddJointPositionTarget(const std::string &joint_name, double target_position, double weight)#
OptimalControlCommandBuilder &SetAccelerationLimitScaling(double acceleration_limit_scaling)#
OptimalControlCommandBuilder &SetCenterOfMassTarget(const std::string &ref_link_name, const Eigen::Vector3d &pose, double weight)#
OptimalControlCommandBuilder &SetCommandHeader(const CommandHeaderBuilder &builder)#
OptimalControlCommandBuilder &SetErrorScaling(double error_scaling)#
OptimalControlCommandBuilder &SetMinDeltaCost(double min_delta_cost)#
OptimalControlCommandBuilder &SetPatience(int patience)#
OptimalControlCommandBuilder &SetStopCost(double stop_cost)#
OptimalControlCommandBuilder &SetVelocityLimitScaling(double velocity_limit_scaling)#

Related Types

Examples

  • optimal_control.cpp