Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds OSMManager #7

Merged
merged 12 commits into from
Oct 5, 2022
Merged

Adds OSMManager #7

merged 12 commits into from
Oct 5, 2022

Conversation

francocipollone
Copy link
Contributor

@francocipollone francocipollone commented Sep 27, 2022

🎉 New feature

Part of #6

Summary

  • Adds OSMManager
    • Parses the osm file. It relies on lanelet2's parser for parsing the lanelet2-osm map.
    • It fills maliput_osm::osm::segment structs
    • Multiple lanes per segment isn't supported for this PR.
  • A 2-lane-straight-road osm map is added to the resources folder

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if it affects the public API)

Signed-off-by: Franco Cipollone <franco.c@ekumenlabs.com>
Signed-off-by: Franco Cipollone <franco.c@ekumenlabs.com>
Signed-off-by: Franco Cipollone <franco.c@ekumenlabs.com>
Signed-off-by: Franco Cipollone <franco.c@ekumenlabs.com>
Signed-off-by: Franco Cipollone <franco.c@ekumenlabs.com>
Signed-off-by: Franco Cipollone <franco.c@ekumenlabs.com>
Signed-off-by: Franco Cipollone <franco.c@ekumenlabs.com>
Signed-off-by: Franco Cipollone <franco.c@ekumenlabs.com>
Comment on lines +75 to +80
install (DIRECTORY resources
DESTINATION share/${PROJECT_NAME})


ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/env-hooks/${PROJECT_NAME}.dsv.in")
ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/env-hooks/${PROJECT_NAME}.sh.in")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to use ament_index here instead, for the resources management.

Base automatically changed from francocipollone/osm_lane_segment to main September 28, 2022 15:09
Signed-off-by: Franco Cipollone <franco.c@ekumenlabs.com>
Comment on lines 47 to 48
::testing::AssertionResult CompareLineString3d(const maliput_sparse::geometry::LineString3d& lhs,
const maliput_sparse::geometry::LineString3d& rhs, double tolerance);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will push this to maliput_sparse::test_utilities as probably it is something to be used by other backends.

@francocipollone francocipollone marked this pull request as ready for review September 29, 2022 16:17
@francocipollone francocipollone changed the title WIP: Adds OSMManager Adds OSMManager Sep 29, 2022
@francocipollone francocipollone mentioned this pull request Oct 3, 2022
6 tasks
Copy link
Contributor

@agalbachicar agalbachicar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments.

src/maliput_osm/osm/conversions.cc Show resolved Hide resolved
src/maliput_osm/osm/osm_manager.cc Show resolved Hide resolved
} // namespace
} // namespace test
} // namespace osm
} // namespace maliput_osm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
} // namespace maliput_osm
} // namespace maliput_osm

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

8, {lanelet::Point3d{5, points_right[0].x(), points_right[0].y(), points_right[0].z()},
lanelet::Point3d{6, points_right[1].x(), points_right[1].y(), points_right[1].z()},
lanelet::Point3d{7, points_right[2].x(), points_right[2].y(), points_right[2].z()}});
const lanelet::Lanelet lanelet(std::stoi(lane_id), lanelet_left, lanelet_right);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const lanelet::Lanelet lanelet(std::stoi(lane_id), lanelet_left, lanelet_right);
const lanelet::Lanelet lanelet(kLaneIdNumber, lanelet_left, lanelet_right);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

TEST(ToMaliput, Lanelet) {
const std::vector<maliput::math::Vector3> points_left{{1., 1., 1.}, {2., 2., 2.}, {3., 3., 3.}};
const std::vector<maliput::math::Vector3> points_right{{3., 3., 3.}, {4., 4., 4.}, {5., 5., 5.}};
const Lane::Id lane_id{"10"};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const Lane::Id lane_id{"10"};
constexpr int kLaneIdNumber{10};
const Lane::Id lane_id{std::to_string(kLaneIdNumber)};

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Signed-off-by: Franco Cipollone <franco.c@ekumenlabs.com>
Signed-off-by: Franco Cipollone <franco.c@ekumenlabs.com>
Copy link
Contributor

@agalbachicar agalbachicar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can merge the dependent PR and try once more with CI.

@francocipollone
Copy link
Contributor Author

I think you can merge the dependent PR and try once more with CI.

Yep, CI passes now

Copy link
Contributor

@agalbachicar agalbachicar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@francocipollone francocipollone merged commit ee0e2db into main Oct 5, 2022
@francocipollone francocipollone deleted the francocipollone/osm_manager branch October 5, 2022 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants