In the October Demo image, we have enabled SPI in the kernel to allow HoverGames participants to communicate with SPI devices. The October Demo image will be released soon.
This page is a work in progress.
Downloading & Flashing the HoverGames-Demo Linux Image
Preparing the image
The HoverGames images come as a .bz2 compressed archive. To decompress this image, you'll need to use a program like 7zip on Windows, use the bunzip2 command on Linux, or double click the archive on Mac.
Flashing the image to eMMC or SD card using UUU
Downloading UUU
NXP has a tool for flashing i.MX hardware called UUU (Universal Update Utility). You can download UUU from here:
It is recommended to download the "Latest Release", not the "Pre-Release" at the top of the page.
If you're on Windows, you'll want to download the uuu.exe file, and if you're on Linux, you'll want to download the uuu file.
Downloading the Linux image
You must agree to all of the applicable licenses and agreements at the following link before downloading the Linux software. It is hosted here:
Downloading the bootloader
NOTE: This file is only needed for flashing with UUU to the eMMC/SD Card. If you want to flash your SD Card with dd or Win32DiskImager, this file is not needed.
Step 1
Flip the DIP switches on your NavQ to put it into USB flashing mode (boot from USB in the image below). Here is an image that shows how to do so:
Once you're done flashing, you can use this image to select the boot mode: eMMC or SD card.
Step 2
Connect your NavQ using the included USB-C cable to your computer. You should recieve a message on your computer that it has been connected. To make sure the NavQ is connected, you can run the UUU program with the -lsusb flag and you should see an output similar to this:
Step 3
You can flash both the SD card and the eMMC using this tool. The keyword for flashing the SD card is sd_all, while the keyword for flashing the eMMC is emmc_all. The command to flash your board is outlined below:
There are advantages and disadvantages to each storage medium. eMMC is faster, but is locked to 16GB size and is non-removable. SD cards can be of any size you like and are removable, but they are quite a bit slower.
After a few moments, your board should be flashed. Unplug your NavQ from power, reset the DIP switches to the desired boot device, and you're good to go!
Flashing the image to SD card using dd or Win32DiskImager
To flash the image, you'll need to use dd on Linux/Mac or Win32DiskImager on Windows.
Linux
Replace the X in "/dev/sdX" with the letter of your SD card in linux. You can use a program like "GParted" or "Disks" to find the letter of your SD card.
Mac
Replace the X in "/dev/rdiskX" with the number of your SD card in Mac. You can use diskutil list to find the number of your SD Card.
Windows
Download Win32DiskImager:
Currently the HoverGames-Demo Linux image is packaged as a .img file. In future releases, it may be packaged as a .wic.bz2 file. If it is packaged as a .wic.bz2 file, you'll want to extract the .bz2 file before flashing using Win32DiskImager.
Open the program and select your SD card. Choose the .wic OR .img file, then click "Write".
Power input
Power input specification
The NavQ can take a voltage of 5V to 20V.
The board may also be powered via USB- which also has a 20V max input rating.
Note that while the voltage regulator on the external JST-JH power connector has absolute max rating is 26V. According to the schematics, there is a 20V TVS Diode (PTVS20VS1UR) at that input before the regulator (MP8759GD), with a breakdown voltage of 22.2V to 24.5V according to the datasheet.
Any experimentation above 20V input should take this into account and be done at your own risk.
Power input protection
There is some, but limited power input protection on board. Given this is typically for USB-C application, it may not be sufficient in harsh operating environments. You may want to provide some additional reverse polarity protection, over-current, or DC-DC conversion/isolation from the battery if you expect to be experimenting outside the HoverGames normal operating range or treating it harshly.
Battery supply protection
Please monitor your LiPo battery carefully for undervoltage conditions. If left connected, the NavQ and HoverGames drone will completely drain your LiPo battery and could cause permanent damage to your battery. There are no undervoltage disconnect provisions built in.
Low battery monitor
A simple solution to undervoltage protection may be to add a hobby grade low battery monitor alarm. These sound a loud alarm when any cell goes below a user set threshold voltage. The LED display will also show the individual cell voltage and total pack voltage. This plugs into the balance connector of the LiPo battery. They are inexpensive and available at hobby stores or online at typical outlets. Here are some examples:
Amazon - ""
Amazon - ""
Linux
-----
$ ./uuu -lsusb
Windows
-------
$ .\uuu.exe -lsusb
Output
------
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.3.191-0-g4fe24b9
Connected Known USB Devices
Path Chip Pro Vid Pid BcdVersion
==================================================
2:7 MX8MM SDP: 0x1FC9 0x0134 0x0101
Linux
-----
$ ./uuu -b [emmc_all|sd_all] <.bin-flash_navq> <.wic.bz2 OR .img>
Windows
-------
$ .\uuu.exe -b [emmc_all|sd_all] <.bin-flash_navq> <.wic.bz2 OR .img>
$ sudo dd if=<path to .wic file> of=/dev/sdX bs=1M status=progress
[WIP] A guide on communicating over CAN/SLCAN using NavQ and UCANS32K146
Introduction
If you're thinking about using the CAN protocol on your drone, this guide will walk you through using our UCANS32K146 to create a CAN interface.
Since there isn't a native CAN bus on the NavQ, we can use a protocol called SLCAN to communicate CAN messages across a UART connection. We have built a binary for the UCANS32K146 that acts as an SLCAN transfer layer. This means that we can add a CAN bus to NavQ by just connecting the UCANS32K146 to the UART3 port.
Diagram of setup
Setting up SLCAN on NavQ
SLCAN support is enabled in the October image coming out this month.
To enable SLCAN on NavQ, run these commands:
Now you can use SocketCAN or python-can to send and recieve CAN messages over the slcan0 interface. As an example, here is how to send a CAN message from the command line:
Flashing your UCANS32K146 with the SLCAN conversion binary
This binary is not yet available. This page will be updated with a link to the binary when it is ready.
Follow the guide at the link below to flash the SLCAN binary to your UCAN board:
$ sudo modprobe slcan
$ sudo slcand -o -t sw -s8 /dev/ttymxc2 -S 115200
$ sudo ip link set up slcan0
$ cansend slcan0 123#deadbeef
Detecting AprilTags with ROS2
[WORK IN PROGRESS]
Overview
NOTE: This guide is currently a work in progress. Some details may not be finished.
In this section, we will guide you through the process needed to detect AprilTags on your NavQ. There are a few things that need to be done to accomplish this:
Install ROS2 image tools
Build and install AprilTag detection nodes
Calibrate the camera on your NavQ using a checkerboard pattern
Prerequisites
Before we start, you will need a few things:
Checkerboard
To create a checkerboard for camera calibration, download this PDF:
Desktop Setup
In order to calibrate the camera, you will need to set up your NavQ with a mouse, keyboard, and monitor. Use the included microUSB hub and HDMI connector to do so.
Installing required ROS2 software
Install the following packages with the apt package manager by running the commands below:
Once that is finished, move on to the next step.
Calibrating the camera
This section is a consolidation of the specific commands for the NavQ. If you run into any issues with this section of the guide, email landon.haugh@nxp.com and refer to the official guide:
Hook up your NavQ to a monitor with the provided HDMI cord and connect a USB mouse + keyboard through the included microUSB hub. Open the terminal by clicking the icon at the top left of the screen and open the bash shell by running:
Have your printed checkerboard ready in a well lit environment and run the camera calibration software by running the following commands:
Now use the link in the note above to run through calibarating the camera.
Detecting AprilTags
Building apriltag_msgs
A prerequisite for the apriltag_ros node is apriltag_msgs. Clone the repo and build it by running these commands:
Make sure to source the install/setup.bash file so that apriltag_msgs can see it when being built.
Building the apriltag_ros node
First, in order to detect AprilTags, we need to build the apriltag_ros node written by christianrauch. You can clone his repository by using this git repo:
To make his repo work with ROS2 Foxy, you will need to make a small change in the CMakeLists.txt file. Go to line 26 in that file and delete the apriltag:: token in the AprilTagNode apriltag::apriltag part.
Next, you'll want to save that file and run colcon build in the apriltag_ros folder. Once it is done building, you'll want to source the install/setup.bash file. Add this line to your .bashrc:
Creating a new package to concatenate camera information to each camera frame
In order to make the apriltag_ros node work, we need to make sure that camera info messages are being sent in sync with each camera frame published by the cam2image node. We have written an example node that does just that. You can download it here:
You will need to replace the matrices in the node file to match your camera calibration parameters. The source file is located at pypysub/py_pysub/publisher_member_function.py. Once you have done that, make sure to build and install the node and source the install/setup.bash file.
Running the code
To run the code, you'll need to run the following ROS nodes:
Streaming Video to QGroundControl using NavQ over WiFi
Prerequisites
Devices required
In this guide, we need a few things:
NavQ Companion Computer mounted with Google Coral Camera attached
Laptop/Phone with QGroundControl Installed
Both NavQ and mobile device connected to the same WiFi network
Setting up QGroundControl
In QGroundControl, click the Q logo in the top left, and configure the video section as seen in the image below:
This will set up your QGroundControl instance to receive the UDP video stream from the NavQ.
Connecting your NavQ to your router and getting IPs
Follow the WiFi setup guide using connman in the Quick Start guide to connect your NavQ to the same router as your mobile device. You will need to use the serial console to do this. Once you have your NavQ connected, you can run ifconfig in the serial console to find the IP address of your NavQ.
You can SSH into the NavQ to run the GStreamer pipeline once you have the IP.
Running the GStreamer pipeline
With your NavQ on, SSH into it by using the IP address you noted when connected to the serial console. Once you're successfully SSHed in, you should note the IP address that you logged in from as seen here:
This is the IP of your computer that you should be sending the video stream to.
To run the GStreamer pipeline, run the following command:
Make sure to replace the 'xxx.xxx.xxx.xxx' with the IP you noted when first SSHing into the NavQ.
Once you run that command, you should be able to see the video stream from your NavQ on QGroundControl!
To take a picture on your NavQ using GStreamer, run the following command:
To take video, you can run the following pipeline:
Ad-Hoc Streaming using Mobile Hotspot
Configuring Windows
Step 1 - Enable Mobile Hotspot
You must have a WiFi adapter in your Laptop/PC to follow this guide.
To enable Mobile Hotspot on Windows, go to Settings->Network & Internet->Mobile Hotspot. Next, you'll want to edit your mobile hotspot settings to set a password and SSID. Once you've done this, you can enable Mobile Hotspot. You can see a full configuration in the screenshot below.
Mobile Hotspot setup in Windows with imx8mmnavq connected
Step 2 - Enable Port 5000/5600 in Firewall
By default, port 5000 or port 5600 is not open in the Windows firewall, so any UDP stream packets will be blocked. To enable this, go to your Windows search bar, and type "Firewall". Select "Windows Defender Firewall".
Once you open Windows Defender Firewall, you'll want to navigate to "Advanced Settings" from the menu on the left.
You will then be brought to a new window with Windows Firewall rules. To create a new rule for QGC streaming, you'll need to click "New Rule" on the right side.
You will be brought to a new window to add a rule. Select "Program" and click "Next".
At the next window, it will ask you to specify the program you are adding a rule for. Paste the following into that field and click "Next":
Once you've done this, you can click "Next" through the rest of the fields and you should be good to go.
On the page that tells you to name your rule, just name it "QGroundControl".
Step 3 - Connect NavQ to new Mobile Hotspot
To connect your NavQ to your new Mobile Hotspot, follow the connecting to WiFi guide in the Gitbook here:
Step 4 - Stream to QGroundControl
Now you can stream to QGroundControl as you normally would. Follow the guide here:
Configuring Ubuntu
Step 1 - Enable Wifi Hotspot
To enable a WiFi hotspot in Ubuntu 20.04, you'll first need to go to Settings->WiFi. Then, at the top right, click the 3 dots button and select "Turn On Wi-Fi Hotspot...".
After you click that entry, this window will pop up. Enter a network name and password, and you should be good to go! Follow Steps 3 and 4 in the Windows section above to configure your NavQ.
The HoverGames Interposer Board has a large amount of connectors and I/O for you to connect your devices, sensors, switches, LEDs, and more. This section will give you an overview of the connector pinouts on the HGI. The picture below has a few silkscreen labels for pinouts on each connector, but some connectors have multiplexers to make them more flexible.
Overview of the HoverGames Interposer Board
UART2
UART2 is used for the serial monitor, and should not be used for anything other than the serial monitor. It should not be altered.
UART3
UART3 will mainly be used for serial communication to the FMU in HoverGames, but it can be used as an SPI port if you're not using it for the drone.
UART4/I2C/GPIO
The bottom 9 pin JST-GH connector in the image of the HGI is used for UART4/I2C/GPIO.
The UART4 port on this connector is tied to the ARM Cortex-M4 core. It is not available for use in Linux.
The UART4 pins do not have flow control on this connector. There is no multiplexing on this connector as well. The pinout is below.
Linux GPIO Pin IDs
SPI/GPIO
The SPI/GPIO port has a full pinout for SPI as well as 3 GPIO pins. The SPI pins can be muxed to a full UART 4 port with flow control. The pinout is below.
Linux GPIO Pin IDs
GPIO Headers
The GPIO header pads on the HGI are not labeled correctly with the silkscreen. The layout is shown below with TP labels and schematics.
GPIO Pin (JST-GH Pin)
Linux GPIO ID
GPIO1_IO10 (6)
10
GPIO1_IO12 (7)
12
GPIO1_IO14 (8)
14
GPIO Pin (JST-GH Pin)
Linux GPIO ID
GPIO1_IO11 (6)
11
GPIO1_IO13 (7)
13
GPIO1_IO15 (8)
15
GPIO Pin Labels
GPIO pinout for labels
NavQ
NavQ Linux companion computer platform with Vision for Mobile Robotics based on NXP i.MX 8M Mini SOC. Found at: https://nxp.gitbook.io/8mmnavq/
NavQ was used in HoverGames2 program and this document is supporting information. However it was not commercialized. The NavQPlus (NavQ+) is the replacement upgraded version of NavQ available on NXP.com and through global distributors.
Note that some software and information here is still completely relevant to NavQPlus
NavQ may also be referred to as: 8MMNavQ, MR-8MMNavQ or RDDRONE-8MMNavQ
NavQ Mounted on HoverGames drone
Also take a look at some of our other Gitbooks:
- newer supported version, available on NXP.com
challenges
The 8MMNavQ is a small purpose built experimental Linux computer based on the . It is focused on the common needs of Mobile Robotics systems.
The system is built as a stack of boards, the top board being a SOM (system on module) containing the Processor, memory and other components with strict layout requirements, and where the secondary boards are relatively inexpensive (often 4 layer boards) and allows for versions with customization to be easily built.
This is a new set of boards and software enablement and will undergo several iterations. Our intent is to provide a "friendly Linux" with typical packages and additional tools included rather than the typical highly optimized and stripped down Linux found in deeply embedded products.
Please check for Linux updates regularly. Feedback and needs will be incorporated and updated as much as possible and reasonable.
There is a
And a general here.
The 8MMNavQ features:
NXP i.MX 8M Mini SOM with LPDDR4 DRAM and eMMC Flash.
A secondary board with SDCARD, Networking, MIPI-CSI (Camera) and MIPI-DSI (Display) interfaces
MIPI-DSI to HDMI converter
Applications
The NavQ is suitable for many purposes, including generic robots and various vision systems.
Drones, QuadCopters, Unmanned Aircraft, VTOL
Rovers
Road going Delivery Vehicles
Two specific complete developer tool examples are the , and the NXP-CUP car.
The NavQ was prepared with the intention of working with and supporting the NXP HoverGames Drone program
Software
The intent of the 8MMNavQ in HoverGames is to enable participants with a solution that allows them to harness common robotics packages and libraries such as:
ROS
OpenCV
GStreamer
The 8MMNavQ runs linux with a package manager, so you should be able to install the packages that you need to complete your projects successfully and efficiently.
This work is licensed under a .
NavQ Examples with NXPHoverGames Drone
Here are a few videos of some of the capabilties of NavQ:
NavQ is a companion computer reference design for HoverGames and commercial development of drones and rovers.
NXP HoverGames Drone Software Competition
While the 8MMNavQ is a standalone computer, it has been designed with NXP HoverGames coding competition in mind. And specifically the NXP KIT-HGDRONEK66 using the RDDRONE-FMUK66 flight controller.
As a result of HoverGames planning, the NavQ also makes a great companion computer for many other PX4 or Ardupilot flight controllers
specific features include
NavQ can connect to HoverGames (RDDDRONE-FMUK66)
via serial
via Ethernet (using 100BaseT1 2 wire ethernet adapter)
Hardware Overview
NavQ SOM
The SOM includes the processor, RAM, memory, and WiFi chip for the NavQ.
Disclaimers
NavQ as provided is an experimental board
NXP Friendly Linux is experimental and in development
NXP, EMCRAFT AND SOFTWARECANNERY, provides the enclosed product(s) under the following conditions:
This reference design is intended for use of ENGINEERING DEVELOPMENT OR EVALUATION PURPOSES ONLY. It is provided as a sample IC pre-soldered to a printed circuit board to make it easier to access inputs, outputs, and supply terminals. This reference design may be used with any development system or other source of I/ O signals by simply connecting it to the host MCU or computer board via off-the-shelf cables. Final device in an application will be heavily dependent on proper printed circuit board layout and heat sinking design as well as attention to supply filtering, transient suppression, and I/O signal quality.
The goods provided may not be complete in terms of required design, marketing, and or manufacturing related protective considerations, including product safety measures typically found in the end product incorporating the goods. Due to the open construction of the product, it is the user's responsibility to take any and all appropriate precautions with regard to electrostatic discharge. In order to minimize risks associated with the customers applications, adequate design and operating safeguards must be provided by the customer to minimize inherent or procedural hazards.
For any safety concerns, contact NXP, EMCRAFT AND SOFTWARECANNERY, sales and technical support services. Should this reference design not meet the specifications indicated in the kit, it may be returned within 30 days from the date of delivery and will be refunded replaced by a new kit. NXP, EMCRAFT AND SOFTWARECANNERY, reserves the right to make changes without further notice to any products herein.
NXP, EMCRAFT AND SOFTWARECANNERY, makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does NXP, EMCRAFT AND SOFTWARECANNERY, assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. Typical parameters can and do vary in different applications and actual performance may vary over time. All operating parameters, including Typical, must be validated for each customer application by customer’s technical experts.
NXP, EMCRAFT AND SOFTWARECANNERY, does not convey any license under its patent rights nor the rights of others. NXP, EMCRAFT AND SOFTWARECANNERY, products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the NXP, EMCRAFT AND SOFTWARECANNERY, product could create a situation where personal injury or death may occur.
Should the Buyer purchase or use NXP, EMCRAFT AND SOFTWARECANNERY, products for any such unintended or unauthorized application, the Buyer shall indemnify and hold NXP, EMCRAFT AND SOFTWARECANNERY, and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges NXP, EMCRAFT AND SOFTWARECANNERY, was negligent regarding the design or manufacture of the part.
via USB (requires specific configuration)
RGB LED onboard for status reporting
USB-C console for debugging
Power input via USB-C or JST-GH power header
MicroUSB port for peripherals (hub, usb cameras, sensors)
IX industrial Ethernet jack
Serial ports using JST-GH connectors
I2C/SPI port using JST-GH connectors
3 wire LED strip connector with power supply
Wifi and Bluetooth
MIPI Camera intereface (Google Coral Camera default)
eMMC and removable SDCard memories
MIPI DSI for display (particularly for Rover applications)
The NavQ SOM (System on Module) contains the brains of the NavQ. On this board, we have our i.MX 8M Mini processor, 2GB of LPDDR4 memory, 16GB of eMMC flash storage, and a QCA9377 WiFi AC + BT 5.0 chip. There are connectors on the bottom of this board that allow for modularity.
Components
Name
Details
NXP i.MX 8M Mini Processor
Quad ARM Cortex-A53, Cortex-M4 @ 1.8GHz
LPDDR4 Memory
2GB
eMMC Flash
16GB
Qualcomm WiFi/BT
802.11ac + BT 5.0
Dimensions
The NavQ's dimensions are 3" W x 2" L x 7/16" H.
Media Board
Summary
The Media Board consists of an SD Card slot, MIPI connectors for a camera serial interface as well as a display serial interface, and a PCIe connector.
Components
Name
Details
SD Card slot
MicroSD card compatible
MIPI CSI
Google Coral Camera connection
MIPI DSI
MIPI to HDMI adapter for full desktop
Image of Google Coral Camera + MIPI to HDMI Adapter:
Google Coral Camera Dimensions
The Google Coral Camera dimensions are 25mm x 25mm, as shown in the tech specs here:
The HoverGames Interposer Board (HGI) is the final board in the stack and has a multitude of I/O for your needs in HoverGames. Connect sensors, switches, and LEDs to the NavQ using the HGI to drastically improve your drone system, and even control your drone using NavQ using offboard control with MAVROS.
Components
Name
Details
UART
3 UART ports for serial communication through JST-GH connectors.
USB-C
Powers the board and serves as an interface for flashing new firmware.
MicroUSB
Connect USB devices to this port such as keyboards and mice. USB hub included.
SPI
JST-GH connector for SPI interface.
Hirose IX Industrial Ethernet
IX Industrial ethernet cable is included.
Revisions and Errata
Fault_N on USB C chips
Board
Rev
Item
RDDRONE-
HGI-1A
PTN5110 FAULT_N should be pulled up
and connected to INT of NX20P4383UK
Action - Mask this interrupt in the register FAULT_STATUS_MASK (0x15h):bit 4 -- Force Discharge Failed Interrupt Status Mask (to be zeroed).
Resolve in the software, since both the PTN5110 (TCPC) and NX20P3483 (power switch) connected to the I2C bus.
Polling of the NX20P3483 will address this errata.
This issue will be resolved in the next board revision (RDDRONE-HGI-2A)
SD 3.0 Power Switch is missing
Action - disable SD3.0 support in UBoot and/or avoid SD3.0 cards
This issue will be resolved in the next board revision (RDDRONE-MEDIABOARD-2A)
The SD3.0 PWR switch will be added:
3rd Mounting hole on carbon fiber plate
Issue - The 3rd mounting hole for the NavQ was missed on the carbon fiber mounting plate. This is needed to secure the board and avoid vibrations.
Action - Please drill a 3mm hole manually or use double sided tape on this side of the baord mounting. This must be done to avoid vibration of the board during flight.
Schematics
If you would like to take a look at the schematics of each board in the NavQ, you can download the .zip file at the bottom of this page. The table below gives detail for each folder inside the .zip file.
Schematic for the MIPI HDMI board
RDDRONE-T1ADAPT
Schematic for the 100BaseT1 2-Wire Automotive Ethernet Adapter board
Folder Name
Description
RDDRONE-8MLPDDR4
Schematics for the top SoM board, with the CPU, RAM, eMMC, and WiFi/BT chips
RDDRONE-HGI8MM
HoverGames Interposer Board schematics with GPIO, UART, i2C, SPI, HiRose IX Industrial Ethernet, and more
RDDRONE-MEDIA8MM
Media Board schematics with MIPI CSI/DSI, PCIe, and SD Card
JST-GH connector for 2-wire ethernet as well as GPIO.
JTAG
Pads are available for JTAG. You may solder your own JTAG connector.
Boot Mode Switches
You can use these switches to boot from eMMC or SD card, or boot into fastboot.
GPIO
Through-hole points for GPIO headers.
RGB LED
WS2811 RGB LED available for status
Board
Rev
Item
RDDRONE-
MEDIA-1A
The design is missing a power switch required by the SD 3.0 standard
NavQ add on modules
These components are designed to interface and work with the NavQ.
Unless otherwise indicated, the following add on modules are not included with the NavQ HoverGames 2 kit (HG2).
In addition They may not all be available, and may be experimental in nature.
USB-UART serial debug console (included with HG2 Kit)
LTE CAT-M1 cellular modem
PMDTEC Time of Flight (TOF) Camera
Lighthouse tracking module
NXP 100BaseT1 2-wire Automotive Ethernet
Edgelock SE050 Secure Element
5" high resolution MIPI-DSI LCD
MIPI-DSI to HDMI adapter
PCI.e M2.Module - Kingston SSD
Non contact gesture tracking module
Kingston eMMC, LPDDR4, Industrial SDCARD
RJ45 breakout.
Quick start Guide
Guide to get the 8MMNavQ up and running quickly
Getting started with your NavQ kit
The NavQ is a device that will allow you to add extra compute to your HoverGames drone system. With an i.MX 8M Mini processor, you will be able to reach new boundaries of vision and sensor data processing.
LTE Cat M1 modem
This is a Murata Type1SC LTE CAT M1 Cellular Modem and is a low bandwidth solution for IOT.
This LTE Cat M1 modem is a small form factor module for development that includes the PX4 type connectors suitable for connection with the NavQ.
Note that at this time any software for this module is the responsibility of the user. Murata and Emcraft may have example or reference code to follow.
Details may be found here:
5" LCD panel module
For development, use on a rover or ground station there is a 5" LCD panel that can attach to the NavQ MIPI DSI output.
Specs: <TODO>
Current HW SW status
Rolling updates on the status of hardware and software
Hardware
5/10/2020 - Production Hardware in manufacturing
RDDRONE-T1ADAPT
100BaseT1 2-Wire Automotive Ethernet media converter
Additional RDDRONE-T1ADAPT media converter details can be found here:
Software
October demo update
The changelog for the October Demo Image update is as follows:
Added support for SLCAN devices
Added SPI support through the userspace SPI driver "spidev"
Fixed issues with SDMA firmware loading
Fixed an issue with Bluetooth sometimes not working after a reboot
NavQ development updates
As of July 17 2020:
<u> 20.04 image is fully working with package manager, ROS, UART, WiFi, etc.
As of July 8 2020:
An <u> 19.10 image was built and tested with the Google Coral camera. A picture was successfully taken using this image. A working image with the following features should be finished Soon™:
Gstreamer + OpenCV w/ working camera
UART communication to NXP RDDRONE-FMUK66 for Offboard control using MAVROS (not from)
WiFi connection for communication with NavQ
Would enable streaming video back to base station for processing as well as creating in-house user interfaces for controlling the HoverGames drone
As of July 7 2020:
NXP Yocto Debian image
3rd party <u>-like image
Works, can install ROS/OpenCV, but most hardware doesn't work (camera, hdmi, etc)
3rd party Debian image
EmCraft Linux image
Works, has desktop, has OpenCV/Gstreamer, no ROS
Current Demo build version
The current Demo build was built on 7/24/2020. Confirm you are on the correct image by running uname -a. You should get the following output:
Notice about SD Card Slot
The SD Card slot on the NavQ is sandwiched between the Media Board and the HoverGames Interposer Board. There are several important components underneath the SD card slot. We highly recommend that you be very careful when using the SD card slot so the components are not damaged. One notable component is the USB controller - it is quite small, so if it gets damaged, you won't be able to use USB devices over the MicroUSB port. One way to be safe when inserting or removing the SD card is by using some tweezers as seen in the image below.
Be very careful when inserting or removing the SD Card!
Default username/password for the Demo image
The SD card included in the NavQ kit is preloaded with our HoverGames-Demo Linux distribution. The default username and password are:
Username: navq
Password: navq
Powering the NavQ
To power your NavQ, there are two options. The first is to use one of the included USB-C cables and connect it to a USB port on your computer.
Location of USB-C Port on the NavQ.
The other option is to power it through one of the included connectors in your NavQ kit. These connectors plug into the 5-pin POWER port next to the boot switches on your NavQ. You may use the barrel connectors or the XT60 power breakout connector. Some images and more details can be found here:
Accessing the serial console
To access the serial console on your NavQ, attach one of the included USB-C cables to the USB->UART adapter included in your kit. You can use programs such as PuTTY to access the serial console. A full guide to do this is linked below.
Expanding the SD card
When your board arrives, the Demo image will already be loaded to the SD card. This image does not take up the full amount of space on the SD card, so you'll need to expand the space in order to install more packages such as ROS or OpenCV. Follow the guide here to do so:
Mounting your NavQ to the HoverGames Drone
Follow the guide linked below to mount your NavQ to your drone:
Using your NavQ as a desktop computer
Depending on which Linux distribution is loaded, you may find that the NavQ includes a desktop application. This may be a minimal desktop with only a terminal emulator or it may be more feature rich like Liri Desktop.
Liri Desktop is not yet supported. Currently we only have a basic Wayland desktop with a terminal. You can run GUI applications through the terminal. Try installing firefox with apt and run it!
MIPI-DSI to HDMI adapter
The signaling is output on the MIPI-DSI port and if a compatible LCD panel is attached, then it would be visible there. Most of us will have access to a standard HDMI monitor, and there is a MIPI-DSI to HDMI adapter included in the kit also.
Connecting a mouse and keyboard
In order to connect both a mouse and keyboard to the NavQ you will need to connect the included microUSB to USB-A hub. Other USB peripherals may also be supported but need to be tested as it is not guaranteed that all USB drivers will be available.
Recording a video with NavQ
GStreamer
You can use GStreamer to take 1080p 30fps video. This uses the included H264 encoding plugin for i.MX 8M Mini. Here's an example pipeline you can run on your NavQ to take video:
When you want to end the video, just press Ctrl+C to cancel the pipeline, and the file should be saved to the present directory.
OpenCV
To record video with your NavQ, you can run this simple python script that uses OpenCV to write video to a file:
This is a simple example that you can use as a starting point for even bigger things with OpenCV/computer vision! If you'd like a more sophisticated guide that runs through example code to detect red objects, head to the developer guide on OpenCV to find more.
Controlling HoverGames drone with NavQ
To perform off-board control of the HoverGames drone from the NavQ, you'll need to get a little bit involved with ROS + MAVLink (MAVROS). To see a guide on how to get started, head over to the developer guide!
Connecting to WiFi
A package named connman is included in the image to help you connect to WiFi through the command line. To connect to WiFi, run the following commands:
When you run services, there may be duplicates of each WiFi network. Try to connect to your WiFi network with each key until it works. Sometimes the first one works, and sometimes the second one works. You will get a connection successful message if it works correctly.
Your NavQ should automatically connect to WiFi when rebooted. If you want to connect to another WiFi network, just go through the same process again.
Transferring files to and from NavQ over FTP
If you need to transfer files to and from the NavQ over a wired or wireless connection, you can use FileZilla to access the NavQ's FTP server. First, you'll want to connect the NavQ to your local network (WiFi or Ethernet) and run ifconfig to find the IP address that was assigned to your NavQ. Then, use FileZilla to connect to that IP with the username navq and password navq.
A guide on how to use FileZilla is here:
Next steps
Now that you've gone through the Quick Start Guide, you can move on to the Developer Guide if you'd like to go more in depth. Use the sidebar on this Gitbook to navigate to the next section.
Cellular IoT solutions are new standards defined by the 3GPP Group to answer requirements such as
low power, long range and low data rate usage
. Two standards currently exist - LTE Cat.M1 is one of the current standards and is intended for low bandwidth intermittent use, as expected for an IOT-type device.
Cat M1 can deliver secure, world-wide coverage by using the same base stations, public networks and power supplies as mobile phones.
It is important to recognize that Cat M1 is not the same as 4G LTE data bandwidth you have come to expect on your cell phone data plan. This is not suitable for streaming video, instead it would be intended more for intermittent low bandwidth telemetry or sensor data.
NXP's TJA1101 is an Ethernet PHY that provides a two-wire 100BaseT1 Ethernet interface. The Ethernet MAC side of this interface is not unusual, and the traffic on the line is "regular Ethernet"
NXP's Flight controller for Mobile Robotics - RDDRONE-FMUK66 includes a 2-wire Ethernet interface on board. In order to connect this with the 8MMNavQ this media converter can be used. The RDDRONE-T1ADAPT is also useful when connecting to other experimental modules such as V2X or an Automotive 5/10 port switch.
Connecting the RDDRONE-T1ADAPT
On RDDRONE-T1ADAPT power is supplied via a 3 pin JST-GH connector. There is a matching 3 pin JST-GH connector on the 8MMNavQ. A simple 1:1 cable is used. Optionally a USB-C cable can be used to provide power (only) connection.
A 2 pin JST-GH connector is used for connecting Ethernet between this board and another - such as the RDDRONE-FMUK66. A simple 1:1 cable is used.
There are also locations marked on the bottom side of the board for soldering in wires for both power and 2-wire Ethernet
RDDDRONE-T1ADAPT Software
There is a small NXP LPC processor on board to configure the back to back PHYs and manage setup and LEDs. This board comes pre-programmed and there is no user software required. Contact hovergames@nxp.com or your local NXP representative if there is a specific need to access the software.
Engineering Sample - 100BaseT1 Ethernet media converter
RDDRONE-T1ADAPT Bottom view - USB-C alternative power input connector
5" developer LCD panel
Ordering Info
How to order your own NavQ
To order a NavQ, you'll currently need to purchase directly from the Emcraft website. If you are a HoverGames 2 participant and have had your application accepted be sure to use your coupon code.
We have created an easy-to-use script to resize the flashed image on your device. Since the image is smaller than the storage device, it is not properly expanded when first flashed. You can run the following script to expand the filesystem.
This script should be in the home folder of the demo image. If it isn't there, or if you lost it and need it, it is linked below.
To run the script, run the following commands for the boot device you're currently using:
For eMMC:
For SD card:
Making the script executable
The script should be executable when it is included in the image. If it isn't, then you'll need to make it executable by running the following command:
Manually expanding space
If you don't want to use the script, you can run the commands below.
You may run into an issue where you run out of space on the eMMC or SD card when installing ROS. To expand the rootfs partition, follow these steps:
If you're on the eMMC, you'll use /dev/mmcblk2. If you're on an SD card, use /dev/mmcblk1. By default the NavQ boots from the included SD card in your kit.
Once you're done with those steps, run this command:
and reboot. You should now be able to install ROS Melodic without size issues.
Commands for fdisk
If you prefer to just see the commands, these are the commands you need to run in fdisk in order to resize your disk.
Power Cables
Options and cables for powering the NavQ
NavQ Cables
The NavQ ships with several cables. They allow for several configurations when powering the NavQ
USB-C
When working on the bench you may wish to power the NavQ from USB-C input cable. This cable is provided. It would also be possible to power the NavQ while on a drone from a separate USB-C battery pack like those for Cell phone power.
Please note that some USB-C ports on charging adapters and particularly on unpowered Hubs may not supply enough current to run the NavQ and all the peripherals. If you notice a booting failure, please first try powering from an external battery or known high power USB-C charger or power supply.
Drone power cable supply
HoverGames-Demo Bugs/Fixes
Ensure your NavQ is working correctly with these fixes
Overview
Currently, the HoverGames-Demo image is in a beta state. Over time we will be improving the image by fixing bugs and including even more software so that it's more of an out-of-the-box experience. Here are some of the current fixes at the moment to get a working system.
These fixes are for the build on 7/24/2020. This page will be updated for each new release.
Quick Workarounds
WiFi sometimes does not automatically connect to the last WiFi network after reboot.
Workaround: Open connmanctl, run disable wifi, and reconnect using the instructions in the Quick Start Guide.
Setting timezone
Setting the timezone on your NavQ is necessary to ensure the apt package manager works. First, you'll need to locate the correct timezone file at /usr/share/zoneinfo. There should be a folder for your country and a file in that folder for the closest city to you.
For example, if you're in Central Time USA, you'd use the following commands:
Now, you can run sudo apt update and sudo apt upgrade to get your system up to date.
Running MavLink over T1 Ethernet
T1 Ethernet between FMUK66 and NavQ
Prerequisite
The RDDRONE-FMUK66 has a two wire 100BaseT1 Ethernet interface on board. The 8mmNavQ board does not include T1 Ethernet however an adapter may be used. To run the T1 Ethernet connection between FMUK66 and NavQ use a separate media converter.
Nano Editor
There are several editors that can be used in Linux. Nano is a lightweight command shell editor that is popular. There are many others to choose from
Some discussion on the topic:
Assuming you already have internet access on your NavQ, to install nano on the demo image type the following.
Linux imx8mmnavq 5.4.24-2.1.0+gbabac008e5cf #1 SMP PREEMPT Fri Jul 24 23:17:18 UTC 2020 aarch64 aarch64 aarch
This section is for various linux commands that may be useful when using the NavQ, and the Demo image.
Communications Interfaces
There are many communications interfaces supported on NavQ through the JST-GH connectors on the HoverGames Interposer Board. The page links below are guides for each one
The 8mpNavQ or "NavQPlus" will have two Ethernet interfaces. it is planned that one of these interfaces will natively be configured as 100BaseT1
Setting a fixed IP to use Ethernet for FMU communication
It is not recommended to use DHCP in a vehicle such as a drone, since you generally don't want the network to change without knowing about the explicit details. Therefore since there is no DHCP and FMUK66 by default has a fixed IP of 10.0.0.2, we need to set a fixed IP on the NavQ for eth0 to be able to communicate via Ethernet to FMUK66.
It is suggested to use IP address 10.0.0.3 for navq.
connman connection manager
The linux program connman is used for configuring the network settings . To force connman to use a fixed IP ( as in case when no DHCP is available) the following file needs to be created.
It is important is that you have a Ethernet cable connection before, otherwise connman will not register the network.
The IP4 settings are in the order of ownIP/netmask/router. Note that 10.0.0.3 is set as router since in this particular hardware configuration no other device is there.
Setting up FMUK66 for mavlink over T1 Ethernet
T1 Ethernet is supported by PX4 on FMUK66 with latest master.
To enable the RDDRONE-FMUK66 mavlink telemetry via UDP sending to a specific IP you must add the following file on the FMUK66 SDcard:
$ sudo fdisk /dev/mmcblk1
Command (m for help): p
Device Boot Start End Blocks Size Id System
/dev/mmcblk1p1 * 16384 186775 170392 83.2M c W95 FAT32 (LBA)
/dev/mmcblk1p2 196608 <end> <blocks> <size> 83 Linux
Command (m for help): d
Partition number (1,2, default 2): 2
Partition 2 has been deleted.
Command (m for help): p
Device Boot Start End Blocks Size Id System
/dev/mmcblk1p1 * 16384 186775 170392 83.2M c W95 FAT32 (LBA)
Command (m for help): n
Partition type
e extended
p primary partition (1-4)
Select (default p): p
Partition number (1-4, default 1): 2
First sector (2048-30621695, default 2048): 196608
Last sector, +sectors or +size{K,M,G} (2048-30621695, default 30621695): <press enter for default>
Created a new partition 2 of type 'Linux' and of size 14.5 GiB.
Partition #2 contains a ext4 signature.
Do you want to remove the signature? [Y]es/[N]o: n
Command (m for help): p
Device Boot Start End Blocks Size Id System
/dev/mmcblk1p1 * 16384 186775 170392 83.2M c W95 FAT32 (LBA)
/dev/mmcblk1p2 196608 30621695 39425088 14.5G 83 Linux
Command (m for help): w
The partition table has been altered!
$ sudo resize2fs /dev/mmcblk1p2
d <enter>
2 <enter>
n <enter>
p <enter>
2 <enter>
196608 <enter>
<enter>
n <enter>
w <enter>
<fdisk should exit>
$ sudo resize2fs /dev/mmcblk2p2 <enter> (FOR eMMC)
$ sudo resize2fs /dev/mmcblk1p2 <enter> (FOR SD CARD)
JST-GH Power input cable connector (USB-C connector also available on other side of board)
JST-GH Power input cable connector
3-way splitter-extender (optional), XT60 adapter and "bullet" adapter provided
Choose XT60 or Bullet connectors for powering your NavQ
VNC desktop environment
Intro
If you've ever run into a situation where you need to view a raw stream from the NavQ's Google Coral Camera, or need to run a lightweight GUI application on NavQ, you can do so using the guide below.
Instructions
Installation
You can run the commands below to start a VNC server on your NavQ.
Connecting
You can use TightVNC to connect. You'll want to use the IP address of your NavQ at port 5901.
mavlink-router
mavlink-router routes MavLink data dynamically between several end nodes
Introduction
To be able to have several end nodes communicating via mavlink simultaneously we need to set up mavlink-router on the NavQ.
The end nodes can be
A process for onboard control running on NavQ.
A QGroundControl (QGC) computer the NavQ connects to via a data link such as WiFi.
Other mavlink enabled peripherals on the vehicle.
Another program running on the same remote PC as QGC
Prerequisites
Set up TELEM2 on the FMU
Connect to your FMU over USB and open QGroundControl. Navigate to Settings -> Parameters -> MAVLink and set these parameters:
Also, you'll need to make sure that the settings in Settings -> Parameters -> Serial look like this:
Installation and compiling mavlink router
To install and compile mavlink router follow the steps below (internet access required on your NavQ)
1) Connect to NavQ console via ssh / serial
2) Type the following commands
Mavlink-router configuration
Configuration of mavlink router is done via a single configuration file /etc/mavlink-router/main.confThis file needs to be created from scratch. An example configuration file is available in the mavlink-router sources -
As of today the mavlink-router make install does not create the /etc/mavlink-router directory and main.conf file.
Therefore please use the following commands to create the directory and file initially.
~$ sudo mkdir /etc/mavlink-router
~$ sudo touch /etc/mavlink-router/main.conf
Setup the config file with minimal configuration
The configuration above assumes that the NavQ gets mavlink data from FMU either via UART3 (/dev/ttymxc2) or UDP.
If you use UART please set on the FMU the corresponding serial port to 921600Bd.
For this the SER_TELx_BAUD (x = number of telemetry port) parameter needs to be adjusted to 921600 8N.
If you use lower speed QGroundControl might fail to load parameters.
You can leave out the unused connection.
Via the UdpEndpoint QGConMobile section the mavlink stream is forwarded to a QGC computer/mobile device assuming it has 192.168.43.1 and NavQ is connected to this network via e.g. WiFi.
Enabling auto-start of mavlink-router
Enable the auto-start of mavlink-router via systemd and start it
Checking status of mavlink-router
You can check the status of mavlink router using the command
Setting the NavQ hostname
Suggested proposal for the hostname of NavQ
Since several NavQs might be present in a Wifi Network it's essential to set an unique hostname to determine which one is the correct NavQ you want to connect to.
To change the hostname you need to modify /etc/hostname . We suggest the following format:
navq-[Vehicle Mavlink SysID]
e.g. If Mavlink SysID is 10 the NavQ should be named navq-10
Adjusting the hostname with nano
Adjusting the hostname with echo command
After a reboot the new hostname will be visible on the network.
# Credit to: https://www.vandorp.biz/2012/01/installing-a-lightweight-lxdevnc-desktop-environment-on-your-ubuntudebian-vps/#.YCQEGS1h3O4
# Install X, LXDE, VPN programs
apt-get install xorg lxde-core tightvncserver
# Start VNC to create config file
tightvncserver :1
# Then stop VNC
tightvncserver -kill :1
# Edit config file to start session with LXDE:
nano ~/.vnc/xstartup
# Add this at the bottom of the file:
lxterminal &
/usr/bin/lxsession -s LXDE &
# Restart VNC
tightvncserver :1
A comprehensive guide on using the NavQ as an I2C master (work in progress)
I2C Example
The NavQ includes an I2C port in one of the JST-GH connectors. You may use this port to communicate to other devices in your drone system. In this example, we will go over the process of connecting a Teensy LC to the NavQ over I2C to control some WS2812 LEDs.
TODO
Add guide for using C/Python SMBus libraries for controlling I2C
Add more pictures/visuals
Explain teensy code
Prerequisites
Hardware
Teensy LC
NeoPixel LED Strip (Ex. )
JST-GH connectors and pre-terminated wires
Software
Teensy side
Arduino IDE
TeensyDuino
Preparing the JST-GH connector
To create the I2C connector, you'll need to order some JST-GH hardware. Here is a link to a digikey page where you can purchase connectors:
And here is a page where you can purchase the jumpers:
NOTE: For the I2C connector, you'll need the 9-pin JST-GH connector.
In the hardware overview (link here: ), you can see the pinout for the I2C connector. Here is another screenshot of it:
The 5VP pin is on the left-most side of the connector, and GND is on the right-most side. I2C2_SDA is pin 4, and I2C2_SCL is pin 5. The JST-GH connector is positioned with the retention clip facing away from you when you are determining the left/right sides.
Wiring the Teensy
You'll need to do some soldering for the first step in this project. In the two pictures below, the NeoPixels are connected to the LED 5V, LED GND, and LED SIG pins. The JST-GH connector to the NavQ connects to the SDA/SCL pins and 5V + GND pads on the back of the Teensy.
Tip: you can solder the pre-terminated JST-GH wires directly to the pads and the through-hole pins to make things easier.
One thing to keep in mind is that even though the Teensy LC does not include pullup resistors to 3.3v for the I2C lines, pullups are not required since the NavQ has internal 4.7k pullups on it's own I2C bus (on the SoM).
Pictures
Here are a couples images of this setup:
Teensy code
We have written some simple example code that changes the color of the NeoPixel LEDs when the Teensy recieves I2C data. In the example below, the slave address of the Teensy is 0x29, and the color of the LEDs change from green to white when a 0x1 byte is sent to the Teensy. If any other byte is sent to the Teensy, the color changes back to green.
Make sure that you install the Adafruit_NeoPixel library in the Arduino IDE.
The i2c_t3 library is included with the TeensyDuino software. Make sure to use "Wire1" instead of "Wire" since we are using the SDA1/SCLK1 pins on the Teensy.
NavQ commands
Add navq user to i2c group
To use the i2c commands without root, you'll need to add the navq user to the i2c group. To do this, you can run the following command:
Checking connection
Once your Teensy is connected using the I2C JST-GH connector, you need to confirm that the NavQ recognizes the Teensy as an I2C device. To do this, you can run the following command on the NavQ:
You should see a device at address 0x29. If there is no device at address 0x29, you'll need to check your wiring.
Sending data to the Teensy
To send data to the Teensy, you can use the following command:
This will change the LEDs to white. You can swap the 0x1 with a 0x0 or any other byte to switch back to green.
Controlling I2C bus with Python/C
Controlling the I2C bus with console commands is great, but what about when we want to integrate those commands into code? Well, with Python and C, we can control the Teensy over I2C by using some libraries supplied in both the Linux kernel and through pip.
Python
First, you'll need to install the smbus pip package. To do this, just run in your terminal:
Once that is installed, you can run a simple script to select a 1 or 0 to send to the NavQ to change the color of the LEDs.
The expected output of this script is as follows:
By selecting 1 or 0, you can change the color of the LEDs to white or green.
C
To control the I2C bus with C, you can use the following code:
GPIO
Controlling GPIO through the command line
There are several GPIO pins on the various JST-GH connectors on NavQ. To control these GPIO pins, follow the instructions below.
Exporting GPIO pins
In order to use GPIO pins, we need to export them in Linux first. To do this, we need to know the GPIO number for the pin we want to access. We can compute this number using the following formula:
For example, if we want to access the GPIO1_IO12 pin on the UART4/I2C/GPIO connector, we would find that the GPIO number is:
If you want to find out what pins correspond to what GPIO numbers, we have tables in the Hardware Overview/Pinouts and Connector info section here:
Once you know the GPIO number of the pin you want to access, exporting the pin for use is easy. All you have to do is echo the pin number to /sys/class/gpio/export. For example, if we were to export GPIO1_IO12, we would run the following in our NavQ console:
Currently we have not created a specific user group to control GPIO pins, so you must be root to export/control pins. If someone in the community would like to submit a process for greating a GPIO user group, please make a post on our hackster.io page and we will add it to the demo image. :)
Changing the pin direction
Next, we will want to change the direction of the GPIO pin for our specific use case. There are two options: in and out. To do this for GPIO1_IO12, you can run the following in your NavQ console:
Reading or Writing the GPIO pin value
To read or write a value to the GPIO pin, we will follow a similar process to changing the pin direction. A pseudo file named value is created at /sys/class/gpio/gpioXXX/value that holds a 1 or a 0. If you echoed out to the GPIO direction file, you can control the pin. To control the GPIO1_IO12 pin, just run the following in your NavQ console:
If you echoed in to the GPIO direction file, you can read the value file and find the current state of the pin. To do this for the GPIO1_IO12 pin, you can run the following in your NavQ console:
Controlling GPIO programmatically (in C)
Prerequisites
Create new group called gpio
2. Create new udev rules file
Create a file at /etc/udev/rules.d/99-gpio.rules and add the following to it:
This will allow you to access the GPIO pseudofiles without being root.
Source Code
Source code coming soon
Building a Linux image for NavQ
HoverGames-Linux Distros
We have two separate Linux distributions that you can build for NavQ. There are pros and cons to both.
~$ mkdir src
~$ cd src
~/src$ git clone https://github.com/intel/mavlink-router.git
~/src$ cd mavlink-router
~/src/mavlink-router$ git submodule update --init --recursive
~/src/mavlink-router$ ./autogen.sh && ./configure CFLAGS='-g -O2' --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib --prefix=/usr
~/src/mavlink-router$ make
~/src/mavlink-router$ sudo make install
The i.MX 8M Mini parts are rated 0C to +95C. We do not expect they will need any additional heat-sinking, especially while flying, but you can monitor the core temperature with the following command:
To use the package manager (apt) on the Demo image, you'll need to change your timezone.
First, you'll need to locate the correct timezone file at /usr/share/zoneinfo. There should be a folder for your country and a file in that folder for the closest city to you.
You can clearly see the soldering on the top of the teensy - SDA/SCL, and LED headers.
Wire run from Teensy to NavQ
[1] HoverGames-BSP
The HoverGames-BSP image is based on NXP's Yocto BSP for i.MX 8M Mini. This distro is not as easy to use, and requires much more effort to get a working system, but currently it is the only system that is allowed for use if you want to use NavQ commercially. If you need tight integration and a small system that has only the packages you need installed on it, or if you're a company looking to use the NavQ in production, this is the one for you.
[2] HoverGames-Demo
The HoverGames-Demo image comes with the APT package manager as well as some other pre-installed software specific to i.MX 8M Mini. This distro is the easiest to use due to it's great compatibility with pre-existing binaries coming from official repositories. You can install ROS, OpenCV, and more on this image just as you would on a normal desktop computer. This makes the Demo image great for quick development and iteration. To use this image, you must agree to a Demo license stating that you will not use NavQ comercially with this distribution.
Building the Linux images for NavQ
Prerequisites
Recommended Specs
You'll need to use a computer with Ubuntu 18.04 installed, and we recommend a high amount of cores + RAM to build these images in a decent time frame. You will also need a large HDD or SSD (>500GB) to store the build files. A table of recommended specs are below:
Component
Recommended Hardware
CPU
Recent 6-core Intel i-Series or AMD Ryzen processor with HyperThreading or SMT (Simultaneous Multi-Threading)
RAM
16GB DDR4 or more
Storage
500GB SSD recommended, HDD will suffice but will be slow
Operating System
Ubuntu 18.04 (Not 20.04!)
Install Yocto build tools
Follow the guide at Yocto's website to install the necessary build tools for Ubuntu/Debian, or just install the list of packages below:
Running the build script
We have a GitHub repo with instructions for both the HoverGames-BSP and HoverGames-Demo images. The BSP image can be built using the master branch, whereas the Demo image can be built using the demo branch. The link to the repo is below.
PWM (Onboard RGB LED)
Controlling PWM on NavQ
The PWM chips are tied to the onboard LED on NavQ. There are three PWM chips: pwmchip0, pwmchip1, and pwmchip2. Each of these "chips" have one PWM line attached to them: pwm0. To use these PWM lines, you will need to use the sysfs interface.
Using the sysfs interface to control the onboard LED
Currently, you must be root to access these PWM chips. In the future we will use a udev rules file to change the permissions. This will allow the navq user to write to the psuedofiles for these chips.
Step 1
Log into the root user on NavQ by running this command:
Step 2
Navigate to /sys/class/pwm and run the following commands:
Step 3
Now that our PWM lines are exported for each chip, we can change the duty cycle of the PWM lines and enable them. The default frequency is 2730667 Hz. For a 50% duty cycle, we will use half of this number: 1365333. Apply this duty cycle to each chip by running the following commands:
Step 4
We will now enable each line. The colors for each chip are as follows:
pwmchip0: RED
pwmchip1: GREEN
pwmchip2: BLUE
To enable the colors, run the following commands:
Running these commands in succession should enable the LEDs in a RED, GREEN, BLUE pattern until you reach a white LED.
Controlling the onboard LEDs programmatically
Comnig soon
Battery LED w/ Teensy LC
[WIP]
Introduction
This "Project Guide" is written to show some of the capabilites of NavQ. In conjunction with a Teensy LC and a strip of WS2812B LEDs, you can add a forward-facing battery indicator light to your drone.
The battery on my drone is quite low!
Prerequisites
Software
The software needed to run this project on your NavQ is as follows:
ROS Noetic
MAVROS
You can install this software using the guides here:
Hardware
The hardware needed is the same as the hardware from the I2C guide here:
Code
At the moment, we're just going to paste the code here, and a more detailed guide will be written later.
Teensy code
This code should be uploaded to the Teensy using the Arduino IDE.
NavQ code
The ROS node should be placed in the home folder ('/home/navq/')
The service file should be located in /etc/systemd/system/.
The Launch script should be located in /usr/local/bin/.
Making the ROS node run on boot
Once all of the necessary files are placed in their respective directories, you need to make the systemd service run at boot. To do this, run in the terminal:
Controlling your drone from NavQ using MAVROS
MAVLink / MAVROS
The 8MMNavQ can control your HoverGames drone by communicating with the RDDRONE-FMUK66 over MAVROS. A UART cable will be included in the kit that connects the UART3 port on the 8MMNavQ to the TELEM2 port on the RDDRONE-FMUK66.
ROS1
ROS on NavQ
ROS on NavQ will allow you to interface with sensors, control your drone using MAVROS, and more. To get started, follow the install guide below and then continue to the next sections.
from smbus import SMBus
addr = 0x29
bus = SMBus(1)
numb = 1
print("Enter 1 for WHITE or 0 for GREEN")
while(numb == 1):
ledstate = input(">>>> ")
if(ledstate == "1"):
bus.write_byte(addr, 0x1)
elif(ledstate == "0"):
bus.write_byte(addr, 0x0)
else:
numb = 0
navq@imx8mmnavq:~$ python3 i2c.py
Enter 1 for WHITE or 0 for GREEN
>>>> 1
>>>> 0
#include <linux/i2c-dev.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <fcntl.h>
int main() {
// Init vars - file descriptor and I2C slave address
int file;
int addr = 0x29;
char filename[20];
// Open the /dev/i2c-1 device filename and apply the address using ioctl
sprintf(filename, "/dev/i2c-1");
file = open(filename, O_RDWR);
if(file < 0) {
printf("Failed to open the i2c bus");
exit(1);
}
if(ioctl(file, I2C_SLAVE, addr) < 0) {
printf("Failed to acquire bus access and/or talk to slave.\n");
exit(1);
}
// Create a data buffer, then ask the user for a 0 or 1 to change LED color
// LED color is changed by writing buf to file
char buf[10] = {0};
buf[0] = 0x0;
while(1==1){
printf("Enter a 0 for GREEN and a 1 for WHITE: ");
scanf("%X", &buf[0]);
if(write(file,buf,1) != 1) {
printf("Failed to write to the i2c bus.\n");
}
printf("\n");
}
}
NOTE: This page is for ROS1 only. MAVLINK and MAVROS are deprecated for ROS2 applications. ROS2 uses microRTPS and PX4 ROS Com in place of MAVROS.
NOTICE: When running the off-board script, make sure that you confirm the landing zone for your drone in QGroundControl. The local position parameter in the offboard ROS node is set to x:0, y:0, z:2, which means it will hover at 2 meters above its landing zone. If the drone takes off from a position away from its landing zone, it will quickly return to its landing zone and hover 2 meters above it. This is especially important to note if you turn the drone on indoors and then place it somewhere outside to take off. We don't want your drone to smack into a building!
Prerequisites
Set up TELEM2 on the FMU
Connect to your FMU over USB and open QGroundControl. Navigate to Settings -> Parameters -> MAVLink and set these parameters:
Also, you'll need to make sure that the settings in Settings -> Parameters -> Serial look like this:
Offboard control guide
MAVROS Offboard node example
A coding guide for the ROS node we will be using is located at the link below.
This guide will help you install the ROS node outlined in the MAVROS Offboard Example.
Setting up your development environment
To start, you'll want to make sure that you have already set up a development environment for ROS. ROS has a guide on how to get a catkin workspace set up in the link below.
Once you've completed that tutorial, you'll maybe want to add an extra line to your ~/.bashrc so that your devel/setup.bash is always sourced when you open a new terminal:
This will ensure that your development environment is properly set up when you open a new shell.
Installing MAVROS specific packages
Follow the "binary installation" guide on the page below to install the necessary MAVROS packages from apt.
Make sure to use 'noetic' in place of 'kinetic' in the commands they give you on this page. Also, you do NOT need to follow the "Source Installation" section of the guide.
Creating a new package
To create our first ROS package, we will want to navigate to our catkin workspace's src folder and run the following command:
This command will create a new package folder named offb and will add the dependencies roscpp, mavros_msgs, and geometry_msgs to the 'CMakeLists.txt' and 'package.xml' files. Next, you'll want to take the code from the PX4 MAVROS example and create a file named offb_node.cpp in the src/ folder in the offb package. Your directory structure should now look like this:
Editing CMakeLists
In order to build your ROS package, you'll need to make some edits to CMakeLists.txt so the catkin build system knows where your source files are. Two edits need to be made.
The first edit is to add your executable to CMakeLists. Your executable should be named offb_node.cpp. Uncomment line 136 to add it:
The second edit is link your target libraries (roscpp, mavros_msgs, and geographic_msgs). Uncomment lines 149-151 to do so:
And that's all you need to do for now to set up your workspace!
Building your ROS node
To build your ROS node, return to the root of your catkin_ws/ directory and run:
Running your ROS node
To run our ROS node, we need to make sure that MAVROS is running. On the NavQ, run the following command:
This will start roscore and the mavros node with a pointer to the UART port /dev/ttymxc2 at a 921600 baud rate. To run the ROS node we created, run the following in an ssh terminal:
and your drone should take off to an altitude of 2 meters!
NOTE: ROS1 support is good, but the Mobile Robotics team at NXP's focus is on ROS2. There is a lot more documentation on ROS1 than ROS2, but ROS2 may be easier to use in the long run. We suggest that you do not cross-polinate with ROS, i.e. only use ROS1 or ROS2, not both. Keep in mind that any documentation under the ROS1 section is for ROS1 only, and vice versa.
Install guide by OS
HoverGames-Demo image
NOTE: HoverGames participants should be using the Demo image. If you flashed your NavQ with the image from the HoverGames website, or if you're using the image that came installed on the SD Card included in your kit, you're using the Demo image.
When you install ROS Noetic on your NavQ, make sure to install the base version of ROS and not the desktop version. If you install the desktop version, critical gstreamer packages for NavQ can be overwritten and therefore become non-functional.
If you're using NavQ comercially and are running the HoverGames-BSP image, you'll follow these steps.
ROS Melodic is automatically installed on the HoverGames-BSP image. It includes MAVROS by default. You will need to do a little bit of setup, though, once you first boot your image.
Run the following commands to enable ROS on the HoverGames-BSP image:
You'll also want to download the following script and run it to install GPS geoids:
Now, you can continue with the ROS tutorials for setting up a build environment and installing your first package. We will go over this in the next section.