RCwiproc

From RoboJackets Wiki
Revision as of 09:08, 10 August 2006 by Marksp (talk | contribs)
Jump to navigation Jump to search

Wireless Protocol

The host will send each robot velocity, direction, and shoot directives, at a rate of about 40-50 Hz. (This data rate still needs to be confirmed with testing) In such a way the enitre system (host, camera, and robot) will behave as a real-time system. The robot will send its current error status, battery voltage, wheel velocity, unique ID, and whether or not it has the ball to the host but at the much slower rate of 10Hz.

To Do

  • Research protocols
    • UDP (User Datagram Protocol) - Dropping UDP as a choice in protocol. Would need a module that implements it already
    • Protocol Book
  • Determine the rate at which to update robots - Will need to find theoretical base for this and confirm with test.
  • Specify a custom protocol - Remeber to do Visio graph of packet structure
  • Evaluate and compare UDP to a custom protocol

Protocol Structure

What is a Protocol?

A protocol is a set of rules to define how two or more entities comunicate. It contains 5 basic elements:

  • A service definition - What information will the protocol provide the entities that utilize it?
  • A set of assumptions - What is assumed to in the protocol? What isn't?
  • A vocabulary - What will be the forms of data that I will use to communicate with this protocol
  • A format/encoding - How will my vocabulary coherantly fit together to form larger msgs, and cmds
  • A set of procedural rules - How will I intiate communication? How are the entities using this protocol indentied? What are thier roles?

Other considerations such as the medium are not specifically stated in the protocol but influence how the protocol is formed. Consider the difference between Wi-Fi where one router can talk to multiple devices versus communication between a wired video game controller and a console.

As an example of a protocol consider the english language in its vocal form. The service it provides is a means of conveying thoughts thruogh the use of sound. It assumes that all the parties involved can speak and understand english, that the medium is such that the transmission of sound waves is possible, and that meaning of the vocabulary used is the same among all parties involved. Its vocabulary is made up of 26 letters that by themselves or in groups represent a set of vocal patterns generated and recieved by all the parties involved. In this abstract defintion of vocabulary, it is not words but rather letters and the sounds they make that form the protocol. The basic format of the english language is such that the vocabulary of letters is formed into words, which each carry the meaning of the thought being conveyed. The procedural rules change based on the situation. Sometimes one person is communicating with a group of passive listeners, at other times several people are communicating with one person at once. There are even times (eavesdropping) where one or more parties are listening to a speaker not directly communicating to them.

Our Protocol

For the robocup competition our teams robots will need to implement a wireless RF protocol in order to communicate with a host computer. This protocol will allow the host to contol each robot directly and for the robots to provide information about themselves to the host. To facilltate this communication a set of Rx and Tx 900mHz RF modules will be used to send and recieve packets of serial data . Each packet will be lead by a header to intiate communication, followed by a data identifing the type of msg being sent, its length in bytes, which robot the msg is for, the data, and a checksum to determine if there is an error. Below is the general form of each packet.


The type of msg being sent will determine the length of that packet and what data it contains. In the table below is a summary of each msg type.

MsgID Hex Type Description
Wakeup 0x01 Ack required Establish communication with each robot on the field.
Start (0x02) 0x02 Ack required Command to start main process on robots.
Velocity and Theta 0x03 Ack not required Msg containing theta, speed, kick, Dribble and other cmds and data. Can be broadcast to all once robot is in main process. Can be broadcast to each robot in stop state.
Status 0x04 Ack required Each robot sends status msgs to the host individually at 10Hz. No broadcast to all since only recipent of these msgs is the host.
Shoot Ball 0x05 Ack required Indicated robot is told to shoot.
Stop 0x06 Ack not required Stops all robot motion. Broadcast to all only


(Flow charts on how msgs are sent)


Articles

Links

Wireless Hompage