In what follows, we describe the baseline robotics project for CS23. The idea of the “baseline” project is that groups must as a minimum deliver on the baseline functions of the project. After that they are free to take their project in any direction they seek with the idea of reinforcing the skills developed in the course and labs - and of course we really want you to have fun!
We first present an overview of the project and its goals. Following this we discuss the important milestones, deadlines, and deliverables, and the major software components. We do not present any detailed design information - that is for the groups to do.
Why this project? The project is distinct from the large thematic search engine labs that you coded. And, to some degree the project is simpler in terms of lines of code but more complex because now the code is not centralized nor does it run on a standalone laptop, rather, the project code runs as a distributed client-server controller model partly on your laptop and partly on the robot. The control is asserted using sockets (which you mastered in the last lab) between the controller running on your laptop and the robot. Another distinction between TinySearch and the project is that the project represents a real-time control system with the robots being controlled over a wireless network. The skills gained during the next two weeks will be complementary to the set you developed during the development of TinySearch.
Overview of the robotic treasure hunt. The goal of the project is a robotic controlled treasure hunt where the robots move around the building and collect “keys” from sensors distributed around the building. The project develops a system for communication and control, and data retrieval of sensor data from the robot’s ranging sensors (e.g., representing how far the robot is from an obstacle) and wireless mote sensors (e.g., which provide keys and sensor data) distributed around the building or outside (if the weather is good). The goal is to retrieve all the keys in the environment in the shortest time. The search for treasure (keys) is manual in the baseline project. A map of the building where the sensors are located and their associated keys will be provided.
The keys must be retrieved in a certain order. The first key gives access to the second sensor (i.e., if the first sensors key is provided to the second sensor, the second sensor will provides the key for the next one and so on). The last sensor provides the final key and you get the treasure. Each sensor emits a key once it has received a request with a valid key. The bootstrapping of the hunt is that the robot is provided with the location and key of the first sensor.
Extra credits. Any significant extension beyond the baseline project will be rewarded with extra marks. For example, autonomous (i.e., by means of a navigation/exploration algorithm) treasure hunt would be interesting. Or using the sensor information on the local mote on the robot or from the sensors distributed around the building. The mote sensors include temp, humidity, light, accelerometers, audio samples. The motes also include a speaker that could be used. Another idea is to use the vision input from the camera (e.g., Wei’s simple tracker of a certain color). These are just some ideas. Feel free to come up with your own ideas as you code the baseline system and understand the environment and its potential.
While the project runs for short period of two weeks it represents a microcosym of what you would find in the industry. You have to design, implement, test and integrate a complex system in a small team. You have to quickly determine the strengths and weakness of your team and once the design is complete come up with a sound strategy to divide and conquer; that is, parcel out the implementation and work together to deliver good software and a robust solution that will be demoed.
The goals of the project are:
The overall course grade for the project is 30%. The project milestones and deadlines are on the project page
project page. Please note that the project grade (consider 100%) is broken down between the design (20%), implementation/code (30%), demo (35%) and report (15%).
Please note we intend to give all members of the team the same grade unless there is some large imbalance in effort.
Each team gets its own robot and pledges to care and look after it. These are valuable machines that we need intact for next term’s students. So please handle with care. The following rules are strictly enforced:
Robots: The robots cannot leave Sudikoff under any circumstances.
The should always be stored in the team’s robot storage box.
Be very careful when the robots are on a table in Lab 001. Make room for them. Make sure the can not be knocked off a table. You have one robot and if it breaks you do not have a project.
We have made modifications to the robot for sensing and vision. So there are extra wires and what not so again please treat with care and makes sure wires are secured.
Batteries: robots always like it when the are powered to go. Make sure you keep the spare battery charged and do not have to wait around because both your batteries (main and spare) need charging.
Team work: Friendly competition is the name of the game
We assume each team operates autominously but is helpful to members in other teams in helping them move forward. You know a trick then share it.
The major systems components are discussed below. Note that we do not provide lots of details on the components or their design. We will discuss the APIs that we will hand out in the tutorial.
Robot Controller. The robot controller exports a library for the movements of the robot. This component runs on the robot itself.
Sensor Communications. This subsystem provides a primitive to retrieve the next key given the previous key. The sensor should store a configuration file to map the sequence of keys. We will provide an API to the “serial forwarder” that communicates with the mote and external static sensors distributed around the building. This API will also provide all the sensor information that would be need if you extend the project beyond the baseline - for example if you wanted to compute sound, light, or temperature map of the places that the robot visits. The laptop would communication with external sensors over a sensor socket between the laptop and robot.
Camera This component provides a library to retrieve frames from the camera. The laptop and robot communicate for the transfer of video image frames using the camera socket. A simple protocol needs to be implemented such as getImage (from the laptop to the robot) and receiveImage (from the robot to the laptop).
Communication Server (on the robot). The communication server is implemented as a standard TCP server. The component should be able to recover from network failures. The robot ranger information is sent over the command socket between the robot and the laptop.
Communication Client (on an external computer/laptop) The communication client is implemented as a standard TCP client. The component should be able to recover from network failures. The robot commands are sent over the command socket between the laptop and robot.
Portal Visualization The portal visualization is implemented using a simle graphical UI tool kit called glade2 which is based on GTK+ (GIMP tool kit). A simple example of the portal is shown in Figure 1. It allows the user to direct the robot between sensor locations via the input from the camera. There are five commands to guide the robot: forward, backward, left, right, stop. You might implement other commands such as fast forward or back to move the robot more speedily around. But the baseline only includes the five simple commands listed above.
The portal visualizes the current surroundings of the robot retrieved from the camera. A box displays the current keys and the next sensor to be contacted. The portal shows also the IDs of the sensors that are currently in reach. The student should be able to insert the first key in the box. This key is then transmitted to the robot. Feel free to make a better protal and for example for extra credits display the sensor data from around the building (light, temp, noise).
We plan to provide a number of API’s for the development of the project. We will discuss the detailed discussion of the APIs in the tutorial. We will provide an implementation of the robot controller, i.e. a set of functions to move the robots around. We will also provide a library for the communication with the sensors. The subsystem for retrieving frames from the camera will also be provided as an API.
We will have one flow of information from the portal to the robot to control and move the robot and one from the robot to the portal to retrieve the images and the keys/ids from the sensors. Therefore there will be three sockets open between the controller on the laptop and the robot: 1) command and control socket, which controls the robot (commands sent from the controller to the robot) and get ranging information from the robot; 2) sensor socket, which is used to send and receiving keys to the sensor to and from the robot, respectively - note for extra credits you could receive other sensing data too (sound, temp, light, etc.); and 3) camera socket, which is used to receive camera frames from the robot.
The specific details of the following APIs will be defined in the tutorial.
Robot Movement
int garciaMoveForward(float distance)
int garciaMoveBackForward(float distance)
An integer will be returned to indicate whether the move is success or not (0 success, 1 fail).
int garciaTurnLeft(float angle)
int garciaTurnRight(float angle)
Robot Status Reading
float garciaReadStatus(int index)
This function is used to retrieve information about front-range, side-range, rear-range, battery voltage, etc.
Wireless Sensor Reading
int getSensorId() This function returns the sensor id.
int getNextKey(int key) This function returns the next key given the current one.
WebCam
TakePicture(byte* data) This function returns a picture (320*240)
All these functions are blocking.
On this webpage (on the right hand side) you will find lots of interesting information about the robot. Check it out