Skip to content

Commit

Permalink
release format_v2
Browse files Browse the repository at this point in the history
Signed-off-by: Mamoru Sobue <[email protected]>
  • Loading branch information
soblin committed Aug 20, 2024
1 parent 8c516f4 commit 1cb34e4
Show file tree
Hide file tree
Showing 17 changed files with 35 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
namespace lanelet::projection
{

inline namespace format_v1
inline namespace format_v2
{
class MGRSProjector : public Projector
{
Expand Down Expand Up @@ -111,7 +111,7 @@ class MGRSProjector : public Projector
*/
mutable std::string projected_grid_;
};
} // namespace format_v1
} // namespace format_v2

} // namespace lanelet::projection

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
namespace lanelet::projection
{

inline namespace format_v1
inline namespace format_v2
{
class TransverseMercatorProjector : public Projector
{
Expand Down Expand Up @@ -56,7 +56,7 @@ class TransverseMercatorProjector : public Projector
double origin_y_;
double central_meridian_;
};
} // namespace format_v1
} // namespace format_v2

} // namespace lanelet::projection

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
namespace lanelet::autoware
{

inline namespace format_v1
inline namespace format_v2
{
class AutowareTrafficLight;
class Crosswalk;
Expand All @@ -35,18 +35,15 @@ class NoStoppingArea;
class RoadMarking;
class SpeedBump;
class VirtualTrafficLight;
} // namespace format_v1

namespace format_v2
{
class BusStopArea;
} // namespace format_v2

} // namespace lanelet::autoware

namespace lanelet
{
inline namespace format_v1

inline namespace format_v2
{
using TrafficSignConstPtr = std::shared_ptr<const lanelet::TrafficSign>;
using TrafficLightConstPtr = std::shared_ptr<const lanelet::TrafficLight>;
Expand All @@ -57,11 +54,7 @@ using NoStoppingAreaConstPtr = std::shared_ptr<const lanelet::autoware::NoStoppi
using NoParkingAreaConstPtr = std::shared_ptr<const lanelet::autoware::NoParkingArea>;
using SpeedBumpConstPtr = std::shared_ptr<const lanelet::autoware::SpeedBump>;
using CrosswalkConstPtr = std::shared_ptr<const lanelet::autoware::Crosswalk>;
} // namespace format_v1

namespace format_v2
{
using BusStopAreaConstPtr = std::shared_ptr<const lanelet::autoware::format_v2::BusStopArea>;
using BusStopAreaConstPtr = std::shared_ptr<const lanelet::autoware::BusStopArea>;
} // namespace format_v2

} // namespace lanelet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
namespace lanelet::autoware
{

inline namespace format_v1
inline namespace format_v2
{
class AutowareTrafficLight : public lanelet::TrafficLight
{
Expand Down Expand Up @@ -86,7 +86,7 @@ class AutowareTrafficLight : public lanelet::TrafficLight
friend class RegisterRegulatoryElement<AutowareTrafficLight>;
explicit AutowareTrafficLight(const lanelet::RegulatoryElementDataPtr & data);
};
} // namespace format_v1
} // namespace format_v2

} // namespace lanelet::autoware

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
namespace lanelet::autoware
{

// TODO(Mamoru Sobue): when updating existing elements from format_v1, prefix this with inline
namespace format_v2
inline namespace format_v2
{
class BusStopArea : public lanelet::RegulatoryElement
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
namespace lanelet::autoware
{

inline namespace format_v1
inline namespace format_v2
{
class Crosswalk : public lanelet::RegulatoryElement
{
Expand Down Expand Up @@ -87,7 +87,7 @@ class Crosswalk : public lanelet::RegulatoryElement
friend class RegisterRegulatoryElement<Crosswalk>;
explicit Crosswalk(const lanelet::RegulatoryElementDataPtr & data);
};
} // namespace format_v1
} // namespace format_v2

} // namespace lanelet::autoware

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
namespace lanelet::autoware
{

inline namespace format_v1
inline namespace format_v2
{
class DetectionArea : public lanelet::RegulatoryElement
{
Expand Down Expand Up @@ -91,7 +91,7 @@ class DetectionArea : public lanelet::RegulatoryElement
friend class RegisterRegulatoryElement<DetectionArea>;
explicit DetectionArea(const lanelet::RegulatoryElementDataPtr & data);
};
} // namespace format_v1
} // namespace format_v2

} // namespace lanelet::autoware

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
namespace lanelet::autoware
{

inline namespace format_v1
inline namespace format_v2
{
class NoParkingArea : public lanelet::RegulatoryElement
{
Expand Down Expand Up @@ -67,7 +67,7 @@ class NoParkingArea : public lanelet::RegulatoryElement
friend class RegisterRegulatoryElement<NoParkingArea>;
explicit NoParkingArea(const lanelet::RegulatoryElementDataPtr & data);
};
} // namespace format_v1
} // namespace format_v2

} // namespace lanelet::autoware

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
namespace lanelet::autoware
{

inline namespace format_v1
inline namespace format_v2
{
class NoStoppingArea : public lanelet::RegulatoryElement
{
Expand Down Expand Up @@ -89,7 +89,7 @@ class NoStoppingArea : public lanelet::RegulatoryElement
friend class RegisterRegulatoryElement<NoStoppingArea>;
explicit NoStoppingArea(const lanelet::RegulatoryElementDataPtr & data);
};
} // namespace format_v1
} // namespace format_v2

} // namespace lanelet::autoware

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
namespace lanelet::autoware
{

inline namespace format_v1
inline namespace format_v2
{
class RoadMarking : public lanelet::RegulatoryElement
{
Expand Down Expand Up @@ -67,7 +67,7 @@ class RoadMarking : public lanelet::RegulatoryElement
friend class RegisterRegulatoryElement<RoadMarking>;
explicit RoadMarking(const lanelet::RegulatoryElementDataPtr & data);
};
} // namespace format_v1
} // namespace format_v2

} // namespace lanelet::autoware

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
namespace lanelet::autoware
{

inline namespace format_v1
inline namespace format_v2
{
class SpeedBump : public lanelet::RegulatoryElement
{
Expand Down Expand Up @@ -69,7 +69,7 @@ class SpeedBump : public lanelet::RegulatoryElement
friend class RegisterRegulatoryElement<SpeedBump>;
explicit SpeedBump(const lanelet::RegulatoryElementDataPtr & data);
};
} // namespace format_v1
} // namespace format_v2

} // namespace lanelet::autoware

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
namespace lanelet::autoware
{

inline namespace format_v1
inline namespace format_v2
{
class VirtualTrafficLight : public lanelet::RegulatoryElement
{
Expand Down Expand Up @@ -74,7 +74,7 @@ class VirtualTrafficLight : public lanelet::RegulatoryElement
friend class RegisterRegulatoryElement<VirtualTrafficLight>;
explicit VirtualTrafficLight(const lanelet::RegulatoryElementDataPtr & data);
};
} // namespace format_v1
} // namespace format_v2

} // namespace lanelet::autoware

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
namespace lanelet::utils::query
{

inline namespace format_v1
inline namespace format_v2
{
/**
* [crosswalkLanelets extracts crosswalk lanelets]
Expand Down Expand Up @@ -207,7 +207,7 @@ std::vector<lanelet::ConstLineString3d> stopLinesLanelet(const lanelet::ConstLan
*/
std::vector<lanelet::ConstLineString3d> stopSignStopLines(
const lanelet::ConstLanelets & lanelets, const std::string & stop_sign_id = "stop_sign");
} // namespace format_v1
} // namespace format_v2

