grpc_client/protos/cmvr/api/biohead_command.proto
2025-11-13 03:01:00 +08:00

178 lines
5.5 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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.0到1.0标准化值中心为0
*/
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; // 已停止的进程列表
}
}