CSCI P545  Embedded & Real-Time Computing Thu Sep 24 12:57:06 EDT 2009 [SDJ]

Fall 2009

CSCI P545 – Embedded & Real-Time Systems
CSCI B490 – Experiments in Autonomous Robotics
CSCI Y391 & Y790 – Independent Study Robotics Projects

Field Testing Status
oct 30 14:30   GO   Wednesday: we will test today starting at 1:00pm. We will probably test again on Friday this week. [NWS]

References  
Links Projects Vision
Notes time timers documentation
guidelines
steering
Labs 1 2 3 4

What's New – Look here regularly for postings
nov 11
NOTE: Next week I will asking groups to present informal status reports on their lab projects (GPS following with obstacle avoidance). I would like each presentation to include a graphic visualization of telemetry data from a field test. Hence, one lab objective this week is to collect positioning data and prepare it for presentation. You may show simulation screenshots, if you wish, but Your presentation should discuss the approach you are taking to navigation, the status of its implementation, and a list of immediate testing objectives. You may also include simulation screen-shots, if you wish, but these are not substitutes for "live-testing" telemetry.
Here is a short example of plotting telemetry data using Gunplot [HTM]
oct 27
Ye Fan sent me this question, and I thought I should share my response:
I have a question about the range of how far that the sensor is able to sense an obstacle. ... I found it is set to be 4 meters in synlaser.py. [In the] current way_point file, the navigation speed limit is 4.0 or 3.0 meters per second when cart is travelling heading to the target way-point. I don't think it has enough time and distance to slow down and avoid the obstacle if it is running in a high speed.
Mr. Fan is right that with a range of 4 m and a speed of 3 m/s, you would not have sufficient time to avoid an obstacle directly in your path. The speed limit field in the waypoint list is just that—a limit. You can go slower but should not go faster. I recommend starting your runs at 2 m/s, or slower, until you can reliably get around the obstacles.
The final lab specifies that obstacles, once detected, do not move. And your assignment is to run the GPS course three times. Under this scenario, your driver may be able to run portions of the course faster once it knows where all the obstacles are. However, concentrate, first, on avoiding the obstacles; second, on staying within corridors; and last, going fast.
Finally, we have acquired a new laser ranging sensor whose range is 20 m. We will get this integrated in ERTS as soon as we can. Meanwhile, as Mr. Fan points out, you can change the range of synlaser in the simulator if you want to explore.
oct 22
P545 Project Descriptions [HTM]. NOTE This information is under active revision.
I have posted some sample images of traffic cones [HTM] on the test field and art paths [HTM] at the IU golf course. These can also be found through the ERTS Vision Project's Image Catalog
oct 19
Lecture notes on timers [HTM]
14 oct
Updated Lecture notes on Time [PDF]
The interesting imagery that I mentioned in class today is on this web page [HTM]. I had a preliminary discussion with Prof. Lumsdaine this morning about doing an experimental prototype with this novel technology on ERTS the Spring. Let me know if you are interested in participating in such a project.
12 oct
Lecture notes on Time [PDF]
Comparative performance of various timing mechanisms [HTM]
oct 6
The VMware SyncFS image can be obtained from CS accounts from /nfs/nfs2/home/scratch/bhimebau/ Sub-directory ubuntu-server-9.04-i386/ is an uncompressed copy of the image, The compressed copy in p545sim-vmware-image.zip is too big (4.9 Gb) for Linux systems, but works on XWP PCs. Dave Bender has made copies on 2-level DVDs, so if your DVD reader accepts that medium, that may be the fastest way to upload.
At the time of this posting, VMware images have not been put up on the borrow or LH035 lab machines. We are working on this. For now, you are limited to your personal notebook and desktop hosts.
The loginID and password are both p545user. Look at the README file on the Desktop for instructions.
Tips:
The instructions say to run cartfs synlaser ui/visualizer.py, and all components in the foreground, seperate term windows. Failure to do so may cause the VM to die.
The VM image does not presently support USB devices. We are trying to resolve this issue. Meanwhile, two simple ways to transfer files to the VM are via SVN or using secure-copy (See man scp) in the CS network.
sep 25
There have been some questions about organizaiton and content of lab reports. I have posted general descriptions of report organization, including some recent examples [HTM]. These will be discussed in lecture next week.
System Documentation Guidelines [PDF]
sep 23
We scheduled two weeks to complete Lab 2 [PDF], so it is not "due" yet. In fact, the nominal due dates are just indications of timely progress. You may continue working on these lab objectives throughout the semester.
Materials for Lab 3:
[PDF] Lab 3 Description. Ignore the due-date.
  Note that in Lab 3, we are driving a GPS course containing one obstacle, at a predetermined point within that course. The main goal is simply to drive around the obstacle, staying within the course corridor if you can. Thus an obstacle is like a "negative" waypoint: you want to drive around (as opposed to through) its LBO. In Lab 4, the goal is the same, but you won't have advance knowledge of obstacle positions. You should design your solution to Lab 3 with that in mind.
