Monday, March 19, 2012

Study Programe Robot

Why learn the basics of programming using robots instead of more traditional method? For the last 50 years mainstream computer science has centered on the manipulation of abstract digital information. Programming for devices that interact with the physical world has always been an area of specialization for individuals that have already run the gauntlet of abstract information based computer science. In recent years, we have seen a proliferation of processing devices that collect and manage information from their real time environments via some physical interface component{among them, anti-lock brakes, Mars rovers, tele-surgery, arti cial limbs, and even iPods. As these devices become ubiquitous, a liberally educated person should have some familiarity with the ways in which such devices work{their capabilities and limitations.


Much of computer science lies at the interface between hardware and software. Hardware is electronic equipment that is controlled by a set of abstract instructions called software. Both categories have a variety of subcategories.




Hardware
Computer hardware is typically electronic equipment that responds in well-de ned ways to speci c commands. Over the years, a collection of useful kinds of hardware has developed:



1. Central processing unit (CPU) - a specialized integrated circuit that accepts certain electronic inputs and, through a series of logic circuits, produces measurable compu-tational outputs.
 

2. Random access memory (RAM) - stores information in integrated circuits that reset if power is lost. The CPU has fast access to this information and uses it for\short-term" memory during computation.
 

3. Hard disk drive (HDD) - stores information on magnetized platters that spin rapidly. Information is stored and retrieved by a collection of arms that swing back and forth across the surfaces of the platters touching down periodically to read from or write to the platters. These devices fall into the category of \secondary storage" because the CPU does not have direct access to the information. Typically, information from the HDD must be loaded into RAM before being processed by the CPU. Reading and writing information from HDD's is slower than RAM.
 

4. Other kinds of secondary storage - optical disks like CD's or DVD's where light (lasers) are used to read information from disks;  ash memory where information is stored in integrated circuits that, unlike RAM, do not reset if power is lost; all of these are slower than HDD's or RAM.
 

5. Video card - is a specialized collection of CPU's and RAM tailored for rendering images to a video display.


6. Motherboard - a collection of interconnected slots that integrates and facilitates the passing of information between other standardized pieces of hardware. The channels of communication between the CPU and the RAM lie in the motherboard. The rate at which information can travel between di erent hardware elements is not only deter mined by the hardware elements themselves, but by the speed of the interconnections provided by the motherboard.
 

7. Interfaces - include the equipment humans use to receive information from or provide information to a computing device. For example, we receive information through the video display, printer, and the sound card. We provide information through the keyboard, mouse, microphone, or touchscreen.


In robotics, some of these terms take on expanded meanings. The most signi cant being the de nition of interface. Robots are designed to interface with some aspect of the physical world other than humans (motors, sensors).


SoftwareSoftware is a collection of abstract (intangible) information that represents instructions for a particular collection of hardware to accomplish a speci c task. Writing such instructions relies on knowing the capabilities of the hardware, the speci c commands necessary to elicit those capabilities, and a method of delivering those commands to the hardware. For example, we know that one of a HDD's capabilities is to store information. If we wish to write a set of instructions to store information, we must learn the speci c commands required to spin up the platters, locate an empty place to write the information to be stored, move the read/write arms to the correct location, lower the arm to touch the platter etc. Finally, we must convey our instructions to the HDD.
 

Generally, software instructions may be written at three di erent levels:
 

1. Machine language - not human readable and matches exactly what the CPU expects in order to elicit a particular capability{think 0's and 1's.
 

2. Assembly language - human readable representations of CPU instructions. While assembly language is human readable, its command set, like the CPU's, is primitive. Even the simplest instructions, like those required to multiply two numbers, can be quite tedious to write. Most modern CPU's and/or motherboards have interpreters that translate assembly language to machine language before feeding instructions to the CPU.
 

3. High level language human readable and usually has a much richer set of com mands available (though those commands necessarily can only be combinations of assembly commands). Translating the high-level language to machine language is too complicated for the CPU's built in interpreter so a separate piece of software called a compiler is required. A compiler translates the high level instructions to assembly or machine instructions which are then fed to the CPU for execution.
 

Examples of high-level languages are: C, C++, Fortran, or RobotC to name a few.

0 comments:

Post a Comment