新增状态6: 驻车(任务开始前)
This commit is contained in:
parent
191e630a41
commit
33f4ce28e0
@ -963,6 +963,12 @@ class fu_node : public rclcpp::Node
|
||||
// ======== 计算行驶状态 ========
|
||||
int16_t calculateDrivingStatus()
|
||||
{
|
||||
// 状态6: 驻车(任务开始前)
|
||||
if (!is_start)
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
|
||||
// 检查栅格数据新鲜度(超过3秒认为数据过期)
|
||||
auto now = node_clock_->now();
|
||||
double grid_age = 0.0;
|
||||
|
||||
@ -19,7 +19,7 @@ struct GeneralMsg
|
||||
int motorTemp = 0; // 电机温度 °C
|
||||
int controllerTemp = 0; // 控制器温度 °C
|
||||
int64_t timestamp = 0; // 时间戳
|
||||
int drivingStatus = 0; // 行驶状态:0=正常行驶(默认),1=遇障停车,2=绕障中,3=雷达数据超时停车,4=RTK没信号停车,5=到达终点停车
|
||||
int drivingStatus = 6; // 行驶状态:0=正常行驶(执行清扫任务),1=遇障停车,2=绕障中,3=雷达数据超时停车,4=RTK没信号停车,5=到达终点停车,6=驻车(任务开始前)
|
||||
int driveMode = 0; // 驾驶模式:0=本地模式,1=自驾模式,2=遥控模式,3=远控模式
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user