/**
* [laneletLayer converts laneletLayer into lanelet vector]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ namespace lanelet::autoware
*/
enum class Version : int {
none = 0,
format_v1,
format_v2,
};

// current format_version
static constexpr Version version = Version::format_v1;
static constexpr Version version = Version::format_v2;
} // namespace lanelet::autoware

#endif // AUTOWARE_LANELET2_EXTENSION__VERSION_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
namespace lanelet::visualization
{

inline namespace format_v1
inline namespace format_v2
{
/**
* [autowareTrafficLightsAsMarkerArray creates marker array to visualize traffic
Expand Down Expand Up @@ -217,7 +217,7 @@ visualization_msgs::msg::MarkerArray noObstacleSegmentationAreaForRunOutAsMarker
visualization_msgs::msg::MarkerArray hatchedRoadMarkingsAreaAsMarkerArray(
const lanelet::ConstPolygons3d & hatched_road_markings_area,
const std_msgs::msg::ColorRGBA & area_color, const std_msgs::msg::ColorRGBA & line_color);
} // namespace format_v1
} // namespace format_v2

/**
* [lanelet2Triangle converts lanelet into vector of triangles. Used for
Expand Down
4 changes: 2 additions & 2 deletions autoware_lanelet2_extension/lib/query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace lanelet::utils

namespace query
{
inline namespace format_v1
inline namespace format_v2
{
lanelet::ConstLanelets crosswalkLanelets(const lanelet::ConstLanelets & lls)
{
Expand Down Expand Up @@ -699,7 +699,7 @@ std::vector<lanelet::ConstLineString3d> stopSignStopLines(
}
return stoplines;
}
} // namespace format_v1
} // namespace format_v2
} // namespace query

// returns all lanelets in laneletLayer - don't know how to convert
Expand Down
4 changes: 2 additions & 2 deletions autoware_lanelet2_extension/lib/visualization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ namespace lanelet

namespace visualization
{
inline namespace format_v1
inline namespace format_v2
{
visualization_msgs::msg::MarkerArray autowareTrafficLightsAsMarkerArray(
const std::vector<lanelet::AutowareTrafficLightConstPtr> & tl_reg_elems,
Expand Down Expand Up @@ -1075,7 +1075,7 @@ visualization_msgs::msg::MarkerArray hatchedRoadMarkingsAreaAsMarkerArray(

return marker_array;
}
} // namespace format_v1
} // namespace format_v2
} // namespace visualization

void visualization::lanelet2Triangle(
Expand Down

0 comments on commit 1cb34e4

Please sign in to comment.