|
Thunderbots Project
|
#include <receiver_position_generator.hpp>
Public Member Functions | |
| ReceiverPositionGenerator (std::shared_ptr< const FieldPitchDivision< ZoneEnum > > pitch_division, TbotsProto::PassingConfig passing_config) | |
| std::vector< Point > | getBestReceivingPositions (const World &world, unsigned int num_positions, const std::vector< Point > &existing_receiver_positions={}, const std::optional< Point > &pass_origin_override=std::nullopt) |
This class is responsible for generating the best positions for our pass receivers to go to
|
explicit |
Creates a new ReceiverPositionGenerator
| pitch_division | The pitch division to split the receivers into |
| passing_config | The passing configuration to use when looking for best receiving positions |
| std::vector< Point > getBestReceivingPositions | ( | const World & | world, |
| unsigned int | num_positions, | ||
| const std::vector< Point > & | existing_receiver_positions = {}, |
||
| const std::optional< Point > & | pass_origin_override = std::nullopt |
||
| ) |
Generates the best receiving positions for the friendly robots to go to
| world | The world to generate the best receiving positions based on |
| num_positions | The number of receiving positions to generate |
| existing_receiver_positions | A set of existing receiver positions that will be avoided, if possible, when generating the new receiver positions. |
| pass_origin_override | An optional override for the position where the pass will be made from. If not provided, the ball position will be used. This could be helpful if you are trying to position the receivers based on the ball's future position. |