[Rock-dev] Setting up controller using Ruby

Sylvain Joyeux sylvain.joyeux at dfki.de
Mon Feb 14 12:20:23 CET 2011


On 02/12/2011 11:07 PM, gprizzi at tin.it wrote:
>  Dear Sirs,
>
>  first of all thank you for the great work on orogen, using it to 
> build Orocos components is now easy.
>
>  Now I am trying to use roby to set up a controller but I have 
> difficulties in doing this.
>
>  I had a look at  the documentation and I did the following:
>
>  mkdir myRosetta
>
>  cd myRosetta
>
>  roby init -p orocos
>
>  then I edit config/init.rb adding
>
>  Roby.app.using 'orocos'
>
>  then in 'config' directory I created ROBOT.rb and I put in it the 
> following line
>
>   Roby.app.use_deployments_from "Rosetta"
>
>  Where Rosetta (first letter uppercase) is then name of a deployment 
> generated from an orogen project.
>  The binary for Rosetta is located in /usr/local/lib/rock/bin/  , my 
> installation directory.
>
>  After this  I created in /root/rock/robyRosetta/tasks/compositions/
>  the file
>
>  myRosetta.rb
>
>  in which I put
>
> using_task_library 'rosetta'
> composition 'Controller' do
>   add LabcommToOrocos::Task, :as => 'lc'
>   add IntentionEstimation::Task, :as => 'est'
>   autoconnect
> end
>
> Where rosetta (first letter lower case) is the name of the orogen project
> defined in the first row of my orogen file as
>
> name 'rosetta'
> version '1.0'
>
> and LabcommToOrocos and IntentionEstimation are two task_context 
> defined in the project.
>
> when I run the command
>
> /root/rock/robyRosetta/scripts/orocos/system_model -o svg -r ROBOT.rb
>
> I get the following errors:
>
> root at UBU1004:~/rock/robyRosetta# 
> /root/rock/robyRosetta/scripts/orocos/system_model -o svg -r ROBOT.rb
>
> = uninitialized constant Kernel::LabcommToOrocos (NameError)
> = Backtrace
> | tasks/compositions/myRosetta.rb:3,
> |   tasks/compositions/myRosetta.rb:3,
> |   tasks/compositions/myRosetta.rb:2,
> |   /root/rock/robyRosetta/scripts/orocos/system_model:3
> =
>
>
> I am missing some important thing can you help me to understand my error?
You need to prefix your task context names with the project name 
(converted to CamelCase)

In you case,

composition 'Controller' do
   add Rosetta::LabcommToOrocos::Task, :as => 'lc'
   add Rosetta::IntentionEstimation::Task, :as => 'est'
   autoconnect
end


>
> Thank you in advance.
>
> Gianpaolo Rizzi
>
>
> _______________________________________________
> Rock-dev mailing list
> Rock-dev at dfki.de
> http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev


-- 
Sylvain Joyeux
Space&  Security Robotics

!!! Achtung, neue Telefonnummer!!!

Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany

Phone: +49 (0)421 178-454136
Fax:   +49 (0)421 218-454150
E-Mail: robotik at dfki.de

Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.:    DE 148646973
Steuernummer:  19/673/0060/3
-----------------------------------------------------------------------

-------------- nächster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: http://www.dfki.de/mailman/cgi-bin/private/rock-dev/attachments/20110214/f4c92a30/attachment.htm 


More information about the Rock-dev mailing list