stop robot for lidar

This commit is contained in:
ackimixs
2024-05-06 19:03:25 +02:00
parent 36bf84a8c7
commit 394926f507

View File

@@ -868,11 +868,11 @@ std::vector<int> TCPServer::getNotFallenFlowers() const {
std::vector<int> res = {0, 1, 2};
for (auto & tag : arucoTags) {
if (TCPUtils::endWith(tag.name(), "flower") && tag.getNbFind() >= 1) {
auto roll = tag.rot()[1];
auto angle = tag.rot()[0];
auto xPos = tag.pos()[0];
auto yPos = tag.pos()[1];
if (roll > 2.7f && roll < -2.f) {
if (angle > 2.7f && angle < -2.f) {
if (xPos > 800) continue;
if (yPos > 70 && yPos < 200) {
@@ -1593,6 +1593,8 @@ void TCPServer::removePot(StratPattern sp) {
void TCPServer::getLidarPos() {
this->broadcastMessage("strat;arduino;clear;1\n");
this->askLidarPosition();
awaitForLidar = true;