1 #ifndef MAP_DATA_LAYER_HPP_SIMULATION
2 #define MAP_DATA_LAYER_HPP_SIMULATION
5 #include <unordered_map>
13 #include <visualization_msgs/msg/marker.hpp>
14 #include <geometry_msgs/msg/point.hpp>
19 #include <boost/asio.hpp>
20 #include <boost/asio/thread_pool.hpp>
26 bool leftLine =
false;
27 bool centerLine =
false;
28 bool rightLine =
false;
35 typedef std::array<ColumnMapArray, MAP_SIZE>
MapArray;
38 int m_amountOfThreads;
39 boost::asio::thread_pool m_threadPool;
43 std::mutex m_mapMutex;
45 Vector2f m_absoluteCarPositionOffset;
48 bool m_lastPointLeftLaneUsable =
false;
50 bool m_lastPointCenterLaneUsable =
false;
52 bool m_lastPointRightLaneUsable =
false;
54 std::shared_ptr<LinesObject<int16_t>> m_linesObjectSPtr;
63 void updateMap(visualization_msgs::msg::Marker::SharedPtr laneDetectionSPtr,
char laneType);
64 std::shared_ptr<LinesObject<int16_t>> getLineObject(
Vector2f absolutePositionCM,
float absoluteOrientation,
Vector2i windowSize,
Vector2i& effectiveWindowSize);
67 void updateCell(
Vector2i position,
char laneType);
68 void iterateThroughMap(
int arrayStartX,
int arrayEndX,
int arrayStartY,
int arrayEndY,
Vector2i const& absoluteCarPosition);
71 #endif // MAP_DATA_LAYER_HPP_SIMULATION