7. Rover Tutorials

This page features tutorials regarding the development of Rover applications (Marker Detection) as well as the integration with Cloud applications, e. g. for sending driving commands to the Rover.

7.1. Rover In-vehicle Applications

7.1.2. Developing Rover Applications

This repository features an example and instructions on how to develop, cross compile, and dockerize applications that use the rover-api. It utilizes an ARM docker image that

  • can be run in x86

  • contains rover-api and all of its dependencies

  • contains a simple IDE

  • can be used as base image to dockerize your in-vehicle applications

For more details, please consult the README of the repository. All the steps explained there are tested on Ubuntu 16.04.

7.1.3. Marker Detection

Marker detection is gaining great importance in various domains such as robot navigation, augmented reality, etc. The process behind is based on finding correspondences between points in the real environment and their 2d image projection.

7.1.3.1. Requirements

  • OpenCV version 3.4.1 as explained here

  • Calibrated Raspbian camera as explained here

7.1.3.2. Running Marker Detection

The Roverapp contains both a marker chaser application and a pose estimation application. To start them, just do the following:

1
2
 $ cd ~/temp/rover-app/build
  sudo modprobe bcm2835-v4l2

Then, you can either start

1
  $ ./bin/MarkerChaser

or

1
  $ ./bin/poseEstimation

7.1.3.3. Potential Use Cases

  • Marker chaser: Move the rover such that the marker is always in the middle.

  • Platooning: Create a platoon by following other Rovers with a marker on it.

7.2. Rover Cloud Applications

7.2.2. Command & Control via Rover Telemetry UI

In the following sections, we’ll use Eclipse Hono to send a Command & Control message from a business application in the Cloud to the Rover.

The example is based on the Rover Telemetry UI Backend, which takes the user input from the Rover Telemetry UI Frontend and then sends Command & Control message to the according Rover.

../roverstatic/images/rover_command_control.png

7.2.2.1. Connect to Eclipse Hono

At first, our application needs to connect to Hono via AMQP as shown in HonoConnector.java. To do so, we need to provide the according connection details and credentials. For the Rover Telemetry UI Backend, this can be done within the application.properties

7.2.2.2. Sending Command & Control Messages

The next step would then to actual send the driving commands to the Rover as shown in the sendCommand() method in CommandControlService.java. Basically, Hono receives the Command & Control message and take care that message, regardless of the used protocol, are sent to the right device (based on the deviceID). In this example, messages are sent to the Rover via Hono’s MQTT adapter.

7.2.2.3. Testing your application

For testing that driving commands arrives at the device, the above mentioned python script can be used. When setting the according credentials, the script connects to the MQTT adapter of Eclipse Hono instance. As soon as a Cloud application send a Command & Control message to the device, the according driving command is printed in the console:

../roverstatic/images/device_mqtt_example.jpg