Fundamentals
Introducing the basic concepts.
By the end of this tutorial you will be able to:
- Describe how the distinction between the robot driver and your application enables application portability.
- List the Universal Commands underpinning the BOW API.
- Browse the tutorial code examples to get a sense of what's possible.
Our mission is to accelerate the progress of robotics, by harnessing the skills and creativity of developers from a pool of talent that extends well beyond those with formal robotics training. The purpose of the BOW SDK is therefore to support all developers to start building sophisticated applications for robots quickly, safely, and easily.
In this tutorial we will see how the BOW Software Development Kit (SDK) has been designed to support this mission, and we'll obtain the code repository that will support your learning through these tutorials.
The problem
At the time that we started working on the SDK, it would typically take around six months for a postgraduate roboticist working full-time to learn how to communicate with a new robot, how to read data from its sensors and send commands to its motors, and how to set up basic control software for each new configuration of hardware. If that process revealed that the robot was not ideal for the application, with the hardware already purchased and the development time already invested, the costs of switching hardware would usually outweigh the benefits. Consequently, too much time has been wasted re-inventing the wheel, and those trained to do so are in relatively short supply.
The solution
To address these problems, the BOW Engine has been designed, from the ground up, to provide portability of applications across a growing number of supported robots. Fundamental to this portability is a unique universal representation of robots, the BOW Robot Description, that expresses the robot’s sensors and motors in such a way that you don’t need to know the specific model of camera, actuator (etc.), in order to retrieve an image or set a joint angle. By representing all robots as variations on a common theme – links connected by joints – any application developed for one robot will work for any other, within the limits of the hardware. Portability is achieved through a decoupling of the user logic from the robot description. The end result is that robot agnostic applications can be developed in simulation and then be seamlessly deployed to one, or many, supported robots for validation and testing without changing any code.
The Universal Commands
The BOW Robot Description is fundamentally a set of communication channels, organised in terms of sensory modalities and modes of action. The sensory modalities include vision, audition, touch, and proprioception (sensing the states of the joints) and the modes of action include motor (for movements), speech and emotive expression. For more see: Channels
The messages exchanged via these channels have been designed to be flexible (they do not limit information exchange), generic (they make sense across the different robot types), efficient (they can be encoded and decoded quickly), small (they minimise redundancy), and intuitive (they each have sensible names and internal structure). This design enables applications to communicate with robots using only three universal commands.
The universal commands are called QuickConnect, Get, and Set. And that’s all you really need. The first does exactly what you would expect; it opens a connection to your robots, setting up the communication channels. The other two transmit BOW Data Messages from your robot to your application (by calling Get on a specific channel), or from your application to your robot (by calling Set on a specific channel).
Calling the Set command on a motor or speech channel will cause your robot to move or speak, whereas calling the Get command on a vision or proprioception channel will retrieve a message from your robot that includes an image or the current joint settings.
How it works
Under the hood, the BOW Engine consists of the BOW API, which includes the three Universal Commands and exchanges data with the BOW Robot API. The BOW Robot API serves as a bridge to a piece of software, the BOW Robot Driver, which translates BOW Data Messages into robot specific commands.
The robot driver (typically) runs on the robot’s onboard computer and exposes the functionality that is provided by the robot’s own API/SDK so that it can be accessed intuitively, using the three Universal Commands.
Crucially, it doesn’t matter what software the robot may already be running, for example whether it was developed using ROS or some other convention, or even whether another API/SDK exists for that robot at all, as may be the case for the latest prototypes. As long as the robot is running a BOW driver, you will be able to communicate with it using a small set of intuitive commands.
The BOW SDK
The BOW Software Development Kit (SDK) enables developers to create robotics applications using the BOW API, as well as a suite of utility applications. These utilities include the BOW Hub, the BOW Simulator (next tutorial) and BOW Insight.
These tutorials will help you discover the power of the BOW SDK and begin your journey into robotics software development. First, we'll get hold of the materials that support the tutorials, so you can start your journey into robotics with the BOW SDK.
Downloading the Tutorial Materials
First, ensure the following:
- The BOW Hub is installed and running.
- The BOW SDK for your preferred programming language is installed.
- The BOW Hub is running
Now let's download the tutorial materials.
Download the Tutorial code
Right-click on the downloaded zip file and extract to your directory of choice. All the code you will need for the tutorials is now inside the SDK-Tutorials-main folder.
Now your computer is all set. The code repository contains a directory for the subsequent tutorials, and each contains sub-directories for the different programming languages supported by BOW. Feel free to explore.
Investigation
Explore the Tutorial code.