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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starts with the translation interface for geometric types. #4

Merged
merged 6 commits into from Dec 30, 2022

Conversation

agalbachicar
Copy link
Collaborator

馃帀 New feature

Part of #1

Summary

Part 1 of many that implements the translation interface for all the geometric types. This part provides the code to translate to and from many of the types provided in #3. This PR is missing:

  • Documentation
  • Test coverage to the translation of the maliput IDs to the ROS messages.

I think that it'll add 200LOC more and this PR is already too big. I'm working on two follow up PRs to address those two things in particular. After that, I'll start working on the node to consume these functions.

Test it

Via unit tests except the things mentioned above.

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)

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: Agustin Alba Chicar <ag.albachicar@gmail.com>
Copy link
Contributor

@francocipollone francocipollone left a comment

Choose a reason for hiding this comment

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

LGTM!
Nice testing

maliput_ros_translation/package.xml Outdated Show resolved Hide resolved
maliput_ros_translation/package.xml Outdated Show resolved Hide resolved
Comment on lines +50 to +69
maliput_ros_interfaces::msg::BranchPointId ToRosMessage(const maliput::api::BranchPointId& branch_point_id);
maliput_ros_interfaces::msg::JunctionId ToRosMessage(const maliput::api::JunctionId& junction_id);
maliput_ros_interfaces::msg::LaneId ToRosMessage(const maliput::api::LaneId& lane_id);
maliput_ros_interfaces::msg::RoadGeometryId ToRosMessage(const maliput::api::RoadGeometryId& road_geometry_id);
maliput_ros_interfaces::msg::SegmentId ToRosMessage(const maliput::api::SegmentId& segment_id);

maliput::api::BranchPointId FromRosMessage(const maliput_ros_interfaces::msg::BranchPointId& branch_point_id);
maliput::api::JunctionId FromRosMessage(const maliput_ros_interfaces::msg::JunctionId& junction_id);
maliput::api::LaneId FromRosMessage(const maliput_ros_interfaces::msg::LaneId& lane_id);
maliput::api::RoadGeometryId FromRosMessage(const maliput_ros_interfaces::msg::RoadGeometryId& road_geometry_id);
maliput::api::SegmentId FromRosMessage(const maliput_ros_interfaces::msg::SegmentId& segment_id);

maliput_ros_interfaces::msg::BranchPoint ToRosMessage(const maliput::api::BranchPoint* branch_point);
maliput_ros_interfaces::msg::Lane ToRosMessage(const maliput::api::Lane* lane);
maliput_ros_interfaces::msg::LaneEnd ToRosMessage(const maliput::api::LaneEnd& lane_end);
maliput_ros_interfaces::msg::LaneEndSet ToRosMessage(const maliput::api::LaneEndSet* lane_end_set);
maliput_ros_interfaces::msg::Junction ToRosMessage(const maliput::api::Junction* junction);
maliput_ros_interfaces::msg::RoadGeometry ToRosMessage(const maliput::api::RoadGeometry* road_geometry);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Missing docstring. It will be a copy-paste as they are pretty similar.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I made #6 for all that.

Signed-off-by: Agustin Alba Chicar <ag.albachicar@gmail.com>
- Provides a package with message descriptions for RoadGeometry, BranchPoint, Junction, Lane and Segment Ids.

Signed-off-by: Agustin Alba Chicar <ag.albachicar@gmail.com>
Signed-off-by: Agustin Alba Chicar <ag.albachicar@gmail.com>
Signed-off-by: Agustin Alba Chicar <ag.albachicar@gmail.com>
@agalbachicar agalbachicar force-pushed the agalbachicar/#1_add_translation_interface branch from 8cc9492 to 25afafe Compare December 30, 2022 15:44
@agalbachicar agalbachicar merged commit 9af9223 into main Dec 30, 2022
@agalbachicar agalbachicar deleted the agalbachicar/#1_add_translation_interface branch December 30, 2022 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants