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

[ROS 2][grid_map_core] Update ROS 2 branch with the latest changes from master #486

Open
wants to merge 2 commits into
base: rolling
Choose a base branch
from

Conversation

kjalloul-anybotics
Copy link

Changes to grid_map_core

  • Added latest fixes and test cases from master.
  • Bumped package version to 2.4.0.

@kjalloul-anybotics kjalloul-anybotics added the ros2 Affects ROS 2 label Nov 26, 2024
@kjalloul-anybotics kjalloul-anybotics self-assigned this Nov 26, 2024
@wep21
Copy link
Collaborator

wep21 commented Nov 28, 2024

@kjalloul-anybotics rebase, please

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Nov 28, 2024

Thanks for the contribution, nice to see some support for bringing the ROS 2 branch up to date!

As it stands, you've bundled a number of unrelated changes. Can you instead propose PR's that target things individually so it's more reviewable? Also, bumping the version can be done as it's own PR.

In addition to the changes outlined, you have

  • Replaced ifdefs with pragma_once
  • Fixed spelling
  • Added a union object for the color
  • Added test failure messages that don't change the test logic
  • Changed CubicInterpolation's underflow behavior
  • Cleaned up return value syntax
  • Switched to using std::all_of instead of manual iteration
  • Switched which exception is thrown in GridMap without updating the public API - this is API breaking and we cannot backport this
    ... and more...

That's a lot of risk, with no linkage to the original commit history or PR's. Perhaps there's a better strategy we can come up with to make this safer?

@kjalloul-anybotics
Copy link
Author

Thanks for the feedback!

Yes in the beginning I only needed one new function in grid_map_cv, but then while I was at it, the idea was to bring it and its upstream dependency grid_map_core up to date with master.

But you're right it definitely can be broken down into smaller PRs to keep track of where the changes came from.

I traced back the origin of most changes to these commits:

  • std::all_of changes, return value syntax changes, and other fixes related to formatting from b7293f5
  • Typos, updated tests, adding namespace to tests, and more syntax improvements from d6f0912
  • Adding Color union, removing a couple functions, and fixing compiler warnings from 6ddff74
  • Clipping point fix and new test cases from f1344bd
  • Visibility cleanup from 61972c8
  • Transformed map fix + tests from f0dd780
  • Submap iterator speedup + tests from c8b1057

Do you think it's a good idea to create separate PRs for each of them? Once grid_map_core is updated, I can do the same for grid_map_cv.

And apparently pragma was replaced with ifndef during the ROS 2 port and not the other way around, same with the switch cases to if conditions, so I'll revert these changes.

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Nov 28, 2024

Awesome, thanks for putting the list together!

yes, if it's easy enough, separate PR's are preferred, with a link to the ROS 1 PR.

The change to ifdefs was probably intentional, and no one has complained about it, so I'd personally vote we just not touch it.
Unless we have a reason to diverge, I would prefer the conventions in rclcpp:
https://github.com/ros2/rclcpp/blob/e64627004f4265560addf3532510a83602be5aef/rclcpp/include/rclcpp/client.hpp#L16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ros2 Affects ROS 2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants