Blog

Office Autonomous Robot

Office Autonomous Robot

With the imminent arrival of DMC’s second FedEx Day, the brainstorming began. Amid ideas to improve our internal network and everyday tasks, the idea to one day take over the world started gaining support. Everyone knows that the first step towards world domination is the creation of your very own robot army. With that in mind, DMC decided it was time to build its own office autonomous robot.

Hardware Selection

In order for our robot to provide a lasting platform for autonomous development, DMC wanted a platform that would allow great expandability as well as a very open source structure so as not to limit the robot's future capabilities. Also, since this project would be starting as a one-day initiative it was decided to keep entry costs low and leverage several commercial technologies to allow a viable product after one day of work.

DMC came up with a simple set of parameters for hardware selection:

Expandability

  • DMC will be continually adding features and does not want to be limited by the base platform

Standard communication protocol

  • A well-documented command set over serial would save initial setup time and increase compatibility with different hardware and programming languages.

Wireless connectivity

  • This will allow large amounts of processing power from a central command server without having to worry about power consumption and allow the robot to freely navigate the office.

Commercial product

  • Although this may limit some expandability and configurability, a commercially available platform will save significant hardware setup and debugging time.

Streaming video

  • Image processing provides a large range of automation possibilities as well as unique content generation for DMC

Affordability

  • The goal was to keep the initial cost of the robot around $500

Based on the above criteria, DMC chose to center the autonomous robot project on three primary components

IRobot Create

The IRobot Create is the development version of the popular Roomba automated vacuum. It includes all the functionality of the Roomba minus the vacuum and adds several additional sensors and a much more expandable I/O configuration. 

DMC chose this for their robot platform for several reasons. The product is well supported by IRobot and has a lot of expandability out-of-the-box. IRobot also supplies a well-documented command set and SDK. Additionally, since it is a well-known product, there is lots of community support including drivers in Microsoft Robotic Studio.

DMC purchased the IRobot Create development kit which includes the robot, a docking and charging station, high-capacity battery and several other components. Additionally, a BAM Bluetooth module was also purchased to provide wireless serial communication with the robot.

Foscam 1918FW Wireless IP Camera

Since it was decided to concentrate processing on a central command server, it was necessary to provide streaming video from the robot. Several companies offer wireless IP cameras that connect to a local Wi-Fi network and can stream video to any computer on the network. A Foscam 1981 was chosen due to its availability, price, and ability to be powered from standard 5V dc.

RoboRealm

RoboRealm is a third-party vision software program that provides easy access to a wide array of vision algorithms and supports plugins to control a large amount of hardware. Additionally, the software provides basic web hosting and a well-documented API for use in other languages. This software was chosen due to its short learning curve, great out-of-box support, and the adaptability to several languages or shifts in designs.

Building and Programming the Robot

Following the included documentation, the IRobot Create was set up to communicate across its Bluetooth network with the host PC. The Foscam camera was also set up on DMC’s local network using a LAN connection and then configured to connect to the wireless network on power-up. 

Once configured, the camera was attached to the top of the IRobot Create and connected to the robot's switched battery power supply using a 5V regulator. This was necessary since the robot's 5V outputs were not capable of providing the current necessary to power the camera.

DMC leveraged the out-of-box functions in RoboRealm to create a working robot in a short timescale. The programming module involves a scan cycle based on the incoming frame rate from the chosen camera. Different modules can be dragged and dropped into this scan cycle, and they include image manipulation algorithms, command modules, general logic functions, and scripts in several languages. 

Once placed in the processing pipeline, the modules can be configured based on their specific function. The software comes packaged with plugins for both the IRobot Create and Foscam camera that handle the low-level communication with each device and allow commands and statuses to be sent/read using user-created variables. Below is an image of the three primary modules used in the autonomous robot as well as the processing pipeline.

We can now go into detail on each of these areas, starting with the image stream.

The image stream shows the current video stream from the chosen camera, in our case, the Foscam’s wireless stream. The image stream also shows the results of all the image processing up to the selected step in the processing pipeline. Additionally, if the web server is set up, this is the same image that is streamed to the site.

Next, we will look at the processing pipeline.

This is where the overall robot functionality and image processing is defined. Functionality is added by placing modules into this pipeline and programming their functionality. 

At the very top, you see the programming block for our wireless camera. This block allows the address of the video stream to be defined along with login information for the camera's controls. It also allows a variable to be set controlling the pan and tilt of the camera. 

The majority of the processing pipeline after the camera is devoted to three different operating modes. Within each operating mode, there is a set of image processing modules that return a set of variables derived from the incoming image stream as well as a VBScript module that computes robot commands based on these image variables. Lastly, there is the IRobot create a module that defines several variables used in the script modules to control aspects of the robot.

We will now look at the script module in more detail as this controls most of the robot's operation logic.

The scripting module allows you to write scripts in several languages (visual basic in our case) to provide logic for your processing stream based on variables defined in other modules. In our program, these scripts are used to take data from the image processing and robot sensors and use it to send movement commands to the robot. 

For example, most of the image processing produces x and y coordinates of a targeted item on the image (line, farthest clear path, etc.). These coordinates are then used to set the variables defining the robot's left and right motor speeds to different values telling the robot to move forward, backward or turn. 

Other variables representing the robot's sensors can also be queried to help control the robot (e.g. when the front bump sensor detects an object and the robot moves backward).

Lastly, we will look at both the camera and robot modules.

These modules don’t provide any specific programmability, but rather allow variables to be assigned to different functions of the robot and camera. By including them in the processing pipeline, they also handle all low-level communication with each device to constantly update variables and send commands.

Web Deployment

Finally, to allow control of the robot by any computer in the office, the robot's controls were deployed to an internal website using RoboRealm’s web hosting feature. By activating the web server feature, RoboRealm publishes a website on the host computer using files customizable by the programmer and a JavaScript interface to send and receive variables from the web page. 

The web page was set up to allow manual control of both the robot and camera as well as activation of the two autonomous modes and the IRobot’s default docking program. It also updates the user with the state of various sensors on the robot as well as battery levels. DMC leveraged an example page from RoboRealm’s tutorials to facilitate the creation of a functional and appealing web page.

Be sure to check back for continued development of the DMC autonomous robot!

Comments

There are currently no comments, be the first to post one.

Post a comment

Name (required)

Email (required)

CAPTCHA image
Enter the code shown above:

Related Blog Posts