Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
buzz_basic [2016/04/12 21:57] – [A Swarm as a Programmable Machine] ilpincy | buzz_basic [2016/04/17 03:07] (current) – [Development, Compilation and Deployment of Buzz Scripts] ilpincy | ||
---|---|---|---|
Line 1: | Line 1: | ||
===== Basic Buzz Concepts ===== | ===== Basic Buzz Concepts ===== | ||
- | ==== Development, | + | ==== Development, |
- | Buzz is a [[https:// | + | **A dynamic extension language.** |
- | Buzz is designed as an //extension language//. The task of an extension language is to allow the programmer to work at a higher level of abstraction with respect to that of the underlying system. [[buzz_c_cpp|Thanks to its C interface, Buzz can be used with any kind of robot software that can interoperate with C or C++]]. This makes it very simple to install Buzz on practically any existing robot, and also integrate it with frameworks such as [[http://www.ros.org/|Robot Operating System]]. | + | {{ :deployment.png? |
- | {{ :deployment.png? | + | **The bytecode and the BVM.** A Buzz script is compiled through the [[buzz_toolset# |
- | A Buzz script is compiled through the [[buzz_toolset# | + | **Debugging.** In principle, once the code is uploaded on the robot and the experiment is running, the robots do not need an operator to keep going. However, it is always the case that an operator either needs or wants to monitor the progress of a swarm. For instance, when an error occurs, the operator might want to inspect the state of the robot that experienced the error. Differently from many existing languages, |
- | In principle, once the code is uploaded on the robot and the experiment is running, the robots do not need an operator to keep going. However, it is always the case that an operator either needs or wants to monitor the progress of a swarm. For instance, when an error occurs, the operator might want to inspect the state of the robot that experienced the error. Differently from many existing languages, the Buzz bytecode does not contain any debugging symbols. Instead, the debugging symbols are generated by [[buzz_toolset# | + | **Using |
- | + | ||
- | To develop and debug Buzz scripts, a simple starting point is to employ the [[http:// | + | |
==== A Swarm as a Programmable Machine ==== | ==== A Swarm as a Programmable Machine ==== | ||
+ | {{ : | ||
+ | |||
+ | **Discrete swarm.** A swarm is seen as a discrete collection of robots. Each robot independently executes the BVM and the uploaded copy of the bytecode. In the current implementation of Buzz, the bytecode must be the same for every robot (i.e., the robots execute the same script). | ||
+ | |||
+ | **Step-wise execution.** The execution of a script proceeds in //steps//. The time length of a step is defined by the designer who installs Buzz on a robot. Each step is composed of a number of phases: sensor reading, received message processing, execution of a portion of script, message broadcast, and actuation. The length of a step must be chosen so that all phases terminate before the next step is to be started. | ||
+ | |||
+ | **Communication model.** The robots are assumed capable of exchanging information through //situated communication// | ||
+ | |||
+ | ==== A Typical Buzz Script ==== | ||
+ | |||
+ | The [[buzz_syntax_bnf|Buzz syntax]] is inspired to well-known languages such as [[https:// | ||
+ | |||
+ | In principle, a Buzz script can be organized in any way one likes. Typically, however, a number of standard functions are present, because they need to be called by the underlying system to proceed with the execution. These functions take care of initialization, | ||
+ | |||
+ | <code buzz> | ||
+ | # Executed once at init time. | ||
+ | function init() { | ||
+ | ... | ||
+ | } | ||
+ | |||
+ | # Executed at each time step. | ||
+ | function step() { | ||
+ | ... | ||
+ | } | ||
- | **Discrete swarm, step-wise execution.** A swarm is seen as a discrete collection of robots. Each robot independently executes | + | # Executed once when the robot (or the simulator) is reset. |
+ | function reset() { | ||
+ | ... | ||
+ | } | ||
- | **Communication model.** The robots are assumed capable of exchanging information through //situated communication// | + | # Executed once at the end of experiment. |
+ | function destroy() { | ||
+ | ... | ||
+ | } | ||
+ | </ |