cmvr-es-cli/protos/cmvr/api/biohead_command.proto

178 lines
5.5 KiB
Protocol Buffer
Raw Normal View History

2025-08-21 14:05:27 +08:00
syntax = "proto3";
import "cmvr/api/common.proto"; // 导入通用命令头定义,确保与其他服务接口一致
package cmvr.api;
/**
*
*
*/
message FacialExpression {
/**
*
* 0.0-1.0
*/
message Eyebrow {
float left_outside_y = 1; // 左眉外侧垂直位置
float left_inside_y = 2; // 左眉内侧垂直位置
float right_outside_y = 3; // 右眉外侧垂直位置
float right_inside_y = 4; // 右眉内侧垂直位置
}
Eyebrow eyebrow = 3; // 眉毛参数封装
/**
*
* 0.0-1.0
*/
message Eyelid {
float left_upper_y = 1; // 左上眼睑垂直位置
float left_lower_y = 2; // 左下眼睑垂直位置
float right_upper_y = 3; // 右上眼睑垂直位置
float right_lower_y = 4; // 右下眼睑垂直位置
}
Eyelid eyelid = 4; // 眼睑参数封装
/**
*
* -1.01.00
*/
message Eyeball {
float left_x = 1; // 左眼球水平位置
float left_y = 2; // 左眼球垂直位置
float right_x = 3; // 右眼球水平位置
float right_y = 4; // 右眼球垂直位置
}
Eyeball eyeball = 5; // 眼球参数封装
/**
*
* 0.0-1.0
*/
message Nose {
float left_y = 1; // 鼻子左侧垂直位置
float right_y = 2; // 鼻子右侧垂直位置
}
Nose nose = 6; // 鼻子参数封装
/**
*
*
*/
message Mouth {
float upper_lip_y = 1; // 上唇垂直位置
float upper_lip_z = 2; // 上唇前后位置Z轴
float lower_lip_y = 3; // 下唇垂直位置
float lower_lip_z = 4; // 下唇前后位置Z轴
/**
*
*
*/
message LeftLip {
float upper_x = 1; // 左上唇水平位置
float upper_y = 2; // 左上唇垂直位置
float corner_x = 3; // 左唇角水平位置
float corner_y = 4; // 左唇角垂直位置
float lower_x = 5; // 左下唇水平位置
float lower_y = 6; // 左下唇垂直位置
}
LeftLip left_lip = 5; // 左唇角参数封装
/**
*
*
*/
message RightLip {
float upper_x = 1; // 右上唇水平位置
float upper_y = 2; // 右上唇垂直位置
float corner_x = 3; // 右唇角水平位置
float corner_y = 4; // 右唇角垂直位置
float lower_x = 5; // 右下唇水平位置
float lower_y = 6; // 右下唇垂直位置
}
RightLip right_lip = 6; // 右唇角参数封装
}
Mouth mouth = 7; // 嘴巴参数封装
/**
*
* X/Y轴
*/
message Jaw {
float x = 1; // 下巴水平位置
float y = 2; // 下巴垂直位置
}
Jaw jaw = 8; // 下巴参数封装
}
/**
*
*
*/
message SetFacialExpression {
message Request {
CommandHeader.Request header = 1; // 通用命令头包含设备ID和时间戳
FacialExpression expression = 2; // 具体面部表情参数
}
message Feedback {
CommandHeader.Feedback header = 1; // 通用反馈头,包含操作状态和时间戳
string execution_id = 2; // 表情执行任务ID
float execution_time_ms = 3; // 表情执行耗时(毫秒)
}
}
/**
*
*
*/
message StreamFacialExpression {
message Request {
CommandHeader.Request header = 1; // 通用命令头
FacialExpression expr = 2; // 执行
bool eof = 3; // 标记是否为流结束
}
message Feedback {
CommandHeader.Feedback header = 1; // 通用反馈头
FacialExpression expr_diff = 2; // 执行误差
}
}
/**
*
*
*/
message GetStatus {
message Request {
CommandHeader.Request header = 1; // 通用命令头
}
message Feedback {
CommandHeader.Feedback header = 1; // 通用反馈头
bool is_moving = 2; // 是否有部位在移动
string last_request_id = 3; // 上一次请求的ID
repeated float current_positions = 4; // 当前各部位位置参数
bool camera_recording = 5; // 相机是否在录制
string active_recording_id = 6; // 活跃录制任务的ID
}
}
/**
*
*
*/
message EmergencyStop {
message Request {
CommandHeader.Request header = 1; // 通用命令头
}
message Feedback {
CommandHeader.Feedback header = 1; // 通用反馈头
string stopped_processes = 2; // 已停止的进程列表
}
}