20 #include <boost/geometry.hpp>
21 #include <boost/geometry/geometries/point.hpp>
22 #include <boost/geometry/geometries/box.hpp>
23 #include <boost/geometry/index/rtree.hpp>
24 #include <unordered_map>
44 template<
typename T1,
typename T2>
55 template<
typename value_type,
typename Tfirst>
61 return boost::geometry::equals<Tfirst,Tfirst>(v1.first, v2.first);
69 boost::geometry::index::quadratic<16>,
70 boost::geometry::index::indexable<idxCoordinate2heading>,
137 bool returnValue =
true;
195 boost::geometry::model::box<env::BorderBased::Coordinate::boost_point>(
209 boost::geometry::model::box<env::BorderBased::Coordinate::boost_point>(
220 std::vector<adore::env::BorderBased::Coordinate::boost_point> parkingSpotsToRemove;
223 parkingSpotsToRemove.push_back(
itpair.
first->first);
225 for(
auto it = parkingSpotsToRemove.begin(); it!=parkingSpotsToRemove.end();it++)
247 std::vector<ParkingSpot> returnValue;
248 for(
auto it = itPair.
current(); it!=itPair.
end(); it++)
Definition: parkingspotset.h:39
void clear()
Definition: parkingspotset.h:172
double m_guard
Definition: parkingspotset.h:81
void removeParkingSpotsOutsideRegion(double x0, double x1, double y0, double y1)
Definition: parkingspotset.h:218
boost::geometry::index::rtree< idxCoordinate2heading, boost::geometry::index::quadratic< 16 >, boost::geometry::index::indexable< idxCoordinate2heading >, my_equal< idxCoordinate2heading, env::BorderBased::Coordinate::boost_point > > Coordinate2heading_RT
Definition: parkingspotset.h:72
itpair< Coordinate2heading_RT::const_query_iterator, Coordinate2heading_RT::const_query_iterator > ItPairCoordinate2heading
Definition: parkingspotset.h:74
bool insertParkingSpot(ParkingSpot parkingSpot)
Definition: parkingspotset.h:135
ItPairCoordinate2heading getParkingSpotsOutsideRegion(double x0, double x1, double y0, double y1)
Definition: parkingspotset.h:206
bool eraseParkingSpot(ParkingSpot parkingSpot)
Definition: parkingspotset.h:157
Coordinate2heading_RT m_coordinate2heading
Definition: parkingspotset.h:78
ParkingSpotSet()
Definition: parkingspotset.h:116
bool eraseParkingSpot(adore::env::BorderBased::Coordinate::boost_point bp)
Definition: parkingspotset.h:98
std::vector< ParkingSpot > itPair2ParkingSpotVector(ItPairCoordinate2heading itPair)
Definition: parkingspotset.h:245
ItPairCoordinate2heading getParkingSpotsInRegion(double x0, double x1, double y0, double y1)
Definition: parkingspotset.h:192
bool eraseParkingSpot(adore::env::BorderBased::Coordinate coordinate)
Definition: parkingspotset.h:162
virtual ~ParkingSpotSet()
Definition: parkingspotset.h:125
bool hasParkingSpot(adore::env::BorderBased::Coordinate::boost_point bp)
Definition: parkingspotset.h:84
std::pair< adore::env::BorderBased::Coordinate::boost_point, double > idxCoordinate2heading
Definition: parkingspotset.h:66
ItPairCoordinate2heading getAllParkingSpots()
Definition: parkingspotset.h:181
bool hasParkingSpot(ParkingSpot parkingSpot)
Definition: parkingspotset.h:236
This class definition is to represent parking spots.
Definition: parkingspot.h:31
double getHeading() const
Get the heading of the parking spot.
Definition: parkingspot.h:61
BorderBased::Coordinate getCoordinate() const
Get the Coordinate object.
Definition: parkingspot.h:70
x0
Definition: adore_set_goal.py:25
y0
Definition: adore_set_goal.py:26
y1
Definition: adore_set_pose.py:29
x1
Definition: adore_set_pose.py:28
Definition: areaofeffectconverter.h:20
This struct represents 3-dimensional coordines.
Definition: coordinate.h:34
boost::geometry::model::point< double, 3, boost::geometry::cs::cartesian > boost_point
Definition: coordinate.h:36
boost_point getBoostPoint()
Get a boost_point that has the same coordinates as the Coordinate object.
Definition: coordinate.h:202
Definition: parkingspotset.h:46
T1 first
Definition: parkingspotset.h:47
T2 & end()
Definition: parkingspotset.h:51
T2 second
Definition: parkingspotset.h:48
T1 & current()
Definition: parkingspotset.h:50
itpair(T1 first, T2 second)
Definition: parkingspotset.h:49
Definition: parkingspotset.h:57
result_type operator()(value_type const &v1, value_type const &v2) const
Definition: parkingspotset.h:59
bool result_type
Definition: parkingspotset.h:58