[Rock-dev] Using default deployments and dynamic ports in syskit

Sylvain Joyeux sylvain.joyeux at dfki.de
Thu Jun 27 10:15:36 CEST 2013


On 06/21/2013 02:31 PM, Stefan Haase wrote:
> Hi guys,
>
> maybe already discussed, but I have not found anything until now.
>
> 1. How can I use default deployments within syskit?
> Is there another way than doing this:
>
>     Syskit.conf.use_deployment 'orogen_default_trajectory_follower__Task'
>
A non-yet-documented because not-so-tested feature I implemented a while
ago is the ability to use the same syntax than Orocos.run in use_deployment:

  Syskit.conf.use_deployment 'trajectory_follower::Task' =>
'trajectory_follower'

For consistency reason, you can use the class names as well

  Syskit.conf.use_deployment TrajectoryFollower::Task =>
'trajectory_follower'

The :valgrind and :gdb options should work as well (
http://rock-robotics.org/master/documentation/runtime/debugging.html)

  Syskit.conf.use_deployment TrajectoryFollower::Task =>
'trajectory_follower'

Again: this is EXPERIMENTAL. Please tell the ML if you have any problem,
and if it works ;-)

> 2. How can I use the dynamic ports of the MarsActuators module?
> I have to export the dynamic ports which are created by the
> MarsActuators dispatch function.
> The dispatch function has to be called before the configureHook, so I
> do this within
> the models/orogen/simulation.rb using 'sbot_actuators' for
> actuator_set_name:
>
>     class Simulation::MarsActuator
>         argument :actuator_set_name
>         argument :indices
>         
>         def configure
>             if not orocos_task.dispatch(self.actuator_set_name,
>     self.indices)
>                 puts "Could not dispatch the actuator set
>     #{self.actuator_set_name}"
>             end
>             super
>         end
>     end
>
>
> Nevertheless, the export 
>
>     export sbot_actuator_child.cmd_sbot_actuators_port
>
This will and should not work. Syskit, at the point of the export, does
NOT know that there are extra ports, and therefore cannot export them.

I'll be writing a documentation page for that ... I've attached how it
is done for the hbridge as an example for now. Keep in mind that the
"new" hbridge is more complicated as we need to setup two dispatches per
device (one for the sensing and one for the actuation). This is why I
created this Hbridge.system helper function.

Sylvain
-------------- nächster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: http://www.dfki.de/pipermail/rock-dev/attachments/20130627/3809569f/attachment.htm 
-------------- nächster Teil --------------
Ein Dateianhang mit Bin?rdaten wurde abgetrennt...
Dateiname   : rock-dynamic-slaves-example.tar.gz
Dateityp    : application/gzip
Dateigr??e  : 2298 bytes
Beschreibung: nicht verf?gbar
URL         : http://www.dfki.de/pipermail/rock-dev/attachments/20130627/3809569f/attachment.bin 


More information about the Rock-dev mailing list