Skip to content

nino192/Marinero-Localization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Marinero identification and localization

Code in this repo implements a single-anchor solution for identification and localization of ships in a marina using Bluetooth Low Energy technology. Ships are identified and localized using AoA (Angle of Arrival) of the incoming signals from the transmitters placed on them. Following image shows the idea behind ship identification:

Code in this repo is intended to be used with the following hardware:

The block diagram of this application is shown in the image below:

Repository components

NCP_Host

This folder contains code intended to be run on Host PC. Marinero_bt_AoA_host is an application similar to bt_aoa_host_locator but with added marinero_distance.c and marinero_positioning.c. Marinero_distance.c contains function calculate_avg_rssi for RSSI filtering in real-time and function marinero_calculate_distance for distance calculation using RSSI.

NCP_Target

This folder contains code intended to be flashed onto BG22-PK6022A. Code could be flashed by using either SimplicityStudiov5 (https://www.silabs.com/developers/simplicity-studio) or by using a VSCode extension for flashing SiliconLabs boards (https://www.silabs.com/developers/simplicity-studio/visual-studio-code-plugin). This code is the same as NCP_Target example in SimplicityStudiov5.

SoC_Tag

This folder contains code intended to be flashed onto BGM220-EK4314A. Code could be flashed by using either SimplicityStudiov5 (https://www.silabs.com/developers/simplicity-studio) or by using a VSCode extension for flashing SiliconLabs boards (https://www.silabs.com/developers/simplicity-studio/visual-studio-code-plugin). This code is the same as SoC_Tag example in SimplicityStudiov5.

marinero_ros2

This folder contains ros2 integration of said application. Package marinero_parse contains parsers for converting data into ros2 standard messages, marinero_launch contains a launchfile for the parsers, marinero_detect contains a node that identifies the nearest ship and marinero_msgs contains a custom AoA ros message. Mqtt_params package contains a .yaml files for configuring mqtt2ros2 bridge (https://github.com/ika-rwth-aachen/mqtt_client).

Ros2 package structure is shown in the diagram below:

Installation

Requirements:

Optional:

Usage

Running NCP_Host

  1. With BG22-PK6022A plugged into Host PC (via USB), build project from Marinero-Localization/NCP_Host/app/bluetooth/marinero_bt_AoA_host folder with make and then:
cd exe
./marinero_bt_AoA_host -u /dev/ttyACM0 -c ../config/marinero_locator_config.json
  • '-u' parameter describes the port USB is plugged in
  • '-c' parameter is the path to locator configuration file
  1. Running mqtt-explorer for preview, from command line:
mqtt-explorer

And then configure:

  • Host = localhost
  • Port = 1883

Running ROS2 commands

  1. First navigate to Marinero-Localization/marinero_ros2 and then build and source the packages. Running mqtt_client (mqtt2ros2 bridge):
  • if running in 'POSITION' mode (see Configuration files section for details):
ros2 launch mqtt_client standalone.launch.ros2.xml params_file:=Marinero-Localization/marinero_ros2/src/mqtt_params/mqtt_params_position.yaml
  • if running in 'ANGLE' mode:
ros2 launch mqtt_client standalone.launch.ros2.xml params_file:=Marinero-Localization/marinero_ros2/src/mqtt_params/mqtt_params_angle.yaml
  1. Running marinero_parse, which parses positions into PoseStamped messages ('POSITION' mode) and angles into custom Aoa message, containing azimuth, elevation and distance data:
  • if running in 'POSITION' mode:
ros2 launch marinero_launch parser_launch.py
  • if running in 'ANGLE' mode:
ros2 launch marinero_launch parser_launch.py "mode:='angle'"
  1. Running marinero_detect, which returns tag_id of the transmitter identified as the closest (ONLY RUN THIS IN 'POSITION' MODE):
ros2 run marinero_detect detect_closest

Configuration files

Configuration file marinero_locator_config.json located in Marinero-Localization/NCP_Host/app/bluetooth/marinero_bt_AoA_host/config folder describes parameters of the BLE reciever. Notable parameters are:

"cteMode" - describes the current BLE connection mode, can be:

  • CONN - standard BLE connection is established between devices
  • CONNLESS - BLE connection is not established, CTE info is sent via advertising packets
  • SILABS - BLE connection is not established, CTE info is sent periodically via advertising packets

"cteLength" - length of the CTE in microseconds, length (μs) = cteLength * 8

"reportMode" - can be either IQ, ANGLE or POSITION; describes which data will be published on MQTT broker

"allowList" - IDs of tags which reciever recognizes

"azimuthMask" - describes an angle range in which azimuth angles are discarded

"elevationMask" - describes an angle range in which elevation angles are discarded

Resources

This project is a part of my master thesis which can be found here:

https://repozitorij.fsb.unizg.hr/islandora/object/fsb%3A10844

SiliconLabs hardware datasheets can be found here:

https://www.silabs.com/development-tools/wireless/bluetooth/bgm220-explorer-kit?tab=overview
https://www.silabs.com/development-tools/wireless/bluetooth/bgm22-pro-kit?tab=overview

About

Localization of boats in marinas using BLE AoA technology

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors