|
| OurRobot (int shell, Context *const context) |
| Construct a new OurRobot. More...
|
|
void | addStatusText () |
|
void | addText (const QString &text, const QColor &color=Qt::white, const QString &layerPrefix="RobotText") |
|
bool | charged () const |
| true if the kicker is ready
|
|
float | kickTimer () const |
| returns the time since the kicker was last charged, 0.0 if ready
|
|
const Geometry2d::Segment | kickerBar () const |
| segment for the location of the kicker
|
|
Geometry2d::Point | pointInRobotSpace (Geometry2d::Point pt) const |
| converts a point to the frame of reference of robot
|
|
bool | behindBall (Geometry2d::Point ballPos) const |
| returns true if the position specified is behind the robot
|
|
std::optional< Eigen::Quaternionf > | quaternion () const |
|
const RobotConstraints & | robotConstraints () const |
|
RobotConstraints & | robotConstraints () |
|
const MotionConstraints & | motionConstraints () const |
|
MotionConstraints & | motionConstraints () |
|
const Planning::RotationCommand & | rotationCommand () const |
|
const Planning::Path & | path () |
| Returns a const reference to the path of the robot.
|
|
void | resetForNextIteration () |
| clears old radioTx stuff, resets robot debug text, and clears local obstacles
|
|
void | resetMotionConstraints () |
| clears all fields in the robot's MotionConstraints object, causing the robot to stop
|
|
void | stop () |
| Stop the robot.
|
|
void | lineKick (Geometry2d::Point target) |
| Makes this robot execute a lineKick. More...
|
|
void | intercept (Geometry2d::Point target) |
| Intercept the ball as quickly as possible May just slam into the ball if it does not have time to stop. More...
|
|
void | move (Geometry2d::Point goal, Geometry2d::Point endVelocity=Geometry2d::Point()) |
| Move to a given point using the default RRT planner. More...
|
|
void | moveDirect (Geometry2d::Point goal, float endSpeed=0) |
| Move to a given point bypassing the RRT Path planner. More...
|
|
void | moveTuning (Geometry2d::Point goal, float endSpeed=0) |
| Move to a given point while breaking everything. More...
|
|
void | settle (std::optional< Geometry2d::Point > target) |
| Move in front of the ball to intercept it. More...
|
|
void | collect () |
| Approaches the ball and moves through it slowly.
|
|
void | worldVelocity (Geometry2d::Point targetWorldVel) |
| Sets the worldVelocity in the robot's MotionConstraints.
|
|
void | face (Geometry2d::Point pt) |
| Face a point while remaining in place.
|
|
bool | isFacing () |
| Returns true if the robot currently has a face command.
|
|
void | faceNone () |
| Remove the facing command.
|
|
void | pivot (Geometry2d::Point pivotTarget) |
| The robot pivots around it's mouth toward the given target.
|
|
void | dribble (uint8_t speed) |
|
void | kick (float strength) |
| KICKING/CHIPPING. More...
|
|
void | kickLevel (uint8_t strength) |
| enable kick when ready at a given strength (0-255)
|
|
void | chip (float strength) |
| enable chip when ready at a given percentage of the currently set max chip power. More...
|
|
void | chipLevel (uint8_t strength) |
| enable chip when ready at a given strength (0-255)
|
|
void | unkick () |
| Undoes any calls to kick() or chip().
|
|
RJ::Timestamp | lastKickTime () const |
|
bool | justKicked () |
| checks if the bot has kicked/chipped very recently.
|
|
std::string | getCmdText () const |
| Gets a string representing the series of commands called on the robot this iteration. More...
|
|
void | kickImmediately () |
| ignore ball sense and kick immediately
|
|
bool | avoidOpponents () const |
|
void | avoidOpponents (bool enable) |
|
void | disableAvoidBall () |
|
void | avoidBallRadius (float radius) |
|
float | avoidBallRadius () const |
|
void | resetAvoidBall () |
|
void | resetAvoidRobotRadii () |
|
void | localObstacles (const std::shared_ptr< Geometry2d::Shape > &obs) |
| Adds an obstacle to the local set of obstacles for avoidance Cleared after every frame.
|
|
const Geometry2d::ShapeSet & | localObstacles () const |
|
void | clearLocalObstacles () |
|
std::vector< Planning::DynamicObstacle > | collectDynamicObstacles () |
|
Geometry2d::ShapeSet | collectStaticObstacles (const Geometry2d::ShapeSet &globalObstacles, bool localObstacles=true) |
|
Geometry2d::ShapeSet | collectAllObstacles (const Geometry2d::ShapeSet &globalObstacles) |
|
void | approachAllOpponents (bool enable=true) |
|
void | avoidAllOpponents (bool enable=true) |
|
bool | avoidOpponent (unsigned shell_id) const |
| checks if opponents are avoided at all
|
|
bool | approachOpponent (unsigned shell_id) const |
|
float | avoidOpponentRadius (unsigned shell_id) const |
| returns the avoidance radius
|
|
void | avoidAllOpponentRadius (float radius) |
| returns the avoidance radius
|
|
void | avoidOpponent (unsigned shell_id, bool enable_avoid) |
| enable/disable for opponent avoidance
|
|
void | approachOpponent (unsigned shell_id, bool enable_approach) |
| enable/disable approach of opponents - diable uses larger avoidance radius
|
|
void | avoidOpponentRadius (unsigned shell_id, float radius) |
|
Geometry2d::Point | mouthCenterPos () const |
|
bool | chipper_available () const |
| status evaluations for choosing robots in behaviors - combines multiple checks
|
|
bool | kicker_available () const |
|
bool | dribbler_available () const |
|
bool | driving_available (bool require_all=true) const |
|
bool | hasBall () const |
|
bool | hasBallRaw () const |
|
bool | ballSenseWorks () const |
|
bool | kickerWorks () const |
|
float | kickerVoltage () const |
|
Packet::HardwareVersion | hardwareVersion () const |
|
void | setRadioRx (Packet::RadioRx packet) |
|
Packet::RadioRx | radioRx () const |
|
const std::unique_ptr< Planning::MotionCommand > & | motionCommand () const |
|
const RotationConstraints & | rotationConstraints () const |
|
RotationConstraints & | rotationConstraints () |
|
MotionControl * | motionControl () const |
|
SystemState * | state () const |
|
bool | rxIsFresh (RJ::Seconds age=RJ::Seconds(0.5)) const |
|
void | sing (Packet::Control::Song song=Packet::Control::FIGHT_SONG) |
| start the robot playing a song More...
|
|
double | distanceToChipLanding (int chipPower) |
|
uint8_t | chipPowerForDistance (double distance) |
|
void | setPath (std::unique_ptr< Planning::Path > path) |
|
void | setPlanningPriority (int8_t priority) |
| Sets the priority which paths are planned. More...
|
|
int8_t | getPlanningPriority () |
| Gets the priority which paths are planned. More...
|
|
void | setPID (double p, double i, double d) |
|
| Robot (unsigned int shell, bool self) |
|
unsigned int | shell () const |
| ID number for the robot. More...
|
|
bool | self () const |
| Check whether or not this robot is on our team.
|
|
bool | operator== (const Robot &other) |
|
std::string | toString () const |
|
A robot on our team.
This extends Robot and provides methods for interacting with our robots. A few things this class is responsible for:
- specifying target position, velocity, angle, etc
- kicking and chipping the ball
- keeping track of which hardware revision this bot is
- avoidance of the ball and other robots (this info is fed to the path planner)
- playing the GT fight song