Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 27-05-2021, 09:56   #1
Registered User

Join Date: May 2021
Posts: 3
OpenCPN to display LIDAR based SLAM for autonomous Navigation

Hello everyone,
I am glad to have found this great forum to address a question to the OpenCPN specialists among you.

I am working on autonomous navigation of maritime vehicles in limited areas.
For this I use a LIDAR configured as a ROS node and Google Cartographer to create a map.
I would like to display this map as an overlay in OpenCPN.

Can you give me some hints on which options are suitable?
Preferably I would like to send a UDP message over the network to OpenCPN, similar to what is done with the Radar PI plugin.
Possibly I can use the Radar PI plugin directly?
Where can I find the specification for the structure of the UDP message?

I would like to display lines, points or polygons in different color and transparency.
As with a radar image, the elements also need to be deleted/changed later.

As an alternative: Is there a possibility to read the overlay continuously repeated from a file that is updated by another program?

I am very interested in your suggestions?

Many greetings
Baltic_Tobi
Baltic_Tobi is offline   Reply With Quote
Old 28-05-2021, 09:52   #2
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,631
Images: 2
Re: OpenCPN to display LIDAR based SLAM for autonomous Navigation

Baltic wrote:

For this I use a LIDAR configured as a ROS node and Google Cartographer to create a map.

I would like to display this map as an overlay in OpenCPN.

Response:
Why not use Opencpn to display the typical enc or rnc charts that are readily available?

Then use Lidar to help with navigation?

