-
Notifications
You must be signed in to change notification settings - Fork 54
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: add robosense support #77
Conversation
Hello, I have been working on this for some time. I have managed to get a point cloud with Helios 5515. It is still work in progress and I wanted to share an update. I tried to follow Hesai part. Robosense has a different byte order than Hesai, it is big-endian. So, direct memcpy into a struct doesn't work. I have used Boost.Endian library to cope with byte order issue. There are some hard coded parts for timestamps and return modes for now, I am working on them. Helios 5515 and Bpearl 3.0 support configuration only via web interface, so it seems not possible to implement setup sensor part. Here is an image of a Helios point cloud: (I haven't applied correction values yet) |
103fcae
to
7389081
Compare
Awesome @mebasoglu, keep up the great work! Unfortunately we don't have a Robosense device to test with, but hopefully we can assist with testing from pcaps. |
62b03aa
to
71ab11f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution, the code already looks very good!
Please have a look at the few small comments I left concerning mainly return mode handling and readability.
I will check for functionality when the pcap file(s) is/are available.
@amc-nu has more knowledge of the HW interfaces so I have not reviewed those in depth yet.
nebula_common/include/nebula_common/robosense/robosense_common.hpp
Outdated
Show resolved
Hide resolved
nebula_common/include/nebula_common/robosense/robosense_common.hpp
Outdated
Show resolved
Hide resolved
nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/robosense_sensor.hpp
Outdated
Show resolved
Hide resolved
...la_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/robosense_decoder.hpp
Outdated
Show resolved
Hide resolved
Hello @mojomex , thank you for the feedback! I am working on them. For Helios: <arg name="sensor_model" default="Helios" description="Helios|Bpearl"/>
<arg name="sensor_ip" default="192.168.1.211" description="Lidar Sensor IP"/>
<arg name="host_ip" default="255.255.255.255" description="Broadcast IP from Sensor"/>
<arg name="data_port" default="2011" description="LiDAR Data Port"/>
<arg name="gnss_port" default="3011" description="LiDAR GNSS Port"/> For Bpearl: <arg name="sensor_model" default="Bpearl" description="Helios|Bpearl"/>
<arg name="sensor_ip" default="192.168.1.210" description="Lidar Sensor IP"/>
<arg name="host_ip" default="255.255.255.255" description="Broadcast IP from Sensor"/>
<arg name="data_port" default="2010" description="LiDAR Data Port"/>
<arg name="gnss_port" default="3010" description="LiDAR GNSS Port"/> |
420094b
to
f65280e
Compare
Hello @mojomex @drwnz @amc-nu , I worked on the current feedback and added Bpearl also. The provided pcap file has both Helios and Bpearl. About the I am waiting your further comments. Thank you! |
Hi, I just tested the driver with the PCAP file and for Helios it works perfectly. For Bpearl, it outputs the pointclouds but logs Thank you! |
As for
The formula would be As for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return_type
field is currently ReturnType::UNKNOWN
for all points for both Helios and Bpearl.
nebula_hw_interfaces/src/nebula_robosense_hw_interfaces/robosense_hw_interface.cpp
Outdated
Show resolved
Hide resolved
2fbcf7a
to
c12e45c
Compare
Hello, on the last Sensing&Perception WG, we have decided to create a separate Robosense msgs package. The hardware interface ros wrapper publishes both data (MSOP) and info (DIFOP) packets to I have also updated
For this one, I have tested it with the sensor itself instead of the pcap file and didn't get the warning. |
Hello, it seems we have two different Bpearl models, v3.0 and v4.0 at the office. While transitioning to v4.0, some packet definitions have changed such as time stamp. The warning that @mojomex got about timestamps is also because of that. I am working on these different versions of Bpearl. I will let you know when it is completed. |
9360bbc
to
5a4017d
Compare
45439d7
to
34a7509
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mebasoglu, thanks again for your contributions!
Here's my updated review after the newest changes:
- I made some code comments that are mostly style-related and will help readability
- When launching with the provided configurations, the printed sensor config in
hw_monitor
will be incomplete: (All values are either missing or garbage data):
[robosense_hw_monitor_ros_wrapper_node]: SensorConfig:SensorModel: BPEARL, ReturnMode: Unknown, HostIP: , SensorIP: , FrameID: , DataPort: 0, Frequency: 0, MTU: 0, Use sensor time: 0, GnssPort: 0, ScanPhase:0, RotationSpeed:28416, FOV(Start):28514, FOV(End):25971
- The timestamps are not decoded correctly for Helios (but are for Bpearl):
Bpearl V3 (correct) | Helios (incorrect) |
---|---|
The nanosec
field in the header timestamp should be in the [0, 1e9)
range, the point timestamps in the [0, 1e8)
range, assuming 10 Hz
.
I observed these header values:
---
sec: 1695812910
nanosec: 543488
---
sec: 1695812910
nanosec: 643840
---
sec: 1695812910
nanosec: 743680
---
sec: 1695812910
nanosec: 843520
---
sec: 1695812910
nanosec: 943616
---
sec: 1695812910
nanosec: 1043456
---
sec: 1695812910
nanosec: 1143808
---
sec: 1695812910
nanosec: 1243904
---
sec: 1695812910
nanosec: 1343488
---
sec: 1695812910
nanosec: 1443584
---
sec: 1695812911
nanosec: 543488
---
The nanosec
field seems to only get up to 1.44e7 ns
. The first digit should be increasing by 1
for each output pointcloud (0e8 -- 1e8 -- 2e8 ... 9e8 -- 0e8
etc.).
In the coming days we will try to validate everything on the real sensors 😃
nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/bpearl_v3.hpp
Outdated
Show resolved
Hide resolved
nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/bpearl_v3.hpp
Outdated
Show resolved
Hide resolved
nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/bpearl_v4.hpp
Outdated
Show resolved
Hide resolved
nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/bpearl_v4.hpp
Outdated
Show resolved
Hide resolved
nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/helios.hpp
Outdated
Show resolved
Hide resolved
nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/bpearl_v3.hpp
Outdated
Show resolved
Hide resolved
nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/bpearl_v3.hpp
Outdated
Show resolved
Hide resolved
nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/bpearl_v3.hpp
Outdated
Show resolved
Hide resolved
nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/bpearl_v3.hpp
Show resolved
Hide resolved
Hello @mojomex , thank you for the feedback. |
Hello again @mojomex , I have found the problem. I used nanoseconds instead of microseconds while decoding timestamp, although it says microseconds on the manual. It should be fine right now. Also, for the spellcheck test, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, looks great! Yes, lease add Idat
and Vdat
to the .cspell.json
file!
nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/robosense_packet.hpp
Outdated
Show resolved
Hide resolved
931fc70
to
ad004c8
Compare
Since correction angles are different for each sensor, it seems the order of the rings are also different. Sorting calibration data descending by vertical angles and creating corrected channels numbers with the new indexes solves the ring problem. Apart from these, one thing I missed is the PTP synchronization. I only checked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
Thank you again for your extensive work!
PR Type
Related Links
Description
This change proposes Robosense Helios and Bpearl support for nebula.
Closes #76.
Review Procedure
It is still in progress.
Remarks
Pre-Review Checklist for the PR Author
PR Author should check the checkboxes below when creating the PR.
Checklist for the PR Reviewer
Reviewers should check the checkboxes below before approval.
Post-Review Checklist for the PR Author
PR Author should check the checkboxes below before merging.
CI Checks