[Rock-dev] Orocos C++ Proxies

Janosch Machowinski Janosch.Machowinski at dfki.de
Fri Oct 31 17:17:09 CET 2014


Hey,
I lately stumbled over the Orocos corba proxy class
and started playing around with it.
As a result I created a patchset for orogen, which
generates C++ Proxy Tasks, which may be used
to control the real tasks from a C++ Application.

For now I am looking for testers ;-)
To activate the patchset add this line to
your manifest AFTER all other package sets
    - github: jmachowinski/proxy_pkg_set

Note: This package_set is based on rock1408

Afterwards do an update and an autoproj build

A simple client app would look like this:

#include <hokuyo/proxies/Task.hpp>
#include <rtt/transports/corba/TaskContextServer.hpp>

int main(int argc, char** argv)
{
         RTT::corba::TaskContextServer::InitOrb(argc, argv);
         hokuyo::proxies::Task *test;

         //needs to be done BEFORE the call the the constructor
         hokuyo::proxies::Task::initTypes();

         test = new hokuyo::proxies::Task("orogen_default_hokuyo__Task", 
false);

         RTT::InputPort<base::samples::LaserScan> 
&laser_reader(test->scans.getReader());

         if(!test->configure())
         {
             std::cout << "Failed to configure task " << std::endl;
             return 0;
         }
         if(!test->start())
         {
             std::cout << "Failed to start task " << std::endl;
             return 0;
         }

         return 0;
}

You will need to link against every proxy lib for every task that you use
e.g. in this case add "hokuyo-proxies" as pkg config dependency

Greetings
     Janosch


-- 
  Dipl. Inf. Janosch Machowinski
  SAR- & Sicherheitsrobotik

  Universität Bremen
  FB 3 - Mathematik und Informatik
  AG Robotik
  Robert-Hooke-Straße 1
  28359 Bremen, Germany
  
  Zentrale: +49 421 178 45-6611
  
  Besuchsadresse der Nebengeschäftstelle:
  Robert-Hooke-Straße 5
  28359 Bremen, Germany
  
  Tel.:    +49 421 178 45-6614
  Empfang: +49 421 178 45-6600
  Fax:     +49 421 178 45-4150
  E-Mail:jmachowinski at informatik.uni-bremen.de

  Weitere Informationen:http://www.informatik.uni-bremen.de/robotik



More information about the Rock-dev mailing list