What formats can your lidar "map" be in? Mbtiles might be useful as opencpn can overlay that, also jpeg, png and the other image formats (look at weatherfax plugin and photo---.plugin
rgleason is offline   Reply With Quote
Old 28-05-2021, 11:10   #3
Registered User

Join Date: May 2021
Posts: 3
Re: OpenCPN to display LIDAR based SLAM for autonomous Navigation

Hi rgleason, thanks for your suggestions so far.

Quote:
Originally Posted by rgleason View Post
Why not use Opencpn to display the typical enc or rnc charts that are readily available?
Of course, I do so.

Quote:
Originally Posted by rgleason View Post
Then use Lidar to help with navigation?
Yes, and I want to view the LIDAR measurement information for monitoring and debugging.

Quote:
Originally Posted by rgleason View Post
What formats can your lidar "map" be in?
I need to check the export options of Google Cartographer:
https://google-cartographer-ros.read...ts_writer.html

Otherwise I will have to build my own interface.

Quote:
Originally Posted by rgleason View Post
Mbtiles might be useful as opencpn can overlay that, also jpeg, png and the other image formats (look at weatherfax plugin and photo---.plugin
The LIDAR-map data has to update at least every second like a radar measurment. Is this possible with Mbtiles and images?
Baltic_Tobi is offline   Reply With Quote
Old 28-05-2021, 14:25   #4
Registered User
 
Canne's Avatar

Join Date: Aug 2014
Posts: 246
Re: OpenCPN to display LIDAR based SLAM for autonomous Navigation

Quote:
Originally Posted by Baltic_Tobi View Post
<snip>The LIDAR-map data has to update at least every second like a radar measurment. Is this possible with Mbtiles and images?</snip>
Maybe, but for the speed you may want to avoid the filesystem and build your volatile map sweeps in CPU or GPU memory and draw them as an overlay on the map using OpenGL: for that purpose, the radar_pi is indeed the one you want to fork, see this line in it. In one of the overlay drawing modules of my own I draw quite complex, radar-like sweeping lines at 1Hz with OpenGL. All that passes on the GPU, the CPU load needle barely moves. I map lines on the chart using Mercator-functions in the OpenCPN API. Good luck to your project, how interesting!
Canne is offline   Reply With Quote
Old 29-05-2021, 05:27   #5
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 4,740
Re: OpenCPN to display LIDAR based SLAM for autonomous Navigation

Quote:
Originally Posted by Baltic_Tobi View Post
Hello everyone,
I am glad to have found this great forum to address a question to the OpenCPN specialists among you.

I am working on autonomous navigation of maritime vehicles in limited areas.
For this I use a LIDAR configured as a ROS node and Google Cartographer to create a map.
I would like to display this map as an overlay in OpenCPN.

Can you give me some hints on which options are suitable?
Preferably I would like to send a UDP message over the network to OpenCPN, similar to what is done with the Radar PI plugin.
Possibly I can use the Radar PI plugin directly?
Where can I find the specification for the structure of the UDP message?

I would like to display lines, points or polygons in different color and transparency.
As with a radar image, the elements also need to be deleted/changed later.

As an alternative: Is there a possibility to read the overlay continuously repeated from a file that is updated by another program?

I am very interested in your suggestions?

Many greetings
Baltic_Tobi

What type of LiDAR you are planning to use? Rotating 360 degree like the Velodyne or solid state LiDAR like the Livox one? I suppose you want single return. Range 100m? What precision and accuracy do you need? Heading and perhaps the complete attitude will be interesting. Curious to see outputs running from a rolling platform and returns from sea or spray.
Interesting project..
Keep us informed about - also intermediate - results.
bcn is online now   Reply With Quote
Old 31-05-2021, 07:44   #6
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,631
Images: 2
Re: OpenCPN to display LIDAR based SLAM for autonomous Navigation

Of course Petri [canne] is right!
rgleason is offline   Reply With Quote
Old 01-06-2021, 01:31   #7
Registered User

Join Date: May 2021
Posts: 3
Re: OpenCPN to display LIDAR based SLAM for autonomous Navigation

Quote:
Originally Posted by bcn View Post
What type of LiDAR you are planning to use? Rotating 360 degree like the Velodyne or solid state LiDAR like the Livox one? I suppose you want single return. Range 100m? What precision and accuracy do you need? Heading and perhaps the complete attitude will be interesting. Curious to see outputs running from a rolling platform and returns from sea or spray.
Interesting project..
Keep us informed about - also intermediate - results.
We use multiple Velodyne LIDARs. You are right. The measurement of the lidar is fused with the measurement of an IMU to compensate for the movements of the ship.

I just want to display the result of the data processing of the Lidar in opencpn, i.e. the SLAM based map from google cartographer.

Is there any documentation of the radar plug in interface? I need to know how to pack the UDP messages. I found
https://github.com/opencpn-radar-pi/...icoReceive.cpp
but some explanations would be fine.
Baltic_Tobi is offline   Reply With Quote
Old 03-06-2021, 01:22   #8
Registered User

Join Date: Oct 2011
Location: Apeldoorn
Boat: Ovni 385
Posts: 325
Re: OpenCPN to display LIDAR based SLAM for autonomous Navigation

Quote:
Originally Posted by Baltic_Tobi View Post
We use multiple Velodyne LIDARs. You are right. The measurement of the lidar is fused with the measurement of an IMU to compensate for the movements of the ship.

I just want to display the result of the data processing of the Lidar in opencpn, i.e. the SLAM based map from google cartographer.

Is there any documentation of the radar plug in interface? I need to know how to pack the UDP messages. I found
https://github.com/opencpn-radar-pi/...icoReceive.cpp
but some explanations would be fine.
Sorry for my late reaction, I was traveling.

The radar_pi plugin consists of a back-end and a front-end. The back-end contains all the radar type independent functions, such as the display handling, alarm handling, ARPA, and trails. The front-end contains the radar specific functions. These are the receiving parts and the radar control, the commands to the radar. If we can consider a Lidar as a new radar type, a Lidar_receive.cpp and a Lidar_control.cpp will have to be made. The Lidar_receive.cpp should take care of the radar address handling, and receives the incoming UDP messages. Some of the messages received will be control messages, giving feedback on the settings of the radar. Image information is in messages containing so called radar spokes. A radar spoke is an array of values representing the intensities of the radar returns at an indicated angle and heading. The imaging interface from the receive function to the back-end is implemented by a call ProcessRadarSpoke, passing (a pointer to) the array of intensities, the heading at time of receiving, the relative bearing of the spoke and the time of receiving the spoke. Later in the process the time of receiving the spoke is used to determine the position of the radar at receiving time so that the spoke can be drawn at the right location on the chart. So the radar image as drawn by the back-end is not a complete radar image drawn at the current location. Instead, each individual spoke is drawn at the position at which it was received. For a moving vessel this makes quite some difference at short range. To predict the positions of receiving the spokes (always after the last received GPS position) a Kalman filter is used.

If you have more specific questions that are beyond the scope of this forum, you can mail me at df at percussion.nl.

Douwe Fokkema
Douwe Fokkema is offline   Reply With Quote
Reply

Tags
enc, navigation, opencpn


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multihulls that don't slam zboss Multihull Sailboats 103 17-05-2015 11:39
Request Permission to Come Onboard from Grand Slam Grand Slam Meets & Greets 7 30-03-2012 00:54
For Sale: Slam:Bermuda Hissar Sailing Shorts XL brakauskas Classifieds Archive 0 22-01-2012 18:04
For Sale: Brand New SLAM Ocean Waves Foul Weather Gear Tstullis Classifieds Archive 0 13-10-2011 14:46
Slam Dunk - Brisbane atoll Cruising News & Events 63 01-02-2011 19:26

Advertise Here


All times are GMT -7. The time now is 00:19.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.