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

feat(hesai): multicast support #187

Merged
merged 8 commits into from
Sep 7, 2024
Merged

Conversation

mojomex
Copy link
Collaborator

@mojomex mojomex commented Aug 30, 2024

PR Type

  • New Feature

Related Links

Description

Hesai sensors do not officially mention multicast support in their datasheets, but it turns out that it works just fine. Tested sensors:

  • OT128

This PR adds a multicast_ip parameter for all Hesai sensors. Nebula sets the destination IP of the sensor to that multicast IP when setup_sensor is enabled and multicast_ip is not an empty string.
If setup_sensor is enabled and multicast_ip is empty, the host_ip is set as the destination IP instead, in the same way it was being done up until now.

Review Procedure

  • Set multicast_ip to an empty string. Nebula should behave as usual.
  • Set multicast_ip to an address in the range 224.0.0.0/4 and enable setup_sensor. The sensor data should still arrive and the hardware monitor should still work.

Remarks

To confirm the sensor really supports multicast, check the destination MAC address of the arriving frames. The last three bytes should equal the last three bytes of the IP multicast address, and Wireshark should show IPv4mcast_xx:xx:xx as the L2 destination name:
image

Pre-Review Checklist for the PR Author

PR Author should check the checkboxes below when creating the PR.

  • Assign PR to reviewer

Checklist for the PR Reviewer

Reviewers should check the checkboxes below before approval.

  • Commits are properly organized and messages are according to the guideline
  • (Optional) Unit tests have been written for new behavior
  • PR title describes the changes

Post-Review Checklist for the PR Author

PR Author should check the checkboxes below before merging.

  • All open points are addressed and tracked via issues or tickets

CI Checks

  • Build and test for PR: Required to pass before the merge.

@mojomex mojomex self-assigned this Aug 30, 2024
@mojomex mojomex mentioned this pull request Aug 30, 2024
5 tasks
@mojomex mojomex requested review from drwnz and knzo25 September 2, 2024 07:41
@mojomex mojomex marked this pull request as ready for review September 3, 2024 06:35
@mojomex mojomex requested a review from knzo25 September 6, 2024 06:49
@knzo25
Copy link
Collaborator

knzo25 commented Sep 6, 2024

@mojomex

FYI:

/home/kenzo/workspace/nebula_ws/src/nebula_ros/src/continental/continental_srr520_ros_wrapper.cpp:17: warning: ignoring ‘#pragma clang diagnostic’ [-Wunknown-pragmas]
   17 | #pragma clang diagnostic ignored "-Wbitwise-instead-of-logical"
      | 
/home/kenzo/workspace/nebula_ws/src/nebula_ros/src/robosense/robosense_ros_wrapper.cpp:7: warning: ignoring ‘#pragma clang diagnostic’ [-Wunknown-pragmas]
    7 | #pragma clang diagnostic ignored "-Wbitwise-instead-of-logical"
      | 
/home/kenzo/workspace/nebula_ws/src/nebula_ros/src/velodyne/velodyne_ros_wrapper.cpp:5: warning: ignoring ‘#pragma clang diagnostic’ [-Wunknown-pragmas]
    5 | #pragma clang diagnostic ignored "-Wbitwise-instead-of-logical"
      | 
/home/kenzo/workspace/nebula_ws/src/nebula_ros/src/hesai/decoder_wrapper.cpp:5: warning: ignoring ‘#pragma clang diagnostic’ [-Wunknown-pragmas]
    5 | #pragma clang diagnostic ignored "-Wbitwise-instead-of-logical"
      | 
/home/kenzo/workspace/nebula_ws/src/nebula_ros/src/continental/continental_ars548_ros_wrapper.cpp:17: warning: ignoring ‘#pragma clang diagnostic’ [-Wunknown-pragmas]
   17 | #pragma clang diagnostic ignored "-Wbitwise-instead-of-logical"
      | 
/home/kenzo/workspace/nebula_ws/src/nebula_ros/src/hesai/hesai_ros_wrapper.cpp:9: warning: ignoring ‘#pragma clang diagnostic’ [-Wunknown-pragmas]
    9 | #pragma clang diagnostic ignored "-Wbitwise-instead-of-logical"
      | 

@mojomex
Copy link
Collaborator Author

mojomex commented Sep 6, 2024

@mojomex

FYI:

/home/kenzo/workspace/nebula_ws/src/nebula_ros/src/continental/continental_srr520_ros_wrapper.cpp:17: warning: ignoring ‘#pragma clang diagnostic’ [-Wunknown-pragmas]
   17 | #pragma clang diagnostic ignored "-Wbitwise-instead-of-logical"
      | 
[...]

Ah, indeed that's annoying. For now, as GCC is the standard, I will prioritize having no warnings when compiling with it instead of Clang.
Will address in a separate PR to develop.

Copy link
Collaborator

@knzo25 knzo25 left a comment

Choose a reason for hiding this comment

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

LGTM

@mojomex mojomex merged commit 15c1e51 into tier4:develop Sep 7, 2024
10 checks passed
@mojomex mojomex deleted the hesai-multicast branch September 7, 2024 05:29
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.

2 participants