bug:brake 搞反了应该1的
This commit is contained in:
parent
fdde0c6e24
commit
9e7ae8f7fd
@ -210,7 +210,7 @@ private:
|
||||
int calculateSafeDistance(int speed) const
|
||||
{
|
||||
// 基于速度计算安全距离:速度越快,需要的距离越远
|
||||
return std::max(3, speed / 10 + 2); // 最少3格,速度30时为5格
|
||||
return std::max(3, speed / 400 + 2); // 最少3格,速度1500时为5格
|
||||
}
|
||||
|
||||
// 评估绕障可行性
|
||||
@ -790,8 +790,8 @@ private:
|
||||
|
||||
// 发布控制指令
|
||||
sweeper_interfaces::msg::McCtrl message;
|
||||
message.sweep = false;
|
||||
message.brake = 1; // 0开;1关
|
||||
message.sweep = true;
|
||||
message.brake = 0; // 0开;1关
|
||||
message.gear = 2; // 0空挡;1后退;2前进
|
||||
|
||||
if (reliability == 1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user