Skip to content

Commit

Permalink
ref(traffic_simulator): apply hdmaputils changes to lanelet_loader
Browse files Browse the repository at this point in the history
  • Loading branch information
dmoszynski committed Dec 10, 2024
1 parent ea56f36 commit 51bcd40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <lanelet2_io/Io.h>

#include <autoware_auto_mapping_msgs/msg/had_map_bin.hpp>
#include <autoware_map_msgs/msg/lanelet_map_bin.hpp>
#include <filesystem>

namespace traffic_simulator
Expand All @@ -28,7 +28,7 @@ class LaneletLoader
public:
static auto load(const std::filesystem::path & lanelet_map_path) -> lanelet::LaneletMapPtr;
static auto convertMapToBin(const lanelet::LaneletMapPtr lanelet_map_ptr)
-> autoware_auto_mapping_msgs::msg::HADMapBin;
-> autoware_map_msgs::msg::LaneletMapBin;

private:
static auto overwriteLaneletsCenterline(lanelet::LaneletMapPtr) -> void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ auto LaneletLoader::load(const std::filesystem::path & lanelet_map_path) -> lane
}

auto LaneletLoader::convertMapToBin(const lanelet::LaneletMapPtr lanelet_map_ptr)
-> autoware_auto_mapping_msgs::msg::HADMapBin
-> autoware_map_msgs::msg::LaneletMapBin
{
std::stringstream ss;
boost::archive::binary_oarchive oa(ss);
oa << *lanelet_map_ptr;
auto id_counter = lanelet::utils::getId();
oa << id_counter;
std::string tmp_str = ss.str();
autoware_auto_mapping_msgs::msg::HADMapBin msg;
autoware_map_msgs::msg::LaneletMapBin msg;
msg.data.clear();
msg.data.resize(tmp_str.size());
msg.data.assign(tmp_str.begin(), tmp_str.end());
Expand Down

0 comments on commit 51bcd40

Please sign in to comment.