[Documentation] [TitleIndex] [WordIndex

How to deploy your OROCOS application

Read the OROCOS deployment manual for detailed information on how to use the deployer.

Run the orocos deployer using rosrun

rosrun ocl deployer-gnulinux -ldebug -s deploy.ops

Where you define your launch configuration in the deploy.ops script, e.g.

   1 #import your OROCOS library (dependencies are automatically resolved)
   2 import("my{Ros/OROCOS}Pkg")
   4 #Load your OROCOS component (ComponentName as defined using the ORO_CREATE_* macro and Comp the name as you like the component to be known for the TaskBrowser)
   5 loadComponent("Comp","ComponentName")
   7 #Load properties
   8 loadService("Comp","marshalling")
   9 Comp.marshalling.loadProperties("cpf/myCompProp.cpf")
  11 # Configure / Start components 
  12 Comp.configure()
  13 Comp.start()

The myCompProp.cpf file declares the Components properties using XML syntax:

<?xml version="1.0" encoding="UTF-8"?>                                                                                                                            
  <!DOCTYPE properties SYSTEM "cpf.dtd">                                                                                                                            
     <simple name="init_file" type="string"><description>Name of the initialisation file</description><value>init.xml</value></simple>

Roslaunch for OROCOS components

From orocos toolchain 2.2 and onwards, it is possible to start your OROCOS component(s) using a roslaunch file. In that way you can also give your component a more understandable name when using the rtt_ros_integration.

E.g, a roslaunch file myComp.launch to start the ocl deployer in debug mode and load the deploy.ops script in the myRosPkg package:

   <node name="myNodeName" pkg="ocl" type="deployer-gnulinux" launch-prefix="konsole -e" args="-ldebug -s $(find myRosPkg)/deploy.ops --">

Important remarks:

2024-06-22 13:13