sep 16
I have posted some preliminary information relating to the ERTS Vision project [HTM]. Please let me know if you are unable to access any of this information. Also, be advised that I will shortly move it to a secure directory.
sep 13
Notes on steering geometry[PDF] and steering amplifier PID [PDF]
Materials for Lab 2:
[PDF] Lab 2 Description
David Bender has posted a "simple vehicle dynamics simulator" [URL]. He goes on to say,
"It requires pygame for the visualization, but I'll check in a non-gui option shortly. I'd also be willing to post my square.py to show how to hook it up if needed—though its as simple as replacing
from cartfs import CartFSLoggingHandler, Sensor
with
from sim import CartFSLoggingHandler, Sensor
[HTM]
• Previous What's New postings
Course Information [description] [topics] [background] [text] [goals] [grading]
Course: P545 Embedded & Real-Time Systems
B490 Experiments in Autonomous Robotics (3 cr.)
The term embedded system refers to purpose-specific software executing in a dedicated setting. Some examples are: cellular telephony, network routing devices, consumer electronics, robots, digital avionics, automotive systems, and ``smart'' cards, to name a few. This is a project-oriented course in which classroom topics are explored through in-depth experiences in a substantial laboratory project.
Instructor:
Lab:
Steve Johnson (sjohnson@cs.indiana.edu)
Bryce Himebaugh (bhimebau@cs.indiana.edu)
Meetings:
Lecture: 9:30-10:45 MW LH035
Lab: 2:00-5:00 F LH008 or the P545 Test Field
Description: P545 Embedded and Real-Time Systems (3 cr.) P: Any 400-level ``systems'' course (middle digit 3 or 4). Design and implementation of purpose-specific, locally distributed software systems. Models and methods for time-critical applications. Real-time operating systems. Testing, validation, and verification. Safety-critical design. Related topics, such as resiliency, synchronization, sensor fusion, etc. Lecture and laboratory.
NOTE: Students with deficiencies but having compensatory special interests (e.g. instrumentation science, robotics, cognitive science, multimedia, etc.) are encouraged to consult with the instructor about approval to enroll.
Laboratory: ERTS is a computer controlled golf car. In the first half of the course, students do a cumulative sequence of assignments learning basic GPS navigation and obstacle avoidance. In the latter half, projects are based individual interests and backgrounds of the participants.

Please Note:

Embedded system design requires a broad background, encompassing both system engineering and "domain expertise." This course is designed to accomodate students with varied interests and goals. See Background Requirements below. However, the higher aim of the course laboratory is to develop a configurable platform for collaborative research in systems, sensor networks (especially vision), and congnitive science (especially machine learning and human-robot interaction). Or contact the instructor about other participation options.

§ Course Overview

The term embedded system refers to purpose-specific software executing in a dedicated setting. Some examples are: cellular telephony, network routing devices, consumer electronics, robots, digital avionics, automotive systems, and ``smart'' cards, to name a few. This is an advanced, project-oriented course in which classroom topics are explored through in-depth experiences in a substantial laboratory project. Embedded systems are ubiquitous in modern society. Their defining characteristics are distinctive in many aspects, and consquently, their mathematical models, design methods, implementation techniques, operating systems, performance analysis, and computer-aided design tools differ substantially from those for to other classes of systems. Furthermore, underlying technologies are evolving rapidly. The perspective offered in lecture is augmented by a substantial, cumulative laboratory project, which provides the necessary experience to pursue projects and research entailing embedded-system use or design.

§ Background Requirements

NOTE: Students with deficiencies but having compensatory special interests (e.g. instrumentation science, robotics, cognitive science, multimedia, etc.) are encouraged to consult with the instructor about approval to enroll.

The course assumes a basic fluency in ``systems'' concepts/terminology and senior-level programming competency. Additional background in diverse areas such as networks, distributed computing, hardware, etc., is desirable but not required.

Much of the programming involves interaction with the underlying operating system through system calls. Exposure comparable to that of the Operating Systems (P436) is adequate preparation. Specific OS facilities used include: sockets, signals, time, timers, and a few others.

Embedded systems are typically made up of both software and hardware components. This course focuses on software aspects. However, if a sufficient number of hardware students are enrolled, opportunities will be created to work in that realm, most likely using FPGA and micro-controller technologies, as taught in P442.

§ Textbook and References

It has not been determined whether this section of P545 will have a required textbook. Additional readings are posted on line through this web page. For reference purposes, students may wish to acquire an advanced book on system-level programming in Unix. Here is a list of possible textbooks:

  1. Hermann Kopetz. (Recommended but not required) Real-Time Systems: Design Principles for Distributed Embedded Applications. Kluwer Academic Publishers, 1997. Strong orientation toward safety-critical application, sychronous methods and a particular approach to resiliency.
  2. Wayne Wolf. High-Performance Embedded Computing: Architectures, Algorithms, and Applications. (Morgan-Kauffman Publishers, 2006).
  3. Alan Burns and Andy Wellings. Real-Time Systems and Programming Languages Addison-Wesley, 2001 (3rd ed.).
  4. Jane W.~S.~Liu. Real-Time Systems. Prentice-Hall, 2000.
  5. Qing Li with Caroline Yao. Real-Time Concepts for Embedded Systems. CMP Books, 2003.
  6. W. Richard Stevens and Stephen A. Rago. Advance Programming in the UNIX® Environment (2nd ed.), Addison-Wesley, 2005. Architectures, Algorithms, and Applications. Morgan-Kauffman Publishers,

