26 className = this->staticMetaObject.className();
90 emit
message(
"ERROR getting laser angle and resolution from laserThread for front laser. LaserThread is not running! ObstacleCheckThread::run()");
94 emit
message(
"ERROR getting laser angle and resolution from laserThread for rear laser. LaserThread is not running! ObstacleCheckThread::run()");
120 double currentWidth = 0.0;
121 double largestWidth = 0.0;
122 float currentDistance = 0.0;
125 int largestFreeAreaStart = 0;
126 int largestFreeAreaEnd = 0;
128 float middleOfLaser = 0.0;
134 emit
message(QString(
"<font color=\"#FF0000\">%1::init not called! Stopping thread!</font>").arg(
className));
268 for (
int angleIndex=first; angleIndex <= last; angleIndex++)
339 for (
int angleIndex = first; angleIndex <= last; angleIndex++)
348 ((angleIndex == first) &&
352 ((angleIndex != first) && (angleIndex != last) &&
365 ((angleIndex == last) &&
369 ((angleIndex != first) && (angleIndex != last) &&
382 ((angleIndex == last) &&
386 ((angleIndex == first) &&
390 ((angleIndex != first) && (angleIndex != last) &&
413 emit
message(QString(
"ERROR in logical check of free laser areas in %1!").arg(
className));
414 emit
message(
"Reaction to be implemented!!!");
473 if (currentWidth > largestWidth)
476 largestWidth = currentWidth;
521 if (largestFreeAreaEnd != 0)
523 for (
int angleIndex=largestFreeAreaStart; angleIndex<=largestFreeAreaEnd; angleIndex++)
529 centerOfFreeWayFront = largestFreeAreaStart + ((largestFreeAreaEnd - largestFreeAreaStart) / 2);
537 emit
newDrivingAngleSet(largestFreeAreaStart, largestFreeAreaEnd, centerOfFreeWayFront, largestWidth);
555 ( centerOfFreeWayFront == middleOfLaser )
564 if ( (centerOfFreeWayFront < middleOfLaser) && (centerOfFreeWayFront > -1) )
572 if (centerOfFreeWayFront > middleOfLaser)
602 currentDistance = 0.0;
605 largestFreeAreaStart = 0;
606 largestFreeAreaEnd = 0;
607 centerOfFreeWayFront = 0.0;
638 if (laserscanner ==
LASER1)
639 return sqrt( pow(b, 2.0) + pow(c, 2.0) - 2.0*b*c * cos(alpha*
M_PI / (
double)
laserAngleFront) );
641 if (laserscanner ==
LASER2)
642 return sqrt( pow(b, 2.0) + pow(c, 2.0) - 2.0*b*c * cos(alpha*
M_PI / (
double)
laserAngleRear) );
644 emit
message(QString(
"ERROR: laser no. %1 not supported (calculateDriveThroughWidth::%2)").arg(laserscanner).arg(
className));
704 emit
message(QString(
"<font color=\"#FF0000\">ERROR in %1::setIgnoreArea: laser number %2 or area %3 not implemented!<font>").arg(
className).arg(laser).arg(area));
744 if (errorlevel == -1)
749 emit
message(
"<font color=\"#FF0000\">Error received from other module. Stopping obstacle check thread.</font>");