Download
latest Releases : 2.0.0-RELESE
2.0.0-RELESE | Download page |
Number of Projects
RT-Component | 154.5 |
RT-Middleware | 35 |
Tools | 23 |
Documentation | 2 |
Choreonoid
Motion editor/Dynamics simulator
OpenHRP3
Dynamics simulator
OpenRTP
Integrated Development Platform
AIST RTC collection
RT-Components collection by AIST
TORK
Tokyo Opensource Robotics Association
DAQ-Middleware
Middleware for DAQ (Data Aquisition) by KEK
rtctree is a Python library for interacting with and managing running RT Components.
Introduction
rtctree is a Python library providing an easy-to-use API for interacting with running RT Components and RTM-based systemsrunning on OpenRTM-aist-1.0. It allows developers to manage these systems from other programs without needing to learn the CORBA API. Components can be started, stopped, connected together, have their configuration changed, and so on.
This software is being developed by National Institute of Advanced Industrial Science and Technology, with support of the next generation robot intelligent technology development project of NEDO (New Energy and Industrial Technology Development Organization).
Requirements
Installation
There are several methods of installation available:Environment variables
The following environment variables are used:
The only variable that should normally be set by the user is RTCTREE_NAMESERVERS. Set this to a list of name server addresses, separated by semi-colons, that you want rtcshell to interact with. For example, in a Bash shell, you can run the following:
The RTC Tree
The main part of the library is the RTC tree.
Each directory in the tree is the normal naming context or root server's root context. The root context of the name server is indicated by NameServer class. Also, the naming context is represented by the 'Directory' class, and the manager is represented by Manager class.
The name server is treated as a directory from the root directory. Below that are files and subdirectories. The subdirectory points to the naming context and manager under the root context.
The files are components and managers. Components are represented by the Component class.
Contains various information about the component represented by the component object. You can activate and deactivate components, manage component ports, connect ports, and configure configuration settings.
You can create new component instances in the manager and erase the components.
Every node in the tree also contains a reference to the CORBA object in the objects they represent. You can call IDL methods by accessing this object. Even if there are currently impossible functions with rtctree, you can call IDL methods directly using this CORBA object.
Building the tree
The argument of the factory function of the tree ( create_tree () ) specifies the name server to be analyzed for constructing the tree. Please refer to the function's documentation for details. In general, you can build a tree by passing a list of nameserver addresses or a list of paths. The environment variable RTCTREE_NAMESERVERS is also checked.
Paths
Nodes in the tree are specified by path. The path is a list of strings. The level on the right is one level deeper than the one on the left. An absolute path is required to specify a tree object. If the path exists below the node, relative path specification from the node is also possible.
These path strings are similar to file system path specifications. The root of the tree is indicated by / ( \ for Windows). The first level is the address of the name server. The level below it is Component, Manager and Naming Context (as a directory). The function parse_path changes the path of the string to the path for the RTC tree.
For example, the following path:
Useful functions
Useful member functions of the RTCTree class and node classes that will be of particular interest are shown below. This is not a complete list of all available functionality. Users are encouraged to check the full API documentation for additional functionality, and examine the rtcshell source code for usage examples.
API naming conventions
rtctree follows the standard Python naming conventions as laid out in PEP8.
Most importantly, the private, internal API functions begin with an underscore (_). If a function begins with an underscore, it is not intended for use outside the class and doing so could lead to undefined behaviour. Only use those API functions that do not begin with an underscore and have a docstring in your programs.
Repository
The latest source is stored in a Git repository at github. You can download it as a zip file or tarball by clicking the "Download Source" link in the top right of the page. Alternatively, use Git to clone the repository. This is better if you wish to contribute patches.
Further documentation and examples
For further documentation, see the Doxygen-generated API documentation.
For the sample example code, refer the rtshell Source code. You can find how to use the rtctree library to perform most of the actions possible using RTSystemEditor.
Changelog
3.0
2.0