cmvr-es/protos/cmvr/config/arm_config/arm_config.proto

206 lines
5.7 KiB
Protocol Buffer
Raw Normal View History

2026-06-24 15:45:54 +08:00
syntax = "proto3";
package cmvr.config;
import "cmvr/config/lawba_ik_config.proto";
import "cmvr/config/pinocchio_dls_ik_config.proto";
import "cmvr/config/pinocchio_qp_ik_config.proto";
import "cmvr/config/srs_ik_config.proto";
import "cmvr/config/cartesian_motion_validation_config.proto";
import "cmvr/config/motor_config/motor_config.proto";
2026-06-24 15:45:54 +08:00
enum ToppraPathType {
TOPPRA_PATH_TYPE_UNKNOWN = 0;
TOPPRA_PATH_TYPE_LINEAR = 1;
TOPPRA_PATH_TYPE_CUBIC_HERMITE = 2;
TOPPRA_PATH_TYPE_QUINTIC = 3;
TOPPRA_PATH_TYPE_NATURAL = 4;
}
message MotorRobotArmBackendConfig {
string motor_system_id = 2;
int32 dof = 3;
repeated string joint_names = 4;
int32 upd_freq = 5;
int32 buffer_size = 6;
double default_vel = 7;
double default_acc = 8;
repeated string motor_group_ids = 9;
// Reserved opt-in for a future atomic/timed group position-servo primitive.
// MotorRobotArm's current sequential per-joint servoJ implementation
// deliberately rejects this capability even if this field is true.
bool enable_teleop_group_servo = 10;
2026-06-24 15:45:54 +08:00
}
enum VendorRobotArmBrand {
VENDOR_ROBOT_ARM_BRAND_UNKNOWN = 0;
VENDOR_ROBOT_ARM_BRAND_AUBO_ARM = 1;
VENDOR_ROBOT_ARM_BRAND_HUAYAN_ARM = 2;
2026-06-24 15:45:54 +08:00
}
message VendorRobotArmBackendConfig {
VendorRobotArmBrand brand = 1;
string ip = 2;
int32 port = 3;
string model = 4;
int32 dof = 5;
repeated string joint_names = 6;
string base_frame = 7;
string tool_frame = 8;
string username = 9;
string password = 10;
}
enum DamiaoMotorModel {
DAMIAO_MOTOR_MODEL_UNKNOWN = 0;
DAMIAO_MOTOR_MODEL_DM4310 = 1;
DAMIAO_MOTOR_MODEL_DM4310_48V = 2;
DAMIAO_MOTOR_MODEL_DM4340 = 3;
DAMIAO_MOTOR_MODEL_DM4340_48V = 4;
DAMIAO_MOTOR_MODEL_DM6006 = 5;
DAMIAO_MOTOR_MODEL_DM8006 = 6;
DAMIAO_MOTOR_MODEL_DM8009 = 7;
DAMIAO_MOTOR_MODEL_DM10010L = 8;
DAMIAO_MOTOR_MODEL_DM10010 = 9;
DAMIAO_MOTOR_MODEL_DMH3510 = 10;
DAMIAO_MOTOR_MODEL_DMH6215 = 11;
DAMIAO_MOTOR_MODEL_DMG6220 = 12;
}
message DamiaoJointConfig {
string joint_name = 1;
uint32 command_id = 2;
uint32 feedback_id = 3;
uint32 reported_motor_id = 4;
DamiaoMotorModel model = 5;
// Only +1 and -1 are accepted.
int32 direction = 6;
// q_joint = direction * q_motor + zero_offset_rad.
double zero_offset_rad = 7;
double joint_lower_rad = 8;
double joint_upper_rad = 9;
double max_velocity_rad_s = 10;
double max_torque_nm = 11;
// Explicit whitelist for the four-bit status nibble in MIT feedback.
// The code intentionally does not guess vendor/firmware meanings. At least
// one reviewed value is required before hardware_enabled may be true.
repeated uint32 healthy_feedback_status = 12;
// Raw byte thresholds, interpreted only as ordered protocol values. Nonzero
// reviewed limits are required before hardware_enabled may be true.
uint32 max_driver_temperature_raw = 13;
uint32 max_motor_temperature_raw = 14;
}
message UmeRobotArmBackendConfig {
SocketCanConfig can = 1;
repeated DamiaoJointConfig joints = 2;
uint32 control_frequency_hz = 3;
uint32 cycle_deadline_us = 4;
uint32 feedback_watchdog_ms = 5;
uint32 shutdown_timeout_ms = 6;
// This is deliberately false in every checked-in configuration.
bool hardware_enabled = 7;
}
2026-06-24 15:45:54 +08:00
message SpeedLPlannerConfig {
double linear_velocity_max = 1;
double linear_acceleration_max = 2;
double linear_jerk_max = 3;
double angular_velocity_max = 4;
double angular_acceleration_max = 5;
double angular_jerk_max = 6;
double linear_target_replan_threshold = 8;
double angular_target_replan_threshold = 9;
double linear_reverse_cos_threshold = 10;
double linear_reverse_switch_speed_threshold = 11;
optional bool enforce_joint_acceleration_limits = 17;
CartesianLineDeviationCheckConfig line_deviation_check = 18;
JointVelocityCheckConfig joint_velocity_check = 19;
CartesianVelocityFeasibilityCheckConfig cartesian_velocity_feasibility_check = 20;
2026-06-24 15:45:54 +08:00
}
message CartesianVelocityControllerConfig {
double control_period_s = 1;
double stop_twist_norm = 2;
double stop_command_velocity_norm = 3;
double stop_measured_velocity_norm = 4;
double stop_acceleration = 5;
2026-06-24 15:45:54 +08:00
}
message ToppraJointMotionPlannerConfig {
ToppraPathType path_type = 1;
double sample_period_s = 2;
int32 grid_size = 3;
int32 high_grid_size = 4;
}
message MoveJConfig {
oneof algorithm {
ToppraJointMotionPlannerConfig toppra_joint_motion_planner = 1;
}
}
message MoveLPlannerConfig {
double sample_period_s = 1;
double position_gain = 2;
double rotation_gain = 3;
CartesianLineDeviationCheckConfig line_deviation_check = 4;
JointContinuityCheckConfig joint_continuity_check = 5;
CartesianStepFeasibilityCheckConfig cartesian_step_feasibility_check = 6;
2026-06-24 15:45:54 +08:00
}
message MoveLConfig {
oneof algorithm {
MoveLPlannerConfig pinocchio_cartesian_motion_planner = 1;
2026-06-24 15:45:54 +08:00
}
}
message SpeedLControllerConfig {
oneof algorithm {
CartesianVelocityControllerConfig cartesian_velocity_controller = 1;
}
}
message SpeedLConfig {
oneof algorithm {
SpeedLPlannerConfig pinocchio_cartesian_motion_planner = 1;
2026-06-24 15:45:54 +08:00
}
SpeedLControllerConfig speed_l_controller = 10;
}
message ArmKinematicsConfig {
oneof algorithm {
PinocchioDlsIKConfig pinocchio_dls_ik_solver = 10;
PinocchioQpIKConfig pinocchio_qp_ik_solver = 11;
SrsIKConfig srs_ik_solver = 12;
LawbaIKConfig lawba_ik_solver = 13;
}
}
message ArmMotionConfig {
MoveJConfig move_j = 1;
MoveLConfig move_l = 2;
SpeedLConfig speed_l = 4;
}
message RobotArmConfig {
string id = 1;
oneof backend {
MotorRobotArmBackendConfig motor = 10;
VendorRobotArmBackendConfig vendor = 11;
UmeRobotArmBackendConfig ume = 12;
2026-06-24 15:45:54 +08:00
}
ArmKinematicsConfig kinematics = 20;
ArmMotionConfig motion = 21;
}
message ArmConfig {
repeated RobotArmConfig robot_arms = 1;
}
message ArmRootConfig {
ArmConfig arm = 1;
}