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

Naive 3D Scanning Radar #161

Merged
merged 15 commits into from
Jun 28, 2022
Merged

Naive 3D Scanning Radar #161

merged 15 commits into from
Jun 28, 2022

Conversation

aaronchongth
Copy link
Collaborator

Changes:

  • Replaces the mbzirc_naive_spinning_radar with mbzirc_naive_3d_scanning_radar, due to low RTF issues (40% RTF) when sampling at very high rates (250Hz) to match the specifications of the Wartsila RS24. RTF is now relatively high (90% on my machine, awaiting more testing)
  • Using a static 3D GPU LiDAR to match the scanning resolution. This approach will leave a lot of gaps for detection, especially at long distances.
  • Outputs in the format accepted by naive_radar_bridge

Possible further improvements:

  • amplitude of scan. There was an original implementation by @arjo129, but I haven't tried adapting that into this method. Not too sure if it is even possible
  • Since the job of the plugin is somewhat just filtering acceptable values, we can possibly even write everything into the bridge, where the bridge accepts ignition laser scans, and outputs ROS 2 radar messages.
  • I have not been able to find any relevant information regarding the sensor noise of the Wartsila RS24. At the moment, it is using the same basic gaussian noise as in mbzirc_naive_radar
  • Debugging output, I couldn't find any existing tool to visualize or ensure that the radar output is accurate

How to try it out:

ros2 launch mbzirc_ros competition_local.launch.py ign_args:="-v 4 -r coast.sdf"

ros2 launch mbzirc_ign spawn.launch.py name:=usv world:=coast model:=usv x:=-1462 y:=-16.5 z:=0.3 R:=0 P:=0 Y:=0 slot0:=mbzirc_naive_3d_scanning_radar

ros2 topic echo /usv/slot0/radar/scan

arjo129 and others added 6 commits May 31, 2022 14:53
The following PR adds a simple maritime RADAR. It is by no means complete but since I dont have time on this project anymore I'll leave this here.  Bascially, the way this works is very simple. We extend the naive spiinning radar example with a simple plugin. This plugin projects the radar onto a polar coordinate frame. It combines the current lidar position and the lidar return and projects it into a polar plot like maritime radars do. The end user will receive a `ignition.msgs.Float_V`. The first bin contains the angle the radar is currently facing, the second bin will contain the resolution of the bin and the third item is the resolution of each bin. The rest of the FloatV will contain the sampled bins for each location.

## Some things to work on

* [ ] Performance. Currently the performance of the system is at 25%RTF when we load the radar simulation. There are some low hanging fruits which I have marked with TODOs that should help boost the performance. In particular we are doing a lot of copying when filling the message. Pre-allocating the message could save some compute time.
* [ ] ROS Bridge.  Currently the function in the rosbridge looks correct but for whatever reason Im unable to link against the local protobuf runtime. (The Naive RADAR bridge is doing the same for me)
* Unit/integration tests

## Stretch Goals
* Integrate rain and sea state noise in (see todos in `MaritimeRadar.cc`)

For completeness the NaiveRadar should really just populate the RadarTracks message instead of the RadarScan message.

Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
…rom ecm

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
… changed name to naive_3d_scanning_radar

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Copy link
Collaborator

@iche033 iche033 left a comment

Choose a reason for hiding this comment

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

Did a first pass. Overall looks good. Let's put this in mbzirc_ign/models/sensors and make it a non-custom sensor model. I can help with this. I'll continue to do more testing.

This approach will leave a lot of gaps for detection, especially at long distances.

looking at the spec, it's 1.44 degrees bearing resolution. So I think that's expected? I see that the lidar horz sample count is 60 / 1.44 = 250, which should be correct.

I have not been able to find any relevant information regarding the sensor noise of the Wartsila RS24. At the moment, it is using the same basic gaussian noise as in mbzirc_naive_radar

This is a shorter range radar than the one in mbzirc_naive_radar so we may want to reduce the stddev a little bit. One option would be to set it to roughly the range resolution advertized.

Debugging output, I couldn't find any existing tool to visualize or ensure that the radar output is accurate

The lidar visualization look fine but agree we'll need to manually check the radar msg values.

@iche033 iche033 changed the base branch from arjo/maritime_radar to main June 24, 2022 22:09
@iche033
Copy link
Collaborator

iche033 commented Jun 24, 2022

Let's put this in mbzirc_ign/models/sensors and make it a non-custom sensor model. I can help with this.

I left this in mbzirc_custom since there are custom launch scripts used. Instead, I just restored the spinning radar model in #162

aaronchongth and others added 4 commits June 25, 2022 10:27
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@iche033
Copy link
Collaborator

iche033 commented Jun 27, 2022

made a minor change in a65456c to unsubscribe to the ign topic if there are no connections from the ros bridge

I noticed that when I do ros2 topic echo /usv/slot0/radar/scan, I only see radar return values with elevation at -0.6981319785118103 but not other elevations. I did verify that we pack data with other elevations through but not sure why it's not being printed out by ros2 topic echo

Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@aaronchongth
Copy link
Collaborator Author

I noticed that when I do ros2 topic echo /usv/slot0/radar/scan, I only see radar return values with elevation at -0.6981319785118103 but not other elevations. I did verify that we pack data with other elevations through but not sure why it's not being printed out by ros2 topic echo

It looks like it might just be too much data for ros2 topic echo to handle. I found that we were publishing other elevations using a basic subscriber https://gist.github.com/aaronchongth/2e38cd2ab678a9536111b68186908c70

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
@iche033
Copy link
Collaborator

iche033 commented Jun 28, 2022

It looks like it might just be too much data for ros2 topic echo to handle. I found that we were publishing other elevations using a basic subscriber https://gist.github.com/aaronchongth/2e38cd2ab678a9536111b68186908c70

ok cool, thanks for verifying this. This PR looks good then.

@caguero caguero merged commit bc90157 into main Jun 28, 2022
@caguero caguero deleted the aaron/radar-using-3d-lidar branch June 28, 2022 22:03
@aaronchongth aaronchongth mentioned this pull request Jun 29, 2022
2 tasks
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.

4 participants