This commit is contained in:
tankaitao 2025-12-04 15:09:46 +08:00
parent 1f94a92947
commit f47a93c21f
8 changed files with 393 additions and 44 deletions

View File

@ -32,47 +32,47 @@
<!-- <LeftArm id="left_arm" devtype="ti5Robot" />-->
<!-- <RightArm />-->
<!-- <Neck/>-->
<Humanoid id="hc01" dof="14"
urdf="/home/lgv/cmvr/cmvr-es/config/robot_description/hc_description/dual_arm.urdf"
baseLink="PELVIS_S"
jointNames="L_SHOULDER_P,L_SHOULDER_R,L_SHOULDER_Y,L_ELBOW_R,L_WRIST_P,L_WRIST_Y,L_WRIST_R,R_SHOULDER_P,R_SHOULDER_R,R_SHOULDER_Y,R_ELBOW_R,R_WRIST_P,R_WRIST_Y,R_WRIST_R"
linkNames="PELVIS_S,L_SHOULDER_P_S,L_SHOULDER_R_S,L_SHOULDER_Y_S,L_ELBOW_R_S,L_WRIST_P_S,L_WRIST_Y_S,L_WRIST_R_S,R_SHOULDER_P_S,R_SHOULDER_R_S,R_SHOULDER_Y_S,R_ELBOW_R_S,R_WRIST_P_S,R_WRIST_Y_S,R_WRIST_R_S,R_FINGER_TIP,R_CAM"
bufferSize="50"
verbose="false">
<CanManger id="" devId="">
<LeftArmCan id = " " devId = " " channelId ="0" enable="true" toolFrame="L_FINGER_TIP">
<Motor id="23" jointName="L_SHOULDER_P" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
<Motor id="24" jointName="L_SHOULDER_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
<Motor id="25" jointName="L_SHOULDER_Y" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
<Motor id="26" jointName="L_ELBOW_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
<Motor id="27" jointName="L_WRIST_P" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
<Motor id="28" jointName="L_WRIST_Y" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
<Motor id="1" jointName="L_WRIST_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
</LeftArmCan>
<RightArmCan id = " " devId = " " channelId ="1" enable="true" toolFrame="R_FINGER_TIP">
<Motor id="16" jointName="R_SHOULDER_P" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
<Motor id="17" jointName="R_SHOULDER_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
<Motor id="18" jointName="R_SHOULDER_Y" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
<Motor id="19" jointName="R_ELBOW_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
<Motor id="20" jointName="R_WRIST_P" limitQLb="-3.14" limitQUb="3.14" limitQd="3.0"/>
<Motor id="21" jointName="R_WRIST_Y" limitQLb="-1.102" limitQUb="1.02" limitQd="3.0"/>
<Motor id="22" jointName="R_WRIST_R" limitQLb="-0.293" limitQUb="1.57079" limitQd="3.0"/>
</RightArmCan>
<HeadCan id = " " devId = " " channelId ="2" enable="false">
<Motor id="32" jointName="HEAD_Y" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
<Motor id="30" jointName="HEAD_P" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
<Motor id="31" jointName="HEAD_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
</HeadCan>
<WaistCan id = " " devId = " " channelId ="3" enable="false">
<Motor id="14" jointName="WAIST_Y" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
<Motor id="15" jointName="WAIST_P" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>
</WaistCan>
</CanManger>
<!-- <Humanoid id="hc01" dof="14"-->
<!-- urdf="/home/tankaitao/cmvr-lgv/cmvr-es/config/robot_description/hc_description/dual_arm.urdf"-->
<!-- baseLink="PELVIS_S"-->
<!-- jointNames="L_SHOULDER_P,L_SHOULDER_R,L_SHOULDER_Y,L_ELBOW_R,L_WRIST_P,L_WRIST_Y,L_WRIST_R,R_SHOULDER_P,R_SHOULDER_R,R_SHOULDER_Y,R_ELBOW_R,R_WRIST_P,R_WRIST_Y,R_WRIST_R"-->
<!-- linkNames="PELVIS_S,L_SHOULDER_P_S,L_SHOULDER_R_S,L_SHOULDER_Y_S,L_ELBOW_R_S,L_WRIST_P_S,L_WRIST_Y_S,L_WRIST_R_S,R_SHOULDER_P_S,R_SHOULDER_R_S,R_SHOULDER_Y_S,R_ELBOW_R_S,R_WRIST_P_S,R_WRIST_Y_S,R_WRIST_R_S,R_FINGER_TIP,R_CAM"-->
<!-- bufferSize="50"-->
<!-- verbose="false">-->
<!-- <CanManger id="" devId="">-->
<!-- <LeftArmCan id = " " devId = " " channelId ="0" enable="false" toolFrame="L_FINGER_TIP">-->
<!-- <Motor id="23" jointName="L_SHOULDER_P" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
<!-- <Motor id="24" jointName="L_SHOULDER_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
<!-- <Motor id="25" jointName="L_SHOULDER_Y" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
<!-- <Motor id="26" jointName="L_ELBOW_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
<!-- <Motor id="27" jointName="L_WRIST_P" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
<!-- <Motor id="28" jointName="L_WRIST_Y" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
<!-- <Motor id="1" jointName="L_WRIST_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
<!-- </LeftArmCan>-->
<!-- <RightArmCan id = " " devId = " " channelId ="1" enable="false" toolFrame="R_FINGER_TIP">-->
<!-- <Motor id="16" jointName="R_SHOULDER_P" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
<!-- <Motor id="17" jointName="R_SHOULDER_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
<!-- <Motor id="18" jointName="R_SHOULDER_Y" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
<!-- <Motor id="19" jointName="R_ELBOW_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
<!-- <Motor id="20" jointName="R_WRIST_P" limitQLb="-3.14" limitQUb="3.14" limitQd="3.0"/>-->
<!-- <Motor id="21" jointName="R_WRIST_Y" limitQLb="-1.102" limitQUb="1.02" limitQd="3.0"/>-->
<!-- <Motor id="22" jointName="R_WRIST_R" limitQLb="-0.293" limitQUb="1.57079" limitQd="3.0"/>-->
<!-- </RightArmCan>-->
<!-- <HeadCan id = " " devId = " " channelId ="2" enable="false">-->
<!-- <Motor id="32" jointName="HEAD_Y" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
<!-- <Motor id="30" jointName="HEAD_P" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
<!-- <Motor id="31" jointName="HEAD_R" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
<!-- </HeadCan>-->
<!-- <WaistCan id = " " devId = " " channelId ="3" enable="false">-->
<!-- <Motor id="14" jointName="WAIST_Y" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
<!-- <Motor id="15" jointName="WAIST_P" limitQLb="3.14" limitQUb="3.14" limitQd="3.0"/>-->
<!-- </WaistCan>-->
<!-- </CanManger>-->
</Humanoid>
<AuboRobot id="hc02" ip="127.0.0.1" port="30004" username="aubo" password="123456">
<!-- </Humanoid>-->
<!-- <AuboRobot id="hc02" ip="127.0.0.1" port="30004" username="aubo" password="123456">-->
</AuboRobot>
<!-- </AuboRobot>-->
</Robot>
<BioHead>

