- Development
- European Robotics Forum 2011 Workshop on the Orocos Toolchain
- European Robotics Forum 2012: workshops
- Geometric relations semantics
- KDL wiki
- Kuka LBR user group
- Links of Orocos components
- OCL v1.x wiki
- RTT v1.x wiki
- Toolchain v2.x
- Wiki for site admins
- iTaSC wiki
omniORBpy - python binding for omniORB
This page describes a working example of using omniORBpy to interact with an Orocos component. The example is very simple, and is intended for people who do not know where to start developing a CORBA client.
Your first stop is: http://omniorb.sourceforge.net/omnipy3/omniORBpy/ The omniORBpy version 3 User’s Guide. Read chapters 1 and 2. Optionally read chapter 6. The example works with and without naming services.
Once you are comfortable with omniORBpy, do the following (I assume you are kind enough to be a Linux user working on a console):
- download the rtt examples, and compile the smallnet orocos component (you might need first to fix the Makefile paths):
wget http://www.orocos.org/stable/examples/rtt/rtt-examples-1.10.0.tar.gz tar xf rtt-examples-1.10.0.tar.gz cd rtt-examples-1.10.0/corba-example/ make smallnet
- download the corba idls and, for simplicity's sake, copy the IDLs to a new empty directory:
svn co http://svn.mech.kuleuven.be/repos/orocos/trunk/rtt/src/corba/ mkdir omniclt cp corba/*idl omnictl/ cd omniclt
- generate the Python stubs, two new directories should appear (namely RTT and RTT__POA)
omniidl -bpython *idl
- download the attached python file (orocosclient.py) to your home directory and copy it where your IDLs are (current directory)
cp ~/orocosclient.py .
- open a new console and run your smallnet application
sudo ../smallnet
If you get something like
0.011 [ Warning][SmallNetwork] ControlTask 'ComponentA' could not find CORBA Naming Service. 0.011 [ Warning][SmallNetwork] Writing IOR to 'std::cerr' and file 'ComponentA.ior' IOR:0...10100
sudo ../smallnet -ORBInitRef NameService=corbaname::127.0.0.1
InitRef=NameService=corbaname::127.0.0.1
- finally run the python application
python orocosclient.py
If you are not able to make your naming service work, try using the component's IOR. After running you smallnet server, copy the complete IOR printed on screen and paste it as argument to the python program (including the word "IOR:")
python orocosclient.py IOR:0...10100
Look at the IDLs and the code to understand how things work. I am no python expert, so if the coding style looks weird to you, my apologies. Good luck!
Attachment | Size |
---|---|
orocosclient.py_.txt | 1.99 KB |
»
- Printer-friendly version
- Login or register to post comments