Skip to main content
Version: 3.4.0

Appendix - Distributed System

Overview​

SENSR is built with a highly modular architecture. It allows distributing the data processing across multiple machines called Algo Node machines.

architecture

This page will explain how to set up a distributed system across multiple machines.

Setting up a distributed system​

  1. Before starting, ensure that the required dependencies are already installed on the Algo node machine you intend to use. Additionally, ensure that the Master Node machine has access to the Algo node machines.

  2. On the host to be used as a Master node, define the cluster file as defined in the manual here. The cluster file shall contain all the ip addresses and root user/password for all the hosts to be used as Algo nodes. The list can be appended with as many machines as needed.

    ```json cluster.json
    {
    "nodes": [
    {
    "ip": "master_node_computer_ip_address",
    "user_name": "master_node_computer_user_name",
    "password": "master_node_computer_password",
    "is_master": true,
    "supported_worker_apps": ["algo"],
    "name": "master"
    },
    {
    "ip": "node2_computer_ip_address",
    "user_name": "node2_computer_user_name",
    "password": "node2_computer_password",
    "is_master": false,
    "supported_worker_apps": ["algo"],
    "name": "algo_1"
    },
    ...
    ]
    }
    ```
  3. Once all machines have been listed in the cluster file, deploy SENSR on all machines using the following single command: sr-launcher-cli run install -f cluster.json --force.

  4. Deploy the License Server on the Master node: sr-launcher-cli run install license-server. and deploy your license file as indicated here.

  5. Create the cluster to link all machines of the distributed system together: sr-launcher-cli create cluster -f cluster.json c1 -o in the Master node's host.

  6. After creation of cluster, machines will be all bound together and ready to operate together. To run SENSR, enter sr-launcher-cli run sensr in the Master node's host.

  7. SENSR will open in project setup mode. SENSR project

  1. Click on New Algo Node to add the Algo node machine. Click on the Algo Node icon (next to the Algo Node's name) and select the IP address of your Algo node machine. Note that you can select different presets for each algo node. For instance, one algo node can run an indoor preset while the other ones run the outdoor_gpu preset. Each Algo node can use a completely different set of parameters

    Add Algo Node Edit Algo Node

  2. Click on the Algo node’s name to translate, rotate or resize it.

  3. Add lidars to your Algo nodes. Please note that an algo node can only process data coming from the lidars that are connected to it, it cannot process other lidar data under different Algo nodes. Add lidars

  4. Calibrate your site

    • Start with the LiDARs within an Algo Node
    • Finish by adjusting the Algo Nodes together
  5. To ensure that all data is properly time-synchronized between all hosts, all machines' Operating systems must be time synchronized using either the PTP to NTP protocols. The instructions below detail how to synchronize two Ubuntu hosts using the NTP protocol:

Synchronizing Two Ubuntu Machines Using NTP​

To synchronize two Ubuntu machines using the Network Time Protocol (NTP), follow these steps:

Step 1: Install NTP on Both Machines​

Ensure NTP is installed on both machines by running these commands:

sudo apt update
sudo apt install ntp

Step 2: Configure the NTP Server​

Choose one machine as the NTP server and configure it:

  1. Edit the NTP configuration file: sudo nano /etc/ntp.conf

  2. Configure the server:

    • Comment out or remove the default pool servers.

    • Allow your local network to access the NTP server:

    restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

    (Optional) Add the local clock as a fallback:

    server 127.127.1.0 # local clock
    fudge 127.127.1.0 stratum 10
    • Restart the NTP service: sudo systemctl restart ntp

Step 3: Configure the NTP Client​

On the second machine, configure it to use the first machine as its time source:

  1. Edit the NTP configuration file: sudo nano /etc/ntp.conf

  2. Add the NTP server's IP address:

    • Remove or comment out the default pool servers.

    • Add the server's IP:

        server <NTP_SERVER_IP> iburst

    Replace <NTP_SERVER_IP> with the actual IP address.

  3. Restart the NTP service: sudo systemctl restart ntp

Step 4: Verify Synchronization​

On the client machine, check the synchronization status:

ntpq -p

You should see the NTP server's IP address and synchronization status. An asterisk (*) next to the server IP indicates successful synchronization.

Troubleshooting:​

  • Ensure the firewall on both machines allows NTP traffic (UDP port 123).
  • Verify network connectivity between the machines.
  • Check the NTP service status: sudo systemctl status ntp.

By following these steps, you should successfully synchronize the time between two Ubuntu machines using NTP.

Logo
If you need access, please contact