[Rock-dev] Setting up a robot controller

Sylvain Joyeux sylvain.joyeux at dfki.de
Thu Feb 3 15:38:49 CET 2011


On 01/30/2011 04:24 PM, gprizzi at tin.it wrote:
> Dear Sirs,
>
> I am attempting my first robot controller using Roby
>
> I red the instructions on the web pages and I did the following:
>
> I create a new directory and then did
>
> roby init -p orocos
>
> Then I edited the file myDirectory/config/init.rb that has the following
> contents:
>
> require 'roby/schedulers/basic'
> Roby.scheduler = Roby::Schedulers::Basic.new
>
> Roby.app.using 'orocos'
> Roby.app.use_deployments_from "Rosetta"
>
>
> Where Rosetta is a deployment previously created using orogen.
>
> After this I created in the directory myDirectory/tasks/compositions/
> the file rosetta.rb
> and I put in it the following lines:
>
> using_task_library 'rosetta'
> composition 'myController' do
> add rosetta::task1, :as => 't1'
> add rosetta::task2, :as => 't2'
> autoconnect
> end
>
> after this I tried the command
>
> /root/rock/robyRosetta/scripts/orocos/system_model -o png
>
> and I get the following errors:
>
> root at UBU1004:~/rock/robyRosetta#
> /root/rock/robyRosetta/scripts/orocos/system_model -o png
>
> = undefined method `use_deployments_from' for nil:NilClass (NoMethodError)
> = Backtrace
> | /usr/src/rock/tools/orocos.rb/lib/orocos/roby/app.rb:357:in
> `use_deployments_from',
> | ./config/init.rb:35,
> | /root/rock/robyRosetta/scripts/orocos/system_model:3
> =
> root at UBU1004:~/rock/robyRosetta#
>
> Probably I have not understood in which way I can use Roby to set up my
> model.
>
> Thanks for your support.
You have to create a separate file in config/ and add its name to the 
command line using the -r option. This is a limitation of the current 
orocos plugin implementation, and I'll have to see if I can lift it easily.

move the "Roby.app.use_deployments_from" call to (for instance)

   config/rosetta.rb

then, run system_model with -r rosetta as in

   scripts/orocos/system_model -o svg -r rosetta
--
Sylvain Joyeux (Dr.Ing.)
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
-----------------------------------------------------------------------


More information about the Rock-dev mailing list