§ Topic Outline

Tentative. Based on 40 aggregate lecture hours, based on 32 75-minute lectures
 • Architectures and Applications [1]. Digital control; "smart" electronics; sensor arrays; multimedia; networking components; instrumentation; heterogeneous systems; system-on-chip. Networks: ad hoc, common-carrier, hierarchical etc.
 • Terminology and Tradeoffs [2]. Reactive systems, event models; periodicity; throughput, latency, jitter, slack; polling and sampling; modes and configurability; resilience; hard-time and soft-time constraints. Worst-case and expected-case analysis.
 • Tools and technologies [6] Tools, design flows, libraries and packages, instrumentation, documentation.
 • Time [3]. Physical and logical; resolution, precision, accuracy; global and distributed synchronization. Clock synchronization algorithms, agreement protocols.
 • Resiliency [3] Faults, errors and failures; failure rates, transient failure; fault models; fault containment; fault tolerance and agreement; recovery.
 • Communication [4] Time division, carrier sense, collision-detect, etc. OSA model. Representative standards (e.g. IP, FlexRay, CAN, WiFi, ad hoc). Buffer network analysis.
 • Real-Time Operating Systems [6] Threads, tasks, processes periodicity. Scheduling parameters, static and dynamic heuristics; Thread integration, priorities and preemption. Models and instances of memory/file management.
 • Methods [2] Process-oriented design; synchronous and asynchronous abstractions; message based, image based, data-flow, etc. Design flow, simulation. Requirements, specification, implementation.
 • Testing. [3] Unit, component, integration testing; Testing frameworks, simulation. Instrumentation and measurement; Validation and verification; Formal analysis: models, tools. Safety aspects: classification, certification, documentation.
 • Sensors [4]. Statistical models, resolution, filters; feature synthesis and fusion.
 • Components [4] Device handling, point-to-point protocols (e.g. USB, Firewire); Platform computers, microcontrollers, FPGAs and software cores; Codesign, incorporating hardware, configurability and reconfigurability.

§ Languages and Tools.

The primary programming language used in this course is Python running under Linux. Python is a scripting language, increasingly popular for rapid prototyping. Prior knowledge of Python is not assumed, but it is expected that participants have enough programming experience to learn it as the progress.

Later in the course, the choice of language and system is left to the student. At higher levels, one goal is to "mount" existing software systems for experimentation in ERTS. For students who are interested in exploring embedded systems at lower implementation levels, knowledge of C, and familiarity with Linux system calls is needed. For students interested in real-time operating system (RTOS) aspects, copies of the QNX RTOS are available.

The course project includes a substantial, documented design effort. The class will uses the Doxygen documentation generator for this purpose.

§ Laboratory

The standard course laboratory is a full-semester, whole-class project involving specification, design, implementation, and testing of a real embedded system. Participants work in teams of 3 to 5 people; and every effort is made to assure that each team, in aggregate, has the necessary skills to complete the project successfully.

The primary components in evaluating projects are (1) field testing for functionality and (2) documentation the work, which includes a presentation.

The laboratory platform is a golf car modified for computer control. Previous classes have developed basic solutions for:

  1. autonomous navigation system using the Global Positioning System (GPS) to follow a pre-determined course, and
  2. obstacle detection using a short-range laser range-finding sensor.
Each successive class will refine and enhance existing capabilities. The goals in 2009 include:
  1. real-time obstacle avoidance
  2. integration of a vision system
  3. experimental prototyping for other researchers.

Initially, the class is given a software framework for controlling steering, acceleration and breaking, as well as sensors for GPS, proximate object detection, and rudimentary vision. Classroom lectures explain and explore the implementation of the framework as student groups develop solutions to the navigation problems in a cumulative series of lab assignments, such as:

  1. Lab bench exercises dealing with time measurement
  2. Evaluation of prior GPS Navigation projects
  3. Empirical characterization vehicle dynamics
  4. Path planing, tested in simulation
  5. Field testing for refined path planning and obstacle detection. to continue throughout the rest of the semester.
  6. Integrating external sensor input
  7. Sensor fusion, tactical path planning
  8. Public demonstration of results

It is important for participants to understand that, as they develop and test their implementations of higher functionality, they are also contributing to the on-going design and enhancement of the laboratory platform by reporting on its empirical performance in comparison to design assumptions on which their software development is based.

§ Evaluation

More to come...

Please review: