AURobotServers
4
|
#include <umanoeuvre.h>
Public Types | |
enum | MAN_TYPE { MAN_NONE, MAN_LINE, MAN_ARC, MAN_STOP } |
Public Member Functions | |
virtual void | fprint (FILE *fd, const char *prestr, double *v=NULL) |
double | getAcc () |
virtual double | getDistance () |
virtual double | getDistanceXYSigned (UPosition, int *, bool, bool, UPose *, double *) |
virtual UPose | getEndPose () |
virtual UPoseV | getEndPoseV (UPoseV startPoseV) |
virtual double | getEndV (UPoseV startPoseV) |
virtual double | getEndV (double startV) |
virtual bool | getFoodprintPolygon (UPolygon *, UPolygon *, double, double, double, double, double, UPose *, double) |
virtual double | getManTime (double startVel) |
int | getManType () |
virtual double | getMinDistanceXYSigned (ULineSegment *, int *, UPosition *, bool, int *, UPose *) |
virtual UPoseV | getPoseV (double atManTime, UPoseV startPoseV, double endV) |
virtual bool | getSMRCLcmd (char *, int) |
virtual bool | getSMRCLcmd2 (char *, int, UPoseV *, bool *, double, int *, int, double *, double, UTime *, FILE *) |
double | getVel () |
virtual const char * | print (const char *, double *, char *buff, const int) |
void | setAcc (double value) |
void | setVel (double value) |
UManoeuvre () | |
virtual | ~UManoeuvre () |
Static Public Member Functions | |
static double | getMinAcc () |
Protected Attributes | |
double | acc |
MAN_TYPE | manType |
double | vel |
Base classe for a series of basic manoeuvres
enum UManoeuvre::MAN_TYPE |
|
virtual |
destructor
|
virtual |
Print status info with this lead string
Reimplemented in UManArc, and UManLine.
Referenced by getManType().
|
inline |
Get acceleration during manoeuvre
References acc.
Referenced by USmlTag::codeManoeuvre(), and UManSeq::copy().
|
inlinevirtual |
Get distance traveled
Reimplemented in UManArc, and UManLine.
Referenced by USmlTag::codeManoeuvre(), UManSeq::copy(), UAvoidPath2::getClosestObst2(), UManPPSeq::getDistanceXYSigned(), getEndV(), UAvoidPath2::getManAsPolygon(), getManTime(), and UManPPSeq::truncate().
|
inlinevirtual |
Get distance to this position from the manoeuvre line Positive is to the right of segment - seen from first end in direction towards other end if 'posIsRight' is true. Returnes distance to either end or to a point on line whatever is closest. If 'where' is not NULL, then the closest part is returned here as: 0=point on line, 1= first point, 2= other end. Distance to ends are not calculated if 'centerOnly' is true. The closest position on route is returned in 'pHit' if closest on line.
Reimplemented in UManArc, and UManLine.
Referenced by UManPPSeq::getDistanceXYSigned().
|
virtual |
Get relative pose at end of manoeuvre
Reimplemented in UManArc, and UManLine.
Referenced by UManPPSeq::getDistanceXYSigned(), and UManPPSeq::getMinDistanceXYSigned().
Get end pose from this start pose
Reimplemented in UManArc, and UManLine.
Referenced by UManPPSeq::calcEndPose(), UAvoidPath2::getClosestObst2(), UAvoidPath2::getManAsPolygon(), UPaintManoeuvre::makeManCloud(), UNavPaint::paintManData(), and UClientFuncLaserGui::paintPathData().
|
virtual |
Get velocity at end of manoeuvre
Reimplemented in UManStop.
References UPoseV::getVel().
Referenced by UManLine::fprint(), UManArc::fprint(), UManLine::getEndPoseV(), UManLine::print(), UManArc::print(), and testMan().
|
virtual |
|
inlinevirtual |
Get this manoeuvre as a polygin covering the robot foodprint during the manoeuvre.
polyIncl | is a polygon (convex) with sufficient corners for the manoeuvre. |
polyExcl | is a polygon (convex) covering the concavity of the polyIncl that is not part of the manoeuvre footprint. |
leftX | is the forward distance of the front-left-most extreme point of the robot (positive). |
leftY | is the x-coordinate of the position of the front-left-most extreme point of the robot (should be positive). |
rightX | is the forward distance of the front-right-most extreme point of the robot (positive). |
rightY | is the y-coordinate of the position of the front-right-most extreme point of the robot (should be negative). |
clearence | is the minimum clearence around extreme points. |
startPose | is the start pose of the manoeuvre, indicating the coordinate system used. |
allowedErr | is the allowed deviation from true polygon in meters (must be > 0.0). |
Reimplemented in UManArc, and UManLine.
Referenced by UAvoidPath2::getClosestObst2().
|
virtual |
Time to complete manoeuver. Should be overwritten by a real manoeuvere.
Reimplemented in UManStop.
References absd(), acc, getDistance(), sqr(), and vel.
Referenced by UManPPSeq::calcEndVel(), UManLine::fprint(), UManArc::fprint(), UManPPSeq::getPoseV(), UManLine::print(), UManArc::print(), and testMan().
|
inline |
Get manoeuvre type: 0 = base - i.e. not valid manoeuvre. 1 = line - straight in current direction 2 = arc - a turn manoeuvre with constant radius and arc length 3 = stop - stop all movement
References fprint(), and manType.
Referenced by USmlTag::codeManoeuvre(), UManSeq::copy(), UAvoidPath2::getManAsPolygon(), UManPPSeq::getMaxTurnArc(), UPaintManoeuvre::makeManCloud(), UNavPaint::paintManData(), UClientFuncLaserGui::paintPathData(), UManSeq::removeLastArc(), and UManPPSeq::truncate().
|
inlinestatic |
Minimum acceleration transferred to SMR, to avoid unwanted situations with no speed and too little acceleration
Referenced by UManLine::getSMRCLcmd(), and UManArc::getSMRCLcmd().
|
inlinevirtual |
Get shortest distance to this line segment 'seg'. If 'posIsRight', then the distance is positive to the right of the route. The closest point on the segnment is returned in 'posOnSeg'. If the closest point on the segment streach, then whereOnSeg = 0, if the ref end of segment, then whereOnSeg = 1, other end is 2. the closest point in the route is returned in 'poseOnSeg'. If the closest point on the manoeuvre is between endpoints, then whereOnMan = 0, if the first end of manoeuvre, then whereOnMan = 1, last end is 2.
Reimplemented in UManArc, and UManLine.
Referenced by UManPPSeq::getMinDistanceXYSigned().
|
inlinevirtual |
Code this manoeuvre into a SMRCL command string. Returns false if buffer is too short or command is not codeable.
Reimplemented in UManStop, and UManLine.
Referenced by UManStop::getManTime(), and UManStop::getSMRCLcmd2().
|
inlinevirtual |
Code this manoeuvre into a SMRCL command string. Return in short form, so that no ore than 'lineCntMax' lines are coded, and no more than 'distSumMax' are covered. if *first is true, then (distSum + distabce of this manoeuvre) must be longet than 'firstDistance'. This is to avoid a target position behind the robot. If manoeuvre is used *first is set to false, if not then there is no command in 'buf'. Returns new start position for next manoeuvre in 'startPose', and as well as new 'lineCnt' and distance travelled in 'distSum'.
t | is optional current pose time for logging of manoeuvre primitives |
logprim | is the file handle to log to - format time, type (2 or 3) posev, posev false if buffer is too short or command is not codeable. |
Reimplemented in UManArc, and UManLine.
Referenced by UManStop::getManTime(), and UResSmrCtl::sendNewManoeuvreToSMR().
|
inline |
Get drive vel at end of manoeuvre
References vel.
Referenced by USmlTag::codeManoeuvre(), and UManSeq::copy().
|
inlinevirtual |
Print status info to string with this lead string
Reimplemented in UManArc, and UManLine.
Referenced by UManStop::getManTime(), and UManPPSeq::print().
|
inline |
Get acceleration during manoeuvre
References acc.
Referenced by UManSeq::getNewArc(), UManSeq::getNewLine(), UManSeq::getNewStop(), and testMan().
|
inline |
Set drive vel at end of manoeuvre
References vel.
Referenced by UManSeq::getNewArc(), UManSeq::getNewLine(), UManSeq::getNewStop(), and testMan().
|
protected |
Acceleration enforced during manoeuver
Referenced by UManLine::fprint(), UManArc::fprint(), getAcc(), getEndV(), getManTime(), UManArc::getPoseV(), UManLine::getPoseV(), UManLine::getSMRCLcmd(), UManArc::getSMRCLcmd(), UManLine::getSMRCLcmd2(), UManArc::getSMRCLcmd2(), UManLine::print(), UManArc::print(), setAcc(), and UManoeuvre().
|
protected |
Manoeuvre type: 0 = MAN_NONE = base - i.e. not valid manoeuvre. 1 = MAN_LINE = line - straight in current direction 2 = MAN_ARC = arc - a turn manoeuvre with constant radius and arc length 3 = MAN_STOP = stop all movement
Referenced by getManType(), UManArc::UManArc(), UManLine::UManLine(), UManoeuvre(), and UManStop::UManStop().
|
protected |
End velocity after the manoeuvre. negative is reverse.
Referenced by UManLine::fprint(), UManArc::fprint(), UManArc::getEndPose(), UManArc::getEndPoseV(), getEndV(), getManTime(), UManLine::getSMRCLcmd(), UManArc::getSMRCLcmd(), UManLine::getSMRCLcmd2(), UManArc::getSMRCLcmd2(), getVel(), UManLine::print(), UManArc::print(), setVel(), and UManoeuvre().