2026-06-24 15:45:54 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
package cmvr.config;
|
|
|
|
|
|
|
|
|
|
import "cmvr/config/joint_limits_config.proto";
|
|
|
|
|
|
2026-06-30 16:04:36 +08:00
|
|
|
message MotorConfigItem {
|
2026-06-24 15:45:54 +08:00
|
|
|
int32 id = 1;
|
|
|
|
|
string joint_name = 2;
|
|
|
|
|
double limit_q_lb = 3;
|
|
|
|
|
double limit_q_ub = 4;
|
|
|
|
|
double limit_qd = 5;
|
2026-06-25 11:03:38 +08:00
|
|
|
double limit_qdd = 6;
|
2026-07-09 14:18:59 +08:00
|
|
|
double encoder_counts_per_rev = 7;
|
|
|
|
|
double gear_ratio = 8;
|
2026-06-24 15:45:54 +08:00
|
|
|
}
|
|
|
|
|
|
2026-06-30 16:04:36 +08:00
|
|
|
message MotorList {
|
|
|
|
|
repeated MotorConfigItem motors = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message EthercatSlaveConfig {
|
|
|
|
|
int32 motor_id = 1;
|
2026-07-09 14:18:59 +08:00
|
|
|
uint32 alias = 2;
|
|
|
|
|
uint32 position = 3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message Cia402ProtocolConfig {
|
|
|
|
|
uint32 profile_position_trigger_delay_ms = 1;
|
|
|
|
|
uint32 state_transition_timeout_ms = 2;
|
|
|
|
|
uint32 velocity_stop_timeout_ms = 3;
|
|
|
|
|
uint32 status_poll_period_ms = 4;
|
|
|
|
|
double stopped_velocity_tolerance_rad_s = 5;
|
2026-06-30 16:04:36 +08:00
|
|
|
}
|
|
|
|
|
|
2026-07-09 16:17:14 +08:00
|
|
|
message EtherCATDcConfig {
|
|
|
|
|
optional bool enable = 1;
|
|
|
|
|
optional int32 reference_motor_id = 2;
|
|
|
|
|
optional uint32 sync0_cycle_us = 3;
|
|
|
|
|
optional int32 sync0_shift_us = 4;
|
|
|
|
|
optional uint32 sync_reference_clock_period = 5;
|
|
|
|
|
optional uint32 assign_activate = 6;
|
|
|
|
|
optional uint32 sync_monitor_period_ms = 7;
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-24 15:45:54 +08:00
|
|
|
message SocketCanConfig {
|
|
|
|
|
string dev_id = 1;
|
|
|
|
|
int32 channel_id = 2;
|
2026-07-31 08:48:04 +08:00
|
|
|
// Explicit Linux interface name (for example can0 or vcan0). When empty,
|
|
|
|
|
// the legacy channel_id based naming remains in use.
|
|
|
|
|
optional string interface_name = 3;
|
|
|
|
|
// Allows CAN-FD frames on the raw socket. This does not configure the
|
|
|
|
|
// physical interface bitrate or bring the interface up.
|
|
|
|
|
optional bool enable_fd = 4;
|
|
|
|
|
// Default BRS flag for callers that explicitly construct an FD frame.
|
|
|
|
|
optional bool bitrate_switch = 5;
|
|
|
|
|
// Bounded receive wait. Zero selects the implementation safety default.
|
|
|
|
|
optional uint32 receive_timeout_us = 6;
|
|
|
|
|
optional bool receive_own_messages = 7;
|
|
|
|
|
optional bool enable_error_frames = 8;
|
|
|
|
|
// Total bounded wait for one send() batch. Zero selects the implementation
|
|
|
|
|
// safety default. UME profiles set this below their control-cycle deadline.
|
|
|
|
|
optional uint32 send_timeout_us = 9;
|
2026-06-24 15:45:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message EtherCATConfig {
|
2026-07-09 14:18:59 +08:00
|
|
|
uint32 master_index = 1;
|
2026-06-24 15:45:54 +08:00
|
|
|
int32 cycle_us = 2;
|
2026-07-09 14:18:59 +08:00
|
|
|
Cia402ProtocolConfig cia402 = 3;
|
2026-07-09 16:17:14 +08:00
|
|
|
EtherCATDcConfig dc = 4;
|
|
|
|
|
optional uint32 slave_op_timeout_ms = 5;
|
|
|
|
|
optional uint32 slave_state_poll_period_ms = 6;
|
2026-06-30 16:04:36 +08:00
|
|
|
repeated EthercatSlaveConfig slaves = 10;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message MujocoMotorGroupConfig {
|
|
|
|
|
string world_id = 1;
|
2026-06-24 15:45:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
enum MotorBusType {
|
|
|
|
|
MOTOR_BUS_UNKNOWN = 0;
|
|
|
|
|
MOTOR_BUS_CAN = 1;
|
|
|
|
|
MOTOR_BUS_ETHERCAT = 2;
|
|
|
|
|
MOTOR_BUS_MUJOCO = 3;
|
2026-08-04 10:36:23 +08:00
|
|
|
reserved 4;
|
|
|
|
|
reserved "MOTOR_BUS_MODBUS_TCP";
|
2026-06-24 15:45:54 +08:00
|
|
|
}
|
|
|
|
|
|
2026-06-30 16:04:36 +08:00
|
|
|
enum MotorVendor {
|
|
|
|
|
MOTOR_VENDOR_UNKNOWN = 0;
|
|
|
|
|
MOTOR_VENDOR_TI5 = 1;
|
|
|
|
|
MOTOR_VENDOR_MUJOCO = 2;
|
2026-07-09 14:18:59 +08:00
|
|
|
MOTOR_VENDOR_EYOU = 3;
|
2026-08-04 10:36:23 +08:00
|
|
|
reserved 4;
|
|
|
|
|
reserved "MOTOR_VENDOR_PLC_GENERIC";
|
2026-06-30 16:04:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
enum MotorProtocol {
|
|
|
|
|
MOTOR_PROTOCOL_UNKNOWN = 0;
|
|
|
|
|
MOTOR_PROTOCOL_CANOPEN = 1;
|
|
|
|
|
MOTOR_PROTOCOL_ETHERCAT_CIA402 = 2;
|
|
|
|
|
MOTOR_PROTOCOL_MUJOCO = 3;
|
2026-08-04 10:36:23 +08:00
|
|
|
reserved 4;
|
|
|
|
|
reserved "MOTOR_PROTOCOL_CMVR_PLC_V1";
|
2026-06-30 16:04:36 +08:00
|
|
|
}
|
|
|
|
|
|
2026-06-24 15:45:54 +08:00
|
|
|
message MotorGroupConfig {
|
2026-08-04 10:36:23 +08:00
|
|
|
reserved 13;
|
|
|
|
|
reserved "modbus_tcp";
|
|
|
|
|
|
2026-06-24 15:45:54 +08:00
|
|
|
string id = 1;
|
|
|
|
|
MotorBusType bus_type = 2;
|
2026-06-30 16:04:36 +08:00
|
|
|
MotorVendor vendor = 3;
|
|
|
|
|
MotorProtocol protocol = 4;
|
2026-06-24 15:45:54 +08:00
|
|
|
|
|
|
|
|
oneof bus_config {
|
|
|
|
|
SocketCanConfig can = 10;
|
|
|
|
|
EtherCATConfig ethercat = 11;
|
2026-06-30 16:04:36 +08:00
|
|
|
MujocoMotorGroupConfig mujoco = 12;
|
2026-06-24 15:45:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JointLimitsConfig joint_limits = 30;
|
2026-06-30 16:04:36 +08:00
|
|
|
MotorList motors = 40;
|
2026-06-24 15:45:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message MotorConfig {
|
|
|
|
|
string id = 1;
|
|
|
|
|
repeated MotorGroupConfig motor_groups = 2;
|
|
|
|
|
}
|
|
|
|
|
message MotorRootConfig {
|
|
|
|
|
MotorConfig motor = 1;
|
|
|
|
|
}
|