View File

@ -196,7 +196,7 @@ message SpeakStop {
// -
// -
message Happy {
message Request {
CommandHeader.Request header = 1; //
@ -220,7 +220,7 @@ message Surprise {
}
//-
message ExpressionTired {
message Request {
CommandHeader.Request header = 1;
@ -231,4 +231,40 @@ message ExpressionTired {
}
}
//-
message ExpressionAngry {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}
//-
message ExpressionSadness {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}
//-
message ExpressionYawn {
message Request {
CommandHeader.Request header = 1;
}
message Feedback {
CommandHeader.Feedback header = 1;
}
}

View File

@ -31,6 +31,17 @@ service BioHeadService {
rpc ExpressionTired(ExpressionTired.Request) returns (ExpressionTired.Feedback){};
rpc ExpressionAngry(ExpressionAngry.Request) returns (ExpressionAngry.Feedback){};
rpc ExpressionSadness(ExpressionSadness.Request) returns (ExpressionSadness.Feedback){};
rpc ExpressionYawn(ExpressionYawn.Request) returns (ExpressionYawn.Feedback){};
}

View File

@ -68,9 +68,12 @@ namespace cmvr::device {
virtual void speakstart(){};
virtual void speakstop(){};
virtual void expressionHappy() {}; // 高兴
virtual void expressionSurprised() {}; // 惊讶
virtual void expressionTired() {}; // 困倦(疲惫)
virtual void expressionHappy() {};
virtual void expressionSurprised() {};
virtual void expressionTired() {};
virtual void expressionAngry() {};
virtual void expressionSadness() {};
virtual void expressionYawn() {};
FacialExpressionState expression_state_;
std::atomic<bool> emergency_stop_requested = false;

View File

@ -32,6 +32,9 @@ namespace cmvr::device {
void expressionHappy()override;
void expressionSurprised()override;
void expressionTired()override;
void expressionAngry() override;
void expressionSadness()override;
void expressionYawn()override;
private:

View File

@ -610,6 +610,36 @@ void BioHeadRobot::expressionHappy() {
}
serial_->sendRawServoData(raw_data);
std::this_thread::sleep_for(std::chrono::seconds(3));
// 设备64角度10通道
const std::vector<double> device_64_neutral = {90, 90, 90, 90, 90, 90, 90, 90, 90, 90};
// 设备65角度10通道
const std::vector<double> device_65_neutral = {90, 90, 90, 90, 90, 90, 90, 90, 90, 90};
std::vector<uint8_t> raw_data_neutral;
// 下发设备64的10个通道0~9
for (int ch = 0; ch < 10; ++ch) {
uint8_t angle = static_cast<uint8_t>(std::round(device_64_neutral[ch]));
raw_data_neutral.push_back(64); // 地址
raw_data_neutral.push_back(ch); // 通道号
raw_data_neutral.push_back(angle); // 角度
raw_data_neutral.push_back(step_ms & 0xFF); // 低字节
raw_data_neutral.push_back((step_ms >> 8) & 0xFF); // 高字节
}
// 下发设备65的10个通道0~9
for (int ch = 0; ch < 10; ++ch) {
uint8_t angle = static_cast<uint8_t>(std::round(device_65_neutral[ch]));
raw_data_neutral.push_back(65); // 地址
raw_data_neutral.push_back(ch); // 通道号
raw_data_neutral.push_back(angle); // 角度
raw_data_neutral.push_back(step_ms & 0xFF); // 低字节
raw_data_neutral.push_back((step_ms >> 8) & 0xFF); // 高字节
}
serial_->sendRawServoData(raw_data_neutral);
}
@ -708,7 +738,194 @@ void BioHeadRobot::expressionTired() {
}
void BioHeadRobot::expressionAngry() {
const int step_ms = 200;
// 设备64角度10通道
const std::vector<double> device_64_angles = {90, 90, 90, 90, 40, 120, 125, 50, 90, 90};
// 设备65角度10通道
const std::vector<double> device_65_angles = {90, 85, 95, 100, 90, 105, 80, 110, 85, 95};
std::vector<uint8_t> raw_data;
// 下发设备64的10个通道0~9
for (int ch = 0; ch < 10; ++ch) {
uint8_t angle = static_cast<uint8_t>(std::round(device_64_angles[ch]));
raw_data.push_back(64); // 地址
raw_data.push_back(ch); // 通道号
raw_data.push_back(angle); // 角度
raw_data.push_back(step_ms & 0xFF); // 低字节
raw_data.push_back((step_ms >> 8) & 0xFF); // 高字节
}
// 下发设备65的10个通道0~9
for (int ch = 0; ch < 10; ++ch) {
uint8_t angle = static_cast<uint8_t>(std::round(device_65_angles[ch]));
raw_data.push_back(65); // 地址
raw_data.push_back(ch); // 通道号
raw_data.push_back(angle); // 角度
raw_data.push_back(step_ms & 0xFF); // 低字节
raw_data.push_back((step_ms >> 8) & 0xFF); // 高字节
}
serial_->sendRawServoData(raw_data);
std::this_thread::sleep_for(std::chrono::seconds(3));
// 设备64角度10通道
const std::vector<double> device_64_neutral = {90, 90, 90, 90, 90, 90, 90, 90, 90, 90};
// 设备65角度10通道
const std::vector<double> device_65_neutral = {90, 90, 90, 90, 90, 90, 90, 90, 90, 90};
std::vector<uint8_t> raw_data_neutral;
// 下发设备64的10个通道0~9
for (int ch = 0; ch < 10; ++ch) {
uint8_t angle = static_cast<uint8_t>(std::round(device_64_neutral[ch]));
raw_data_neutral.push_back(64); // 地址
raw_data_neutral.push_back(ch); // 通道号
raw_data_neutral.push_back(angle); // 角度
raw_data_neutral.push_back(step_ms & 0xFF); // 低字节
raw_data_neutral.push_back((step_ms >> 8) & 0xFF); // 高字节
}
// 下发设备65的10个通道0~9
for (int ch = 0; ch < 10; ++ch) {
uint8_t angle = static_cast<uint8_t>(std::round(device_65_neutral[ch]));
raw_data_neutral.push_back(65); // 地址
raw_data_neutral.push_back(ch); // 通道号
raw_data_neutral.push_back(angle); // 角度
raw_data_neutral.push_back(step_ms & 0xFF); // 低字节
raw_data_neutral.push_back((step_ms >> 8) & 0xFF); // 高字节
}
serial_->sendRawServoData(raw_data_neutral);
}
void BioHeadRobot::expressionSadness() {
const int step_ms = 200;
// 设备64角度10通道
const std::vector<double> device_64_angles = {90, 90, 90, 90, 40, 120, 125, 50, 90, 90};
// 设备65角度10通道
const std::vector<double> device_65_angles = {90, 85, 95, 100, 90, 105, 80, 110, 85, 95};
std::vector<uint8_t> raw_data;
// 下发设备64的10个通道0~9
for (int ch = 0; ch < 10; ++ch) {
uint8_t angle = static_cast<uint8_t>(std::round(device_64_angles[ch]));
raw_data.push_back(64); // 地址
raw_data.push_back(ch); // 通道号
raw_data.push_back(angle); // 角度
raw_data.push_back(step_ms & 0xFF); // 低字节
raw_data.push_back((step_ms >> 8) & 0xFF); // 高字节
}
// 下发设备65的10个通道0~9
for (int ch = 0; ch < 10; ++ch) {
uint8_t angle = static_cast<uint8_t>(std::round(device_65_angles[ch]));
raw_data.push_back(65); // 地址
raw_data.push_back(ch); // 通道号
raw_data.push_back(angle); // 角度
raw_data.push_back(step_ms & 0xFF); // 低字节
raw_data.push_back((step_ms >> 8) & 0xFF); // 高字节
}
serial_->sendRawServoData(raw_data);
std::this_thread::sleep_for(std::chrono::seconds(3));
// 设备64角度10通道
const std::vector<double> device_64_neutral = {90, 90, 90, 90, 90, 90, 90, 90, 90, 90};
// 设备65角度10通道
const std::vector<double> device_65_neutral = {90, 90, 90, 90, 90, 90, 90, 90, 90, 90};
std::vector<uint8_t> raw_data_neutral;
// 下发设备64的10个通道0~9
for (int ch = 0; ch < 10; ++ch) {
uint8_t angle = static_cast<uint8_t>(std::round(device_64_neutral[ch]));
raw_data_neutral.push_back(64); // 地址
raw_data_neutral.push_back(ch); // 通道号
raw_data_neutral.push_back(angle); // 角度
raw_data_neutral.push_back(step_ms & 0xFF); // 低字节
raw_data_neutral.push_back((step_ms >> 8) & 0xFF); // 高字节
}
// 下发设备65的10个通道0~9
for (int ch = 0; ch < 10; ++ch) {
uint8_t angle = static_cast<uint8_t>(std::round(device_65_neutral[ch]));
raw_data_neutral.push_back(65); // 地址
raw_data_neutral.push_back(ch); // 通道号
raw_data_neutral.push_back(angle); // 角度
raw_data_neutral.push_back(step_ms & 0xFF); // 低字节
raw_data_neutral.push_back((step_ms >> 8) & 0xFF); // 高字节
}
serial_->sendRawServoData(raw_data_neutral);
}
void BioHeadRobot::expressionYawn() {
const int step_ms = 200;
// 设备64角度10通道
const std::vector<double> device_64_angles = {90, 90, 90, 90, 40, 120, 125, 50, 90, 90};
// 设备65角度10通道
const std::vector<double> device_65_angles = {90, 85, 95, 100, 90, 105, 80, 110, 85, 95};
std::vector<uint8_t> raw_data;
// 下发设备64的10个通道0~9
for (int ch = 0; ch < 10; ++ch) {
uint8_t angle = static_cast<uint8_t>(std::round(device_64_angles[ch]));
raw_data.push_back(64); // 地址
raw_data.push_back(ch); // 通道号
raw_data.push_back(angle); // 角度
raw_data.push_back(step_ms & 0xFF); // 低字节
raw_data.push_back((step_ms >> 8) & 0xFF); // 高字节
}
// 下发设备65的10个通道0~9
for (int ch = 0; ch < 10; ++ch) {
uint8_t angle = static_cast<uint8_t>(std::round(device_65_angles[ch]));
raw_data.push_back(65); // 地址
raw_data.push_back(ch); // 通道号
raw_data.push_back(angle); // 角度
raw_data.push_back(step_ms & 0xFF); // 低字节
raw_data.push_back((step_ms >> 8) & 0xFF); // 高字节
}
serial_->sendRawServoData(raw_data);
std::this_thread::sleep_for(std::chrono::seconds(3));
// 设备64角度10通道
const std::vector<double> device_64_neutral = {90, 90, 90, 90, 90, 90, 90, 90, 90, 90};
// 设备65角度10通道
const std::vector<double> device_65_neutral = {90, 90, 90, 90, 90, 90, 90, 90, 90, 90};
std::vector<uint8_t> raw_data_neutral;
// 下发设备64的10个通道0~9
for (int ch = 0; ch < 10; ++ch) {
uint8_t angle = static_cast<uint8_t>(std::round(device_64_neutral[ch]));
raw_data_neutral.push_back(64); // 地址
raw_data_neutral.push_back(ch); // 通道号
raw_data_neutral.push_back(angle); // 角度
raw_data_neutral.push_back(step_ms & 0xFF); // 低字节
raw_data_neutral.push_back((step_ms >> 8) & 0xFF); // 高字节
}
// 下发设备65的10个通道0~9
for (int ch = 0; ch < 10; ++ch) {
uint8_t angle = static_cast<uint8_t>(std::round(device_65_neutral[ch]));
raw_data_neutral.push_back(65); // 地址
raw_data_neutral.push_back(ch); // 通道号
raw_data_neutral.push_back(angle); // 角度
raw_data_neutral.push_back(step_ms & 0xFF); // 低字节
raw_data_neutral.push_back((step_ms >> 8) & 0xFF); // 高字节
}
serial_->sendRawServoData(raw_data_neutral);
}

View File

@ -36,6 +36,11 @@ namespace cmvr::service
grpc::Status ExpressionTired(grpc::ServerContext* context, const cmvr::api::ExpressionTired_Request* request, cmvr::api::ExpressionTired_Feedback* response) override;
grpc::Status ExpressionAngry(grpc::ServerContext* context, const cmvr::api::ExpressionAngry_Request* request, cmvr::api::ExpressionAngry_Feedback* response) override;
grpc::Status ExpressionSadness(grpc::ServerContext* context, const cmvr::api::ExpressionSadness_Request* request, cmvr::api::ExpressionSadness_Feedback* response) override;
grpc::Status ExpressionYawn(grpc::ServerContext* context, const cmvr::api::ExpressionYawn_Request* request, cmvr::api::ExpressionYawn_Feedback* response) override;
private:
device::DeviceManager& dmgr_;
};

View File

@ -350,3 +350,77 @@ grpc::Status gRPCMBioHeadServiceImpl::ExpressionTired(grpc::ServerContext* conte
return grpc::Status::OK;
}
}
grpc::Status gRPCMBioHeadServiceImpl::ExpressionAngry(grpc::ServerContext* context, const cmvr::api::ExpressionAngry_Request* request, cmvr::api::ExpressionAngry_Feedback* response)
{
try {
string dev_id = request->header().device_id();
auto robot = dmgr_.getDevice<AbstractBiohead>(dev_id);
if (!robot) {
throw runtime_error("Biohead device not found");
}
robot->expressionAngry(); // 停止执行
response->mutable_header()->set_success(true);
setCurrentTimestamp(response->mutable_header()->mutable_timestamp());
return grpc::Status::OK;
}
catch (const exception& e) {
response->mutable_header()->set_success(false);
response->mutable_header()->set_error_message(e.what());
setCurrentTimestamp(response->mutable_header()->mutable_timestamp());
return grpc::Status::OK;
}
}
grpc::Status gRPCMBioHeadServiceImpl::ExpressionSadness(grpc::ServerContext* context, const cmvr::api::ExpressionSadness_Request* request, cmvr::api::ExpressionSadness_Feedback* response)
{
try {
string dev_id = request->header().device_id();
auto robot = dmgr_.getDevice<AbstractBiohead>(dev_id);
if (!robot) {
throw runtime_error("Biohead device not found");
}
robot->expressionAngry(); // 停止执行
response->mutable_header()->set_success(true);
setCurrentTimestamp(response->mutable_header()->mutable_timestamp());
return grpc::Status::OK;
}
catch (const exception& e) {
response->mutable_header()->set_success(false);
response->mutable_header()->set_error_message(e.what());
setCurrentTimestamp(response->mutable_header()->mutable_timestamp());
return grpc::Status::OK;
}
}
grpc::Status gRPCMBioHeadServiceImpl::ExpressionYawn(grpc::ServerContext* context, const cmvr::api::ExpressionYawn_Request* request, cmvr::api::ExpressionYawn_Feedback* response)
{
try {
string dev_id = request->header().device_id();
auto robot = dmgr_.getDevice<AbstractBiohead>(dev_id);
if (!robot) {
throw runtime_error("Biohead device not found");
}
robot->expressionYawn(); // 停止执行
response->mutable_header()->set_success(true);
setCurrentTimestamp(response->mutable_header()->mutable_timestamp());
return grpc::Status::OK;
}
catch (const exception& e) {
response->mutable_header()->set_success(false);
response->mutable_header()->set_error_message(e.what());
setCurrentTimestamp(response->mutable_header()->mutable_timestamp());
return grpc::Status::OK;
}
}