Skip to content

Public respository for examples and documentation for sonair-evk

License

Notifications You must be signed in to change notification settings

Sonair-AS/sonair-evk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 

Repository files navigation

sonair-evk

The purpose of this public repository is mainly to serve as an example of how to receive pointcloud data from the sonair-evk; and in particular it should serve as an example to build upon if you wish to integrate the sonair-evk pointcloud into an internal system. In order to visualize the pointcloud from a standalone sonair-evk unit you can just use FoxGlove endpoint as described in the sonair-evk Instructions for Use document.

The protocol

The sonair-evk unit will publish the pointcloud, along with a status flag as CoAP messages over UDP. The IP address for these packages is configured by the user on the Sonair Evaluation Kit Configuration page. When used with a ROS publishing node we currently have an arcitecture which looks like this:


                                                 +----------------------------------------------------------+
                                                 |                                                          |
   +--------------+                              |  +-------------+      +-------------------------------+  |
   |              |     +----------------+       |  |             |      |                               |  |
   |  sonair_evk  |-->--|  CoAP message  |---->--|--| CoAP Server |      | ROS Pointcloud publisher node |  |
   |              |     +----------------+       |  |             |      |                               |  |
   +--------------+                              |  +-------------+      +--------------------------------  |
                                                 |          |                                  |            |
                                                 |          +-->--[ Callback(pointcloud) ]-->--+            |
                                                 |                                                          |
                                                 |                                                          |
                                                 +----------------------------------------------------------+

Observe that the outer box on the right denotes a process bouundary, i.e. the CoAP server and the ROS pointcloud publisher node run in the same process, the ROS pointcloud publisher initializes a CoAP server with a callback which the coap server will call for each received pointcloud - in order to pass the pointclouds back to the ROS pointcloud publisher.

The CoAP server

We have written our own little CoAP server which receives CoAP messages from the sonair-evk unit, converts them to a pointcloud description and passes them back to the ROS pointcloud publisher via a callback. The sole reason for doing it like this is that the CoAP server should serve as an example/documentation of how the messages sent from the sonair-evk unit can be converted to a pointcloud. In a production setting it is probably better to use a mature CoAP server, like e.g. aiocoap. We have verified that the setup also works with aiocoap.

The CoAP server is located in the ros/sonair_evk/sonar_evk/coap_server.py. The functionality of the CoAP server coarsely consist of four steps:

  1. We create a socket on the correct port (that is currently hardcoded to 5683) and listen for messages.

  2. We extract the CoAP specific header and assert that it agrees with what the sonair-evk unit sends.

  3. When all the CoAP metadata has been processed the payload from the sonair-evk unit is passed to a free function which converts it to a pointcloud: ros/sonair_evk/sonar_evk/convert_coap_payload_to_pointcloud.py.

  4. The ROS pointcloud publisher callback is invoked with the pointcloud.

Docker

We currently run the ROS pointcloude publisher in a docker container. The docker file we use can be found in ros/Dockerfile.sonair-evk, which can be used as an example.

bash% cd ros
bash% docker build -t ros-sonair-evk -f Dockerfile.sonair-evk .
bash% docker run -p 5683:5683/udp -p 8765:8765 --rm ros-sonair-evk

About

Public respository for examples and documentation for sonair-evk

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •