#include <pass.h>
|
| static Pass | fromPassArray (Point passer_point, const std::array< double, NUM_PARAMS_TO_OPTIMIZE > &pass_array, double pass_speed_m_per_s) |
| |
| static Pass | fromDestReceiveSpeed (const Point &ball_position, const Point &pass_destination, double dest_speed_m_per_s, double min_pass_speed_m_per_s, double max_pass_speed_m_per_s) |
| |
| static Pass | fromDestReceiveSpeed (const Point &ball_position, const Point &pass_destination, const TbotsProto::PassingConfig &passing_config) |
| |
| static double | getPassSpeed (const Point &ball_position, const Point &pass_destination, double receive_speed_m_per_s, double min_pass_speed_m_per_s, double max_pass_speed_m_per_s) |
| |
|
| std::ostream & | operator<< (std::ostream &output_stream, const Pass &pass) |
| |
This class represents a Pass, a receive point with a speed
◆ Pass()
| Pass |
( |
Point |
passer_point, |
|
|
Point |
receiver_point, |
|
|
double |
pass_speed_m_per_s |
|
) |
| |
Create a pass with given parameters
- Parameters
-
| passer_point | The point the pass should start at |
| receiver_point | The point the receiver should be at to receive the pass |
| pass_speed_m_per_s | The speed of the pass, in meters/second |
◆ estimatePassDuration()
Estimate how long the pass will take, from kicking to receiving
This estimate does not account for friction on the ball
- Returns
- An estimate of how long the pass will take, from kicking to receiving
◆ fromDestReceiveSpeed() [1/2]
| Pass fromDestReceiveSpeed |
( |
const Point & |
ball_position, |
|
|
const Point & |
pass_destination, |
|
|
const TbotsProto::PassingConfig & |
passing_config |
|
) |
| |
|
static |
Creates a pass from the given destination point and receive speed
- Parameters
-
| ball_position | the current position of the ball (pass starting point) |
| pass_destination | the end point of the pass |
| passing_config | the speed we want the pass to be received at |
- Returns
- the Pass constructed from the start and end points, received at the intended speed clamped by the min and max pass speeds
◆ fromDestReceiveSpeed() [2/2]
| Pass fromDestReceiveSpeed |
( |
const Point & |
ball_position, |
|
|
const Point & |
pass_destination, |
|
|
double |
dest_speed_m_per_s, |
|
|
double |
min_pass_speed_m_per_s, |
|
|
double |
max_pass_speed_m_per_s |
|
) |
| |
|
static |
Creates a pass from the given destination point and receive speed
- Parameters
-
| ball_position | the current position of the ball (pass starting point) |
| pass_destination | the end point of the pass |
| dest_speed_m_per_s | the speed we want the pass to be received at |
| min_pass_speed_m_per_s | the minimum speed a pass should be taken at |
| max_pass_speed_m_per_s | the maximum speed a pass should be taken at |
- Returns
- the Pass constructed from the start and end points, received at the intended speed clamped by the min and max pass speeds
◆ fromPassArray()
| Pass fromPassArray |
( |
Point |
passer_point, |
|
|
const std::array< double, NUM_PARAMS_TO_OPTIMIZE > & |
pass_array, |
|
|
double |
pass_speed_m_per_s |
|
) |
| |
|
static |
Create a pass from the given pass array
- Parameters
-
| passer_point | The location of the passer location |
| pass_array | [receiver_point.x(), receiver_point.y()] |
| pass_speed_m_per_s | the speed of the pass in m/s |
- Returns
- The Pass constructed from the pass array
◆ getPassSpeed()
| double getPassSpeed |
( |
const Point & |
ball_position, |
|
|
const Point & |
pass_destination, |
|
|
double |
receive_speed_m_per_s, |
|
|
double |
min_pass_speed_m_per_s, |
|
|
double |
max_pass_speed_m_per_s |
|
) |
| |
|
static |
Determines the speed at which a pass should be executed Such that it reaches its destination at the given destination speed Takes into account friction Clamps the speed to the given mix and max speed values
- Parameters
-
| ball_position | the current ball position (starting point of the pass) |
| pass_destination | the destination of the pass |
| receive_speed_m_per_s | the speed we want the pass to be received at |
| min_pass_speed_m_per_s | the minimum speed a pass should be taken at |
| max_pass_speed_m_per_s | the maximum speed a pass should be taken at |
- Returns
- the speed the pass should start with
◆ operator==()
| bool operator== |
( |
const Pass & |
other | ) |
const |
Compares Passes for equality. Passes are considered equal if all their member variables are equal.
- Parameters
-
| other | the Pass to compare with for equality |
- Returns
- true if the Passes are equal and false otherwise
◆ passerOrientation()
| Angle passerOrientation |
( |
| ) |
const |
Given the ball position, returns the angle the passer should be facing to pass.
- Returns
- The angle the passer should be facing
◆ passerPoint()
| Point passerPoint |
( |
| ) |
const |
Gets the value of the passer point
- Returns
- The value of the passer point
◆ receiverOrientation()
| Angle receiverOrientation |
( |
| ) |
const |
Given the ball position, returns the angle the receiver should be facing to receive the pass.
- Returns
- The angle the receiver should be facing
◆ receiverPoint()
| Point receiverPoint |
( |
| ) |
const |
Gets the value of the receiver point
- Returns
- The value of the receiver point
◆ speed()
Gets the value of the pass speed
- Returns
- The value of the pass speed, in meters/second
◆ toPassArray()
| std::array< double, NUM_PARAMS_TO_OPTIMIZE > toPassArray |
( |
| ) |
const |
Converts a pass to an array
- Returns
- the pass array: [receiver_point.x(), receiver_point.y()]
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & |
output_stream, |
|
|
const Pass & |
pass |
|
) |
| |
|
friend |
Implement the "<<" operator for printing
- Parameters
-
| output_stream | The stream to print to |
| pass | The pass to print |
- Returns
- The output stream with the string representation of the class appended
The documentation for this class was generated from the following files:
- src/software/ai/passing/pass.h
- src/software/ai/passing/pass.cpp