AURobotServers
4
|
#include <uclientfunclaser.h>
Public Member Functions | |
virtual void | changedNamespace (const char *newNamespace) |
virtual const char * | commandList () |
virtual void | handleNewData (USmlTag *tag, const char *ifname) |
virtual const char * | name () |
UClientFuncLaser () | |
virtual | ~UClientFuncLaser () |
Public Member Functions inherited from UClientFuncBase | |
virtual void | doTimeTick () |
int | getMsgCnt () |
bool | getVerbose () |
bool | sendMsg (UClientPortSml *cnn, const char *buff, int buffCnt) |
bool | sendMsg (UClientPortSml *cnn, const char *buff) |
void | setVerbose (bool value) |
UClientFuncBase () | |
virtual | ~UClientFuncBase () |
Protected Member Functions | |
UTime | getLaserTime (int histNum) |
virtual bool | gotNewData (ULaserDataSet *scan) |
virtual bool | gotNewEkfData () |
virtual bool | gotNewFreePolyData () |
virtual bool | gotNewPathData () |
virtual bool | gotNewPlanData () |
void | setPose (UPoseTime poseTime) |
void | setPoseIfNewer (UPose pose, UTime t) |
Protected Member Functions inherited from UClientFuncBase | |
void | handleHelp (USmlTag *tag) |
void | printReply (USmlTagIn *tag, const char *preString) |
Protected Attributes | |
UPosition | ciGoal |
UPose | ekfPose |
UTime | ekfTime |
int | ekfuSkipd |
int | ekfuUsed |
UProbPoly | freePoly [MAX_FREE_POLY_HIST] |
int | freePolyCnt |
int | freePolyNewest |
UPosRot | laserPose |
UPoseTime | odoPose |
ULaserPathResult * | paths [MAX_NEW_PATH_CANDIDATES] |
int | pathsCnt |
UPlannerData | planner |
UPoseTime | poseHist [MAX_POSE_HIST] |
int | poseHistCnt |
int | poseHistNewest |
ULaserDataHistory | scanHist |
UPose | toPose |
ULaserWpc | wpcData |
Protected Attributes inherited from UClientFuncBase | |
int | msgHandled |
char | serverNamespace [MAX_SML_NAME_LENGTH] |
int | serverNamespaceValue |
bool | verboseMessages |
Private Member Functions | |
bool | handleControlIntervals (USmlTag *ciTag) |
bool | handleEkf (USmlTag *tag) |
bool | handleGetComplexData (USmlTag *tag) |
bool | handleLaserScan (USmlTag *tag) |
bool | handleOdo (USmlTag *tag) |
bool | handlePath (USmlTag *tag) |
bool | handlePlan (USmlTag *tag) |
bool | handleVarData (USmlTag *tag) |
bool | handleWpc (USmlTag *tag) |
bool | handleWpf (USmlTag *ciTag) |
Additional Inherited Members | |
Public Attributes inherited from UClientFuncBase | |
ULock | decodeLock |
Support for laser scanner results
UClientFuncLaser::UClientFuncLaser | ( | ) |
Constructor
References ekfuSkipd, ekfuUsed, freePolyCnt, freePolyNewest, MAX_NEW_PATH_CANDIDATES, paths, pathsCnt, and poseHistCnt.
|
virtual |
Destructor
References MAX_NEW_PATH_CANDIDATES, and paths.
|
virtual |
The server has set (or changed) the namespace
Reimplemented from UClientFuncBase.
References MAX_SML_NAME_LENGTH, NAMESPACE_LASER, NAMESPACE_MMRD, NAMESPACE_MMRSR2, UClientFuncBase::serverNamespace, and UClientFuncBase::serverNamespaceValue.
|
virtual |
Function, that shall return a string with all handled commands, i.e. should return "gmk gmk2d guidemark", if commands starting with any of these three keywords are handled by this function
Reimplemented from UClientFuncBase.
|
protected |
get time of laser-data
References ULaserDataHistory::getScan(), ULaserDataSet::getTime(), and scanHist.
|
protectedvirtual |
Called when a new scan is received
Reimplemented in UClientFuncLaserGui.
References ULaserDataSet::print().
Referenced by handleLaserScan(), handleNewData(), handlePath(), and handleVarData().
|
protectedvirtual |
Called when new ekf data is available
Referenced by handleEkf().
|
protectedvirtual |
Got new polygon data with passable area. Newest data is in freePoly[freePolyNewest]
Referenced by handleGetComplexData().
|
protectedvirtual |
|
protectedvirtual |
Called when new ekf data is available
Referenced by handlePlan().
|
private |
Handle control interval data
|
private |
Handle EKF message
References ekfPose, ekfTime, ekfuSkipd, ekfuUsed, USmlTagIn::getNextAttribute(), gotNewEkfData(), UPose::h, HEX, MAX_SML_NAME_LENGTH, UTime::setTime(), UPose::x, and UPose::y.
Referenced by handleNewData().
|
private |
Handle complex data from get command.
References absf(), freePoly, freePolyCnt, freePolyNewest, USmlTagIn::getAttValue(), USmlTag::getNextTag(), UPolygon::getPointsCnt(), UProbPoly::getPoseTime(), USmlTag::getProbPoly(), USmlTagIn::getTagName(), gotNewFreePolyData(), USmlTagIn::isAStartTag(), USmlTagIn::isTagA(), USmlTagIn::isTagAnEnd(), MAX_FREE_POLY_HIST, pathsCnt, UProbPoly::setValid(), USmlTag::skipToEndTag(), and UClientFuncBase::verboseMessages.
Referenced by handleNewData().
|
private |
Decode laser scan parameters
References ULaserDataSet::addPassableInterval(), UPose::clear(), ULaserDataSet::clear(), ULaserDataSet::getData(), USmlTag::getNBytes(), ULaserDataHistory::getNewScan(), USmlTagIn::getNextAttribute(), USmlTag::getNextTag(), USmlTag::getPose(), USmlTag::getPosition(), USmlTag::getRotation(), ULaserDataSet::getSensorPose(), USmlTagIn::getTagName(), gotNewData(), UPose::h, HEX, hex2int(), USmlTagIn::isAStartTag(), USmlTagIn::isTagA(), USmlTagIn::isTagAnEnd(), laserPose, MAX_SML_NAME_LENGTH, mini(), poseHist, poseHistCnt, poseHistNewest, scan, scanHist, ULaserDataSet::setData(), ULaserData::setFromTag(), ULaserPi::setFromTag(), UPosRot::setPos(), ULaserDataSet::setPose(), setPoseIfNewer(), UPosRot::setRot(), UTime::setTime(), ULaserData::setValue(), USmlTag::skipToEndTag(), str2bool(), UPose::x, and UPose::y.
Referenced by handleNewData().
|
virtual |
Got fresh data destined to this function.
Reimplemented from UClientFuncBase.
References USmlTagIn::getNextAttribute(), gotNewData(), handleEkf(), handleGetComplexData(), handleLaserScan(), handleOdo(), handlePath(), handlePlan(), handleVarData(), handleWpc(), handleWpf(), USmlTagIn::isAStartTag(), USmlTagIn::isTagA(), MAX_SML_NAME_LENGTH, odoPose, planner, USmlTagIn::print(), UClientFuncBase::printReply(), USmlTagIn::reset(), UPlannerData::setVarFromTag(), and UClientFuncBase::verboseMessages.
|
private |
Handle Odometry controller data
References USmlTagIn::getNextAttribute(), USmlTag::getNextTag(), USmlTagIn::getTagName(), UPose::h, HEX, USmlTagIn::isAStartTag(), USmlTagIn::isTagA(), USmlTagIn::isTagAnEnd(), MAX_POSE_HIST, MAX_SML_NAME_LENGTH, odoPose, poseHist, poseHistCnt, USmlTagIn::print(), UTime::setTime(), UPoseTime::t, UPose::x, and UPose::y.
Referenced by handleNewData().
|
private |
Handle a group of detected path options
References UTime::clear(), USmlTagIn::getAttValue(), ULaserPathResult::getManSeq(), USmlTagIn::getNextAttribute(), USmlTag::getNextTag(), UTime::getSec(), UManSeq::getStartPoseV(), USmlTagIn::getTagName(), gotNewData(), UPose::h, USmlTagIn::isAStartTag(), USmlTagIn::isTagA(), USmlTagIn::isTagAnEnd(), MAX_NEW_PATH_CANDIDATES, MAX_SML_NAME_LENGTH, odoPose, paths, pathsCnt, ULaserPathResult::setFromTag(), setPose(), UPoseTime::setPt(), UTime::setTimeTod(), UPoseTime::t, UClientFuncBase::verboseMessages, UPose::x, and UPose::y.
Referenced by handleNewData().
|
private |
Handle Planner message
References UPlannerStopCrit::active, UPlannerData::cmdFile, UPlannerData::cmdLine, UPlannerData::cmdLineLast, UPlannerData::cmdLineNum, UPlannerData::cmdLineOverride, UPlannerData::cmdStoppedBy, USmlTagIn::getNextAttribute(), USmlTag::getNextTag(), USmlTagIn::getTagName(), gotNewPlanData(), HEX, USmlTagIn::isAStartTag(), UPlannerData::isIdle, USmlTagIn::isTagA(), USmlTagIn::isTagAnEnd(), MAX_FILENAME_SIZE, MAX_PLANNER_LINE_SIZE, MAX_PLANNER_STOP_CRIT_SIZE, MAX_SML_NAME_LENGTH, MAX_STOP_CRIT_COUNT, MAX_STOP_CRIT_STATUS_LENGTH, UPlannerStopCrit::name, planner, USmlTagIn::print(), UPlannerData::running, UPlannerData::simSubDir, UPlannerData::simulated, UPlannerStopCrit::status, UPlannerData::stopCrit, UPlannerData::stopCritCnt, and str2bool().
Referenced by handleNewData().
|
private |
Handle data as variables
References USmlTagIn::getAttValue(), USmlTag::getNextTag(), USmlTagIn::getTagName(), gotNewData(), USmlTagIn::isAStartTag(), USmlTagIn::isTagA(), USmlTagIn::isTagAnEnd(), odoPose, pathsCnt, planner, UPlannerData::setVarFromTag(), USmlTag::skipToEndTag(), and UClientFuncBase::verboseMessages.
Referenced by handleNewData().
|
private |
Handle Waypoint Controller data
References USmlTagIn::getNextAttribute(), USmlTag::getNextTag(), USmlTagIn::getTagName(), HEX, USmlTagIn::isAStartTag(), USmlTagIn::isTagA(), USmlTagIn::isTagAnEnd(), MAX_SML_NAME_LENGTH, MAX_WP_POSITIONS, ULaserWpc::motorLeft, ULaserWpc::motorRight, USmlTagIn::print(), ULaserWpc::speedAdvice, ULaserWpc::speedCurrent, ULaserWpc::speedPlanned, str2bool(), wpcData, ULaserWpc::wpPos, ULaserWpc::wpPosCnt, UPosition::x, and UPosition::y.
Referenced by handleNewData().
|
private |
Handle Waypoint Finder data
References USmlTagIn::getNextAttribute(), UPose::h, HEX, USmlTagIn::isAStartTag(), laserPose, MAX_SML_NAME_LENGTH, odoPose, UPosRot::setX(), UPosRot::setY(), UPosRot::setZ(), toPose, UPose::x, and UPose::y.
Referenced by handleNewData().
|
virtual |
Name of function The returned name is intended as informative to clients and should include a version number
Reimplemented from UClientFuncBase.
Referenced by UClientFuncLaserGui::setScale().
|
protected |
Set pose and pose history
References MAX_POSE_HIST, odoPose, poseHist, poseHistCnt, and poseHistNewest.
Referenced by handlePath(), UClientFuncLaserGui::onEvent(), and setPoseIfNewer().
Add this to pose history if the time is newer than the newest
References poseHist, poseHistCnt, poseHistNewest, and setPose().
Referenced by handleLaserScan().
|
protected |
Goal position at current position in mission file
|
protected |
Estimated position by EKF
Referenced by handleEkf(), and UClientFuncLaserGui::paintEkfData().
|
protected |
Update time by ekf
Referenced by handleEkf(), and UClientFuncLaserGui::paintEkfData().
|
protected |
EKF updates skipped
Referenced by handleEkf(), UClientFuncLaserGui::paintEkfData(), and UClientFuncLaser().
|
protected |
EKF updates skipped
Referenced by handleEkf(), UClientFuncLaserGui::paintEkfData(), and UClientFuncLaser().
|
protected |
Free area from vision
Referenced by UClientFuncLaserGui::doImage(), UClientFuncLaserGui::doRepaint(), and handleGetComplexData().
|
protected |
Used free poly hist entries
Referenced by UClientFuncLaserGui::doRepaint(), handleGetComplexData(), and UClientFuncLaser().
|
protected |
Newest free polygon
Referenced by UClientFuncLaserGui::doImage(), UClientFuncLaserGui::doRepaint(), handleGetComplexData(), and UClientFuncLaser().
|
protected |
Position of laser scanner on robot
Referenced by UClientFuncLaserGui::doRepaint(), handleLaserScan(), handleWpf(), UClientFuncLaserGui::paintRobotMmr(), and UClientFuncLaserGui::paintRobotSmr().
|
protected |
Corrent robot pose
Referenced by UClientFuncLaserGui::doImage(), UClientFuncLaserGui::doRepaint(), handleNewData(), handleOdo(), handlePath(), handleVarData(), handleWpf(), UClientFuncLaserGui::onEvent(), UClientFuncLaserGui::paintOdoData(), UClientFuncLaserGui::paintOdoGrid(), UClientFuncLaserGui::paintPathData(), UClientFuncLaserGui::paintWpListData(), and setPose().
|
protected |
Detected path data wihin the laser-scans in front of the robot
Referenced by UClientFuncLaserGui::doImage(), UClientFuncLaserGui::doRepaint(), gotNewPathData(), handlePath(), UClientFuncLaser(), and ~UClientFuncLaser().
|
protected |
Count of valid detected paths
Referenced by UClientFuncLaserGui::doImage(), UClientFuncLaserGui::doRepaint(), gotNewPathData(), handleGetComplexData(), handlePath(), handleVarData(), and UClientFuncLaser().
|
protected |
Planner data
Referenced by handleNewData(), handlePlan(), handleVarData(), UClientFuncLaserGui::paintOdoDest(), UClientFuncLaserGui::paintPlannerData(), and UClientFuncLaserGui::paintWpc().
|
protected |
Odometry pose history
Referenced by handleLaserScan(), handleOdo(), UClientFuncLaserGui::paintOdoData(), setPose(), and setPoseIfNewer().
|
protected |
Time of pose history Number of pose history entries
Referenced by UClientFuncLaserGui::clear(), handleLaserScan(), handleOdo(), UClientFuncLaserGui::paintOdoData(), setPose(), setPoseIfNewer(), and UClientFuncLaser().
|
protected |
Newest pose history index
Referenced by handleLaserScan(), UClientFuncLaserGui::paintOdoData(), setPose(), and setPoseIfNewer().
|
protected |
Data buffer for received data
Referenced by UClientFuncLaserGui::clear(), UClientFuncLaserGui::doImage(), UClientFuncLaserGui::doRepaint(), getLaserTime(), handleLaserScan(), UClientFuncLaserGui::paintNewestScan(), UClientFuncLaserGui::paintOdoData(), and UClientFuncLaserGui::saveImage().
|
protected |
Goal position for robot
Referenced by handleWpf().
|
protected |
Waypoint controller data
Referenced by UClientFuncLaserGui::doRepaint(), handleWpc(), UClientFuncLaserGui::paintPlannerData(), and UClientFuncLaserGui::paintWpListData().