Skip to content

MO-RISE/platform-dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Platform-DEV

These is a collection of Crowsnest services for development and testing.

Get started

This guide is for setting up Crowsnest dev on Ubuntu.

  1. Start container of a local MQTT broker docker-compose -f docker-compose.base.yml up -d

    EMQX default login u:admin p:public
    
  2. Start container of MQTT bridge to RISE cloud MQTT broker

    1. Set wanted MQTT_TOPIC in docker-compose.bridge.yml multiple topics can be added separated by ,Ex. TOPIC_one,TOPIC_two
    2. MQTT_REMOTE_USERNAME={username} MQTT_REMOTE_PASSWORD={password} docker-compose -f docker-compose.bridge.yml up -d
  3. Connect MQTT explorer app to local

    1. protocol: mqtt, host: localhost, port:1883
  4. Connect MQTT explorer app to RISE clound

    1. protocol: ws, host: crowsnest.mo.ri.se, port:443, basepath: mqtt, user & password, encryption(tls)=ON

TODO

  • Upgrade to EMQX V5 (Issue with Auth configuration to allow all)

TO CLEAN

The sensors are eventually interfaced to a crowsnest data bus:

  • Navico radar -> OpenDLV/libcluon -> crowsnest
  • Ouster lidar -> crowsnest
  • Axis cameras -> crowsnest
  • RTL-SDR receivers -> crowsnest
  • WindObserver 65 -> crowsnest

Logging HW onboard:

  • APU (seahorse-0)
  • Server 1 (seahorse-1)
  • Server 2 (seahorse-2)

Remote access

Seahorse can be accessed remotely by RISE when the boat is connected to the Revere lab network by our Sealog-3. The Seahorse has 4G network when outside the lab so the platform will stay connected but SSH into Seahorse will not be possible with current setup.

  1. SSH into sealog-3 ssh sealog-3
  2. SSH from selog-3 into seahorse-0 by ssh revere@192.168.0.89
  3. From seahorse-0 both seahorse-1 and seahorse-2 is accessible:
    • seahorse-1. ssh revere@10.10.0.2
    • seahorse-2: ssh revere@10.10.1.2

Network setup

Connected as:

APU:

  • Ethernet port ? <-> seahorse-1
  • Ethernet port ? <-> seahorse-2
  • SERIAL<-> IMU

Seahorse-1:

  • LIDAR OS2 BOW: (Server) 10.10.42.1 <--> (Sensor) 10.10.42.2
  • RADAR: Ping address to Multicast (Kinda a )
  • GNSS (ANavS): (Server) enp68s0f1 10.10.30.1 <--> 10.10.30.2 (Multicast 239.192.0.3 60003)
  • USB: "/dev/ttyUSB0" <-- WindObserver 65
  • USB ?: SDR
  • USB ?: SDR

Seahorse-1:

  • LIDAR OS2 STERN: (Server) 10.10.41.1 <--> (Sensor) 10.10.41.2
  • LIDAR OS1 STERN: (Server) 10.10.40.1 <--> (Sensor) 10.10.40.2
  • ANAVS: 239.192.0.3 port: 60003 UDP

Not updated bellow

Configuration:

  • netplan config in netplan-platform-landkrabba.yaml
    • Copy file to /etc/netplan/
    • Apply using sudo netplan apply
  • Axis F44 hub assumed to be assigned the static IP 10.10.10.2
  • Ouster Lidar assumed to be assigned the static IP 10.10.20.100 (Note: For setting a static IP, refer to this)

Checks:

  • ethtool enp1s0 should show connected
  • ethtool enp2s0 should show connected
  • ethtool enp3s0 should show connected
  • ping 10.10.10.2 should work
  • ip route show should show a 236.6.7.0/24 route to enp1s0
  • ip route show should show a 10.10.10.2 route to enp3s0
  • sudo arp-scan --interface=enp2s0 10.10.20.0/24 should output:
    10.10.20.100    <MAC address>       Ouster
    
  • ping 10.10.20.100 should work

Configuring Ouster hardware

Using the TCP API:

nc 10.10.20.100 7501
set_config_param <param_name> <value>
.
.
.
reinit
save_config_params

The final configuration of the sensor for this setup is as follows:

{
  "udp_ip": "10.10.20.1",
  "udp_dest": "10.10.20.1",
  "udp_port_lidar": 7502,
  "udp_port_imu": 7503,
  "timestamp_mode": "TIME_FROM_INTERNAL_OSC",
  "sync_pulse_in_polarity": "ACTIVE_HIGH",
  "nmea_in_polarity": "ACTIVE_HIGH",
  "nmea_ignore_valid_char": 0,
  "nmea_baud_rate": "BAUD_9600",
  "nmea_leap_seconds": 0,
  "multipurpose_io_mode": "OFF",
  "sync_pulse_out_polarity": "ACTIVE_HIGH",
  "sync_pulse_out_frequency": 1,
  "sync_pulse_out_angle": 360,
  "sync_pulse_out_pulse_width": 10,
  "auto_start_flag": 1,
  "operating_mode": "NORMAL",
  "lidar_mode": "512x10",
  "azimuth_window": [0, 360000],
  "signal_multiplier": 1,
  "phase_lock_enable": false,
  "phase_lock_offset": 0
}

Note that the Ouster SDK does not yet support multicast (ouster-lidar/ouster-sdk#278) and as such only a single microservice may interface with the Ouster at any given time. As such, only one of the two microservices defined in docker-compose.lidar.yml can be active at any given time depending on the use case.

TODO (if time allows):

Live stream/logging software setup

All of the below assumes a crowsnest setup is already up and running according to the base setup.

Clone this repo to (suggestion): /opt/platform-landkrabba and run as follows:

Sensor interfaces:

  • Only AIS receiver: docker-compose -f docker-compose.ais.yml up -d
  • Only cameras: docker-compose -f docker-compose.cameras.yml up -d
  • Only Lidar: docker-compose -f docker-compose.lidar.yml up -d
  • Only Radar: docker-compose -f docker-compose.radar.yml up -d
  • Only Wind sensor: docker-compose -f docker-compose.nmea0183.yml up -d

Bridges towards Maritimeweb:

  • Only mqtt bridge: docker-compose -f docker-compose.bridge.yml up -d
  • Only webrtc bridge: docker-compose -f docker-compose.webrtc.yml up -d

To handle multiple services simultaneously, use the following syntax:

docker-compose -f docker-compose.<any>.yml -f docker-compose.<any>.yml -f docker-compose.<any>.yml up -d

Logging to disk (using opendlv):

docker-compose -f docker-compose.logging.yml up -d

The logs are rotated using logrotate according to the config found in logrotate.conf. By default, all data will be put in /opt/recordings/. This is NOT recommended since it may fill the OS disk. If you plan on continously log.

To run bandwidth trials

The iftop utility has been used to run some rudimentary bandwidth trials for the connected sensors, such as:

sudo iftop -i <interface> # Interactive output

or

sudo iftop -t -s 60 -i <interface>  # Running for 60 seconds and then outputting textual output only

Note: The above should be issued with the sensors running!

4G connection bandwidth has been trialed with speedtest-cli, such as:

speedtest-cli

Good to know commands

mosquitto_sub -t '#' -F '%U %t %l'

Reinitzilise LIDARs or config

 seahorse-1

nc 10.10.42.2 7501
get_config_param active
set_udp_dest_auto
reinitialize

SOCAT

socat -u UDP4-RECV:60003,reuseaddr STDOUT

239.192.0.3

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published