Interfaces
Mobile beacon ("hedge") interfacing protocol to robots
- Via virtual UART via USB:
- This is the easiest way to connect since no soldering is required and protocol is the same for different operating systems.
- Hedge HW v4.5+ : USB protocol for mobile beacon - description of the USB protocol between mobile beacon and a host device for Windows and Linux
- Via SPI:
- SPI & UART interface pins on beacon board.
- Hedge HW v4.5+ : USB protocol for mobile beacon - description of the USB protocol between mobile beacon and a host device for Windows and Linux
- Python library for beacon:
- Here is the Python code for Linux-based devices integration via virtual UART via USB
- Library is easy to use. Also, here is detailed description and example
- Code is fairly universal; Tested on:
- Ubuntu 16.04
- Raspbian Jessie
- Mac (OS X 10.10)
- Python v2.7
- CRC calculation is done in "pythonic way", i.e. library crcmod is used
- There are handlers of different exceptions, for example, non-standard states of COM/USB
- The Python library provides quick and easy ability for integration of ultrasound navigation system with various linux-based devices. Among them are Raspberry Pi and other single-board PCs. This code is free to use in your applications (please include a reference link to this web page).
- C library for beacon:
- Here is the C code + guiding document
- Supported operating systems:
- Microsoft Windows
- GNU/Linux (including Raspberry Pi)
- Mac OS X
- Additionally, link to Bitbacket repository
- Connection of Marvelmind hedgehog to Arduino via UART and SPI:
- The detailed description of connection to Arduino shield via UART and SPI is described in:
- Hedge HW v4.5+ : the link
- Arduino sample code - sending path to robot
- Arduino sample code - get distances to beacons
- Arduino sample code - UART interface
- Arduino sample code - SPI interface
- The detailed description of connection to Arduino shield via UART and SPI is described in:
- ROS support on Raspberry 2 and Raspberry 3:
- Marvelmind ROS package - bitbucket link.
- Marvelmind ROS package v1.0.6 compatibility and main changes:
- Supports both millimeters and cantimeters (obsolete) formats of data
- Supports hedgehog address in data stream. Can receive positions of multiple hedgehogs from modem
- Supports receiving positions of stationary beacons
- Supported ROS versions:
- Kinetic for Ubuntu 16.04
- Indigo for Ubuntu 14.04
- Hydro for Ubuntu 12.04
- Please, check the instructions on ROS integration.
- ROS repository status.
- Hints:
- By default UART is not accessable. Use command: sudo chmod 0777 /dev/ttyAMA0 to enable it
- Or a more elegant way: Set permissions for serial port by this instruction: http://raspberrypi.stackexchange.com/questions/48211/set-permission-for-dev-ttyama0-on-boot
- Set correct UART speed on mobile beacon: Dashboard => Interfaces shall be set to 9600 bit/s
- Additional hints:
- Pixhawk support and NMEA interface description:
- Please, check the instructions on Pixhawk integration and description of interfacing via NMEA0183 protocol.
- Forum on PixHawk integration. There are more topics, though. Check the forum
- Sending path to your robot/copter:
- Here is an explanation how to send path data via mobile beacon to your robot/copter sample code.
- Protocol description => 2.3.1. Request of writing the movement path
- Relevant forum discussion
Modem and dashboard interfaces
It is possibly to get location data not only from the mobile beacon, but directly from the modem or the Dashboard:
- Protocol of data exchange with modem via USB interface: link
- The Dashboard software log description: forum link or direct link to the image. First column appeared later, and it is discussed in this topic. It is an additional absolute column - a timestamp - time in milliseconds passed from january,1 of 1970 (UNIX time) - Dashboard SW permanently writes coordinates into log file 'hedgehogs.log' that is stored into the Dashboard folder
- Protocol of data exchange with Dashboard via UDP: link
- UDP SW example:
- Here is the C-written UDP example
- Supported operating systems:
- Microsoft Windows
- GNU/Linux
- Supported streaming as well as master-slave mode
- Marvelmind modem C library and sample code:
- Here is the Marvelmind modem C library and sample code instructions
- Here is the C-written sample code