RNR Fusion
From RobotCurwikilums
Contents |
Synopsis
Fusion is a RoadNarrows Robotics developed robotics demonstration package containing applications, tools, an SDK, and documentation. It is free to use, modify, and distribute. See EULA for more details.
Fusion Reactor is a Gluon Client that fuses a vRobot Gluon Server and/or a vBrain Gluon Server into one controlling structure. Fusion Gluon is the simple control and information exchange interface between the peer, client and server.
Both the vBrains and vRobots are plugable python modules. Any derived application conforming to the vBrain and vRobot interface will work within the Fusion construct.
Version
Fusion 0.10.2
Download
Download the latest Fusion package here.
EULA
Fusion End User License Agreement
System Requirements
- Linux or Windows XP
- Python 2.4 or greater. See python.org.
- Python windows extensions (Windows only). See Python for Windows Extensions.
- PySerial package. SeePython Serial Port Extension
- A serial connection (RS232 or BlueTooth).
Description
Fusion is a demonstration robotic package written in python. It is freely available copy and modify. Fusion supports all three robotic conceptual frameworks prevalent today: Behavioral, Hierarchical, and Hybrid. The framework used depends in the implementor.
The three core elements of Fusion are the Fusion Reactor Control, the vRobot, and the vBrain. The Fusion Reactor coordinates the vRobot and vBrain actions and provide the Graphical User Interface (GUI) to the user. It is a Gluon client (see below).
The vRobot is a derived object from the Fusion vRobot virtual robot base class, which in turn, is a Gluon server. The derived vRobot provides direct control of the real (or simulated robot) and a peer interface to a vBrain. Typically, the behavioral sense-react operations occur at the vRobot level.
The vBrain is a derived object from the Fusion vBrain virtual brain base class. It too is a Gluon server. The derived vBrain provides higher-level congnitive functions and interacts the the physical/simulated robot through the vRobot object.
Control Panel
When Fusion is started the Reactor Control Panel is created. Figure 2 calls out the various compenents of the Control Panel. From the Control Panel, vRobots and vBrains can be plugged in, loaded, connections established, visualizers, shells, navigators, maps, etc. opened, and the brain and/or robot controlled.
Control Semantics:
- Select
- Select a vBrain/vRobot python plug-in.
- Deselect
- Deselect a vBrain/vRobot python plug-in.
- Load
- Load the plug-ins by instantiating the plugged-in objects and performing capatibility checks.
- Unload
- Unload by destroying the plug-in objects.
- Play
- Start the vBrain/vRobot execution.
- Pause
- Pause the execution. The physical robot is also stopped.
- Resume
- Resume execution after an [auto]pause.
- Step
- Execute for ExecStepSize seconds and then auto-pause.
- Stop
- Stop execution and 'rewind' to the beginning.
- Emergency Stop
- Perform an emergency stop of the physical robot.
Gluon
Communication and control information between the Fusion Reactor, the vBrains, and the vRobots are accomplished through a thin communication layer called Gluon. Currently Gluon is a simple callback mechanism. The intention to to grow this layer into a full-up layer supported in a multi-process, multi-processor environment.
Supported Gluon server-client models are illustrated in the following three figures:
|
|
| Figure 3 | Figure 4 |
Start Up
When the Fusion Reactor is started, Fusion configuration and settings are read from a series of ini files. Ini configuration files conform to the basic Microsoft Windows ini parser language. Python implements the ini parser through the ConfigParser Module. Each ini file contains one or more [section] headers followed by a series of name=value options.
Fusion reads the ini files in the following order. Any file not found or is not readable is simple skipped. Any [section]:name value parsed in a subsequent ini file takes precedence over earlier version(s) of the [section]:name value.
- fusion.ini
- The Fusion package read-only base configuration file $FUSION/fusion.ini.
- $FUSIONSTARTUP
- The optional site/workgroup ini configuration file.
- <userini>
- The user configuration file.
- Linux: $HOME/.fusion
- Windows: [drive]:\Document and Settings\<user>\fusion.ini.
- The user configuration file.
- <cmdlineini>
- Any command line filename given by the --ini <cmdlineini> option.
The last file in the parsing sequence will be the configuration file where Fusion will [auto]save any user changes.
Supported Robots
- Khepera II and I robots from K-Team
- Hemisson robot from K-Team
- KHR-1 humanoid robot from Kondo
API
The Fusion python package is organized into a set of subpackages.
- Core - Fusion core subpackage including the Reactor main.
- Utils - Fusion general purpose utilities subpackage.
- Gui - Fusion Graphical User Interface windows, dialogs, and utilities.
- Hemisson - K-Team Hemisson robot subpackage.
- Khepera - K-Team KheperaII robot subpackage.
- KHR1 - Kondo KHR-1 humanoid robot subpackage.
- Templates - User development templates.
- Demos - Simple Fusion demos.
The Application Programming Interface to Fusion can be found here.
Environment Variables
- PYTHONPATH
- Alternative to the fusion.pth file. Modify this variable to include the Fusion path.
- FUSIONSTARTUP
- The configuraton ini file that specifies site installation, group parameters. It isn't necessary to define this for Fusion to run properly.
- FUSION
- Normally, this variable isn't necessary. Only define to override where Fusion exists.
Files
- fusion.ini
- The Fusion configuration ini file specifying fusion start-up configuration. This file exists in <installdir>/Fusion and is read-only.
- <userini>
- The user's ini configuration file.
- Linux: $HOME/.fusion
- Windows: [drive]:\Documents and Settings\<user>\fusion.ini
- fusion.pth
- A sample python path file to specify the Fusion package location (Use this or PYTHONPATH).
Installation
Linux
- It is most likely that your Linux installation has Python2.4 or greater installed. See python.org for the latest python installation. Type "which python" to verify you have your python environment in your path. You may, however, need to install pyserial to support the Serial Port functions. This module is available from Python Serial Port Extension.
- Verify that python was installed correctly. From a shell prompt invoke python. At the python prompt, enter "import serial" to make sure pyserial is available.
- Copy the Fusion-x.y.z.tar.gz file to your destination directory. For example, /usr/local.
- Untar the Fusion-x.y.z.tar.gz in this directory. You probably need root privileges for the intallation.
- For example:
- cd /usr/local
- tar xzvf Fusion-x.y.z.tar.gz
- For example:
- There are two mechanisms for Python to find Fusion. Either one should work.
- The first way is using ".pth" files. Edit /<destinationdirecory>/Fusion-x.y.z/Fusion/Fusion.pth to specify the location of the top-level installation directory of Fusion from step 2. Copy this pth file to the site-packages directory under your python installation.
- For example:
- vi /usr/local/Fusion-x.y.z/Fusion/Fusion.pth
- cp Fusion.pth /usr/lib/python2.4/site-packages
- For example:
- If you don't want to use a ".pth" file, the second way for Fusion to find Python is to modify your PYTHONPATH environment variable.
- The first way is using ".pth" files. Edit /<destinationdirecory>/Fusion-x.y.z/Fusion/Fusion.pth to specify the location of the top-level installation directory of Fusion from step 2. Copy this pth file to the site-packages directory under your python installation.
- In the Fusion/bin directory, invoke the Fusion executable.
- For example:
- cd /usr/local/Fusion-x.y.z/Fusion/bin
- ./Reactor (or ./Fusion)
- For example:
Window XP
- Python 2.4 or greater, "Python for Windows extensions", and the pyserial package must be installed. Skip this step if you've done this for other applications.
- If you need to upgrade your python installation, it is recommended that you first uninstall your old python installation. Don't forget to uninstall all three packages. The pyserial package and the Python for Windows extensions package can be uninstalled through your Control Panel's Add/Remove Programs.
- The latest python packages can be found at python.org, Python for Windows Extensions, and Python Serial Port Extension.
- Install the python packages in the following order and it is recommended to accept the default installation locations:
- python-2.5.msi
- pywin32-210.win32-py2.5.exe
- pyserial-2.2.win32.exe
- Verify that python was installed correctly. You can go to your Start Menu, Program Files, and open up IDLE from the python 2.5 path. At the python prompt, enter "import serial" to make sure pyserial is available.
- Copy the Fusion-x.y.z.tar.gz file to your installation directory (e.g. c:\src).
- Untar the Fusion-x.y.z.tar.gz in this directory. We use WinZip as an extraction tool. ("Extract to here" option). Ignore any trailing garbage errors.
- There are two mechanisms for Python to find Fusion. Either one should work.
- The first way is using ".pth" files. Open c:\src\Fusion-x.y\Fusion\Fusion.pth with notepad and edit it to specify the location of the top-level installation directory of Fusion from step 2. Copy this pth file to the site-packages directory under your python installation.
- For example:
- "edit" c:\src\Fusion-x.y.z\Fusion.pth
- "copy" c:\src\Fusion-x.y.z\Fusion.pth c:\Python25\Lib\site-packages
- For example:
- The second way is by adding the above path to the PYTHONPATH environment variable.
- The first way is using ".pth" files. Open c:\src\Fusion-x.y\Fusion\Fusion.pth with notepad and edit it to specify the location of the top-level installation directory of Fusion from step 2. Copy this pth file to the site-packages directory under your python installation.
- In the <installdir>\Fusion\bin directory, double-click on Reactor.bat (or Fusion.bat).
Upgrade Instructions
- Follow steps 3, 4 and 5 with the new version of Fusion.
- Your home directory has a .fusion (fusion.ini) file with defaults, settings, robot paths, etc. that have been created by the previous version of Fusion. With the current early versions of Fusion, there are no built-in mechanisms to convert old configuration data to conform with the new version's format. So to be safe:
- You should rename this file in order to pick up any new changes. A new .fusion (fusion.ini) file is automatically created for you by Fusion.
- Then add your changes back to the new fusion.ini from the renamed original.
- In Linux, the Fusion user ini file is saved to:
- $HOME/.fusion
- In Windows, the Fusion user ini file is saved to
- C:\Documents and Settings\<user>\fusion.ini
Known Bugs
- 07-January-24
- The Fusion Reactor's multi-threaded environment occasionally interacts with the Tkinter mainloop() in bad ways, either causing lock-ups or segmentation violations. A fix in is the works and hopefully a dot release will be available soon.
Please report any problems, suggestions, or questions to: support@roadnarrowsrobotics.com
See Also
- PyroRobotics for another approach to a robotics tool-kit in python.




