Requirements Document Big Dog’s Kryptonite James Crosetto (Bachelor of Science, Computer Science and Computer Engineering) Seth Schwiethale (Bachelor of Science, Computer Science) Jeremy Ellison (Bachelor of Science, Computer Science and Computer Engineering) Faculty Mentor: Tosh Kakar Date: 11/3/08 Version: 4 Introduction The idea of this project is to enhance an R/C car. It will demonstrate each of our group member’s abilities to problem solve, task manage, and think creatively. Through this project, we will design additional functionality for the R/C car using computer engineering and computer science. With the addition of computer hardware and a camera, our R/C car will be able to be controlled over a wireless network from a computer rather then by a radio frequency remote. These modifications will increase the range at which the car can be controlled as well as allow the user to control the car without needing to have it in sight. Other features may be added as well – features such as the ability of the car to retrace its route to a “safe” location if the network connection is lost. We have begun research in areas we foresee as necessary for the success of this project. The first area is determining how all of the parts of the R/C car work. These parts include the motor, the power supply, and the speed and steering controls. The next major area of concern is the wireless communication between the car and the user’s computer. We need to determine the signal strength and network bandwidth necessary to stream video to the user’s computer and still allow responsive control of the car. We also need to determine a way to send signals to the car which control steering and acceleration. Project Description Our project will create an R/C car that can be controlled over a wireless network from a computer. When an R/C car is purchased from a store its operating range is limited by line of sight and the maximum distance from the car the radio frequency controller can operate. With a fully successful project, both of these limitations will be removed. The first step will be to add a camera and computer hardware to our remote control car. Then, we will create a program which will allow a user to establish a connection between the hardware on the car and their personal computer. The user will be able to control the car and receive video feedback from the car through this connection. Thus, we will have to design a circuit between the computer hardware on the car and the car’s steering and acceleration controls. This circuit will take a signal from the computer hardware and convert it into an appropriate signal that the car’s controls will be able to understand. Successful implementation would provide unrestricted operation (line of sight and distance from the controller are no longer factors) of the R/C car within the range of the wireless network being used. While the idea seems straight forward, there are many facets to this project. On a functionality level, we will need to break the project up into subtasks which we can complete and test individually before moving on to the next one. The first task will be adding hardware to the car that can connect to a wireless network. Next, we will need to connect this hardware to the steering and acceleration controls on the car. Once the hardware issues have been solved, we will need to implement a program that can connect to the hardware on the car over a wireless network. The car will be identified via an IP address. First we will implement a basic program that will just be able to send signals to the car. The signals will comprise steering and acceleration control. Next, we will add a GUI which will incorporate the steering and acceleration controls in a user friendly manner. Finally, we will display a real-time video feed from the camera on the R/C car within the GUI. Beyond the tasks outlined, we currently have the goal of designing the hardware on the car with a safety retreat feature, which involves keeping a log of the cars actions in memory. This will allow the car to retrace its movements to its starting point in the event the network connection is lost. In the event this happens, we also would like to design the computer hardware on the car and the program to automatically reestablish a network connection if it becomes possible. In order to complete all the intended tasks of this project, we will need to research many things. The understanding of networks (both generally and the understanding wireless networks specifically) will be essential. Our program needs to communicate without fault over a wireless network to the hardware on the car and vice versa. Understanding electric circuits is another researching task at hand. How do the acceleration and steering controls work? How can we implement a circuit so the computer hardware on the car can send signals to the car to make it change direction or speed? These are some of the major issues that we will need to research to answer. A minimally successful project will consist of a car that can be controlled over a wireless network. This means we can send a steering or acceleration command with a specific purpose, such as turn the car to the left, from the user’s computer and the car will respond as directed within a couple seconds. This shows we have learned how to establish a network connection between the hardware on the car and the user’s computer. It will also show that we have learned how to connect the hardware on the car with the controls on the car so that the car responds appropriately to commands. Thus, our learning objectives will be satisfied. Functional Objectives Summary 1. design and implement computer hardware for the car 2. design and implement the hardware on the car to convert a signal from the computer hardware to a signal that the controls on the car can use 3. have the hardware on the car connect to a wireless network via TCP/IP 4. design a program to send control signals to hardware on the car 5. establish a connection between the hardware on the car and the program on the user’s computer over a wireless network 6. establish full ability to control car (acceleration and steering) 7. establish video transmission from camera on car to GUI on user’s computer 8. implement memory of cars movements and ability to retrace them in the case the network connection becomes lost 9. automatic internet establisher 10. full addition of any other accessory features Learning Objectives Summary 1. Understand how communication over wireless networks work. 2. Learn how information can be both sent and received efficiently over a wireless network. 3. Learn how to detect whether a wireless network connection can be established and how to detect immediately when a connection fails 4. Learn how a circuit can be built to modify a signal (such as a change in current) 5. Learn how a circuit can send a variable signal (this can be used to achieve different speeds of the R/C car) 6. Learn how the acceleration and steering circuits work on the R/C car Use Cases: Use Case: Open control interface application and select network settings. Actors: RC car driver. Precondition: User needs to have the application in a location on their computer’s hard disk. The network RC car and onboard hardware must be powered on. Steps: Actor actions System responses User Runs the application GUI opens with a prompt to create/connect to a network. User Selects/creates a network Application validates selection and establishes a connection with RC car’s controls and camera. GUI displays live video feed from camera and awaits commands Control the network RC car’s motion via remote GUI app RC car driver To steer and propel the RC car from a remote location under the ideal conditions of a stable connection between the RC car and the remote control app. Precondition: Open control interface app and select network settings use case. Mouse cursor is located within video feed display area. Steps: Actor actions System responses User presses space bar RC car accelerates in the forward direction to a velocity determined by the position of the cursor which will act as a speed control in our user interface. User moves cursor around video display RC car’s direction and velocity controls react appropriately to changing orientation of cursor. User releases space bar RC car discontinues acceleration, eventually slowing to zero velocity. Use Case: Actors: Goals: User presses Ctrl+space bar RC car accelerates in the reverse direction to a velocity determined by the vertical orientation of the cursor on the video display and in a direction determined by the horizontal orientation of the cursor on the video display. User moves cursor off of video display area vertical and horizontal orientation are set to the last position of the cursor before it left the area, until the cursor returns to video display area. Postcondition: The nature of this use case requires that any of these steps may be performed in any order, so it is necessary that during and after each step, the video feed continues to be processed and displayed. Use Case: Actors: Goals: Precondition: Steps: disconnect from network and close interface application RC car driver gracefully disconnect from network and close program Open control interface app and select network settings use case. Actor Actions System Responses click disconnect button on GUI Disconnects user’s computer from the network. (car considered dead) kill program Use Case Model Task Breakdown 1. Design a. Hardware Design i. Design how car will be controlled 1. Determine what will be used to transmit signals to the RC car’s steering and acceleration “boxes” a. What kinds of signals will be used (RF or wired). b. What will be used to transmit the signals (signal generation). 2. Design signal acquisition hardware a. Research networking and TCP/IP protocols b. Research and decide what hardware will best suite our on-board (on rc car) computing/networking needs c. test our system in increments i. test remote computer to on-board hardware communication ii. figure out what we can use as output from hardware d. figure out what RC car’s hardware needs as input (do testing on servo connections and determine Voltages, etc) e. research how to get input / output to agree or at least shake hands. 3. Safety recovery a. research an efficient way for on board system to memorize all maneuvers made. b. If signal is not recovered in a designated amount of time (1 min) car should backtrack, using the memory. c. stop backtracking once car has a strong signal again. ii. Design video 1. Use a camera mounted on the car for visual feedback to the user a. research and design application to receive video stream from camera. b. first design dummy applications to communicate with IP camera, using the VAPIX® API. iii. Design how car and electronics on it will be powered 1. Design electronics to use car battery power or another source b. Software Design i. Design user interface 1. Live video feed from camera on car is displayed 2. Current signal strength is displayed. 3. Controls for steering and accelerating are simple. a. Possible use of a joystick or something similar? 4. Alert if signal is lost. 5. Alert if malfunction (such as loss of steering control). ii. Design network connection to car 1. User side a. Program will try to find car and will alert user when a connection is established or if a connection cannot be established (research network connections) b. Signals must be generated based on user commands to control the car. (write applications that send data over network) c. Program will monitor connection status to warn the user when the signal is weak. (research how to monitor our wireless signal) d. Program has a scan function to continuously try to detect a car if connection lost in a non-graceful manner. (again research network connections) 2. Car side a. Signals must be interpreted from user and then sent to proper controls on the car (do a lot of testing here) b. Video feed must be interpreted and relayed back to user program. (Using VAPIX® API, retrieve stream from camera to our interface iii. Design safety recovery 1. Car must keep track of movements and then be able to retrace them in case of a loss of signal 2. If unable to acquire signal, car must be able to return to area where it had a signal. c. Purchase required hardware/software/books/etc. 2. Implementation a. Car side i. Build and test network connection hardware and software 1. Make sure computer on car can send and receive signals 2. Implement software interpreter on the car for signals ii. Build and test controls 1. Connect computer to controls 2. Test whether signals sent to the car are converted correctly so that desired actions actually happen (for example the car accelerates and decelerates when it is supposed to). iii. Connect camera to car 1. Test to make sure video is being sent to the computer on the car and that it is then interpreted correctly for transmission to the user interface iv. Build safety recovery system 1. Test if car can safely navigate the way it came 2. Test that car finds a “safe” location if it is unable to recover the signal. b. User side i. Implement and test network connection software 1. Implement software to establish a network connection to car 2. Test to make sure it connects correctly to the car and that the connection is “realized” by the software 3. Create signal generator a. Test that signals are sent to the car and received from the car correctly. b. Test ability to control the car from the user side ii. Implement user interface 1. Make sure all necessary information is displayed 2. Create video “window” for displaying video feed from the camera on the car a. Test that video is received correctly 3. Test that messages are displayed appropriately (for instance, when a connection is lost the user must be alerted). 4. Create easy to use help menu iii. Implement user controls 1. Keyboard or joystick commands are set (and configurable?) 2. Test controls to make sure car reacts as it should. c. Test full implementation i. Stress test different aspects 1. Make sure system reacts correctly when a connection is lost. a. Make sure the connection can be reestablished. 2. Test when the network connection starts to get bogged down (i.e. lots of quick commands) 3. Test unexpected closing of user program. a. Car should enter safety/recovery mode. b. User should be able to restart program and connect back to the car. 3. Add additional features a. Make sure they are reversible! (if something doesn’t work we should be able to revert to previous working configuration without a problem). 4. Deliver the final product Preliminary Timetable Budget Needed Materials: User Side Computer IP camera with minimal functionality - - already have $250-300 usable embedded system (preferably Linux) on board wifi connectivity usable signal output tcp/ip, http protocol Preferred additional functionality - low power requirements - supports encryption - web server - bandwidth efficient - mpeg-4 compression - interfacing API RC car Wireless Networking Bk Linux Bk Other Books/Manuals Website Development Languages: Java Processing Vapix or similar API Signal interpreting hardware - already have Library Library Google/Library Google Code - free free free to be determined (not to exceed $50) References Various definitions and information obtained from pages on www.wikipedia.com. http://www.networkcamerareviews.com/networkcameras/ - website with professional reviews on most IP cameras on the market. http://www.axis.com/files/datasheet/ds_207mw_combo_30820_en_0801_lo.pdf - detail specs on the Axis 207mw: the camera we are interested in using. http://www.axis.com/products/cam_207/ - basic info on the Axis 207 Books: Lethbridge, Timothy C., and Robert Laganière. Object-Oriented Software Engineering: Practical Software Development using UML and Java . New York: McGraw Hill, 2001. Hunt, Craig. TCP/IP: Network Administration . Sebastopol: O’Reilly, 20012. Manuals: VAPIX® version 3 RTSP API Documentation.: http://www.axis.com/techsup/cam_servers/dev/cam_http_api_index.php Axis Network Cameras and Video Servers Embedded Scripting Guide: www.axis.com Emails: G, John. "Re: Engineering Student." Email to Futaba. 3 Nov. 2008 Glossary Computer network: a group of interconnected computers. Electric circuit: an interconnection of electrical elements. IP camera: a unit that includes a camera, web server, and connectivity board. GUI (graphical user interface): a type of user interface which allows users to interact with a computer through graphical icons and visual indicators Memory: integrated circuits used by a computer to store information. Network Bandwidth: the capacity for a given system to transfer data over a connection (usually in bits/s or multiples of it (Kbit/s Mbit/s etc.)). R/C (remote controlled) car: a powered model car driven from a distance via a radio control system. RF (radio frequency): a frequency or rate of oscillation within the range of about 3 Hz to 300 GHz RTSP (Real Time Streaming Protocol): A control protocol for media streams delivered by a media server. TCP/IP: an entire suite of data communication protocols, including Transmission Control Protocol and the Internet Protocol. User Interface: means by which a user interacts with a program. It allows input from the user to modify the program and provides output to the user which denotes the results of the current program setup. VAPIX®: RTSP-based application programming interface to Axis cameras. Video transmission: sending a video signal from a source to a destination. Wireless network: computer network that is wireless. Signatures