D6 – Configure ROS Node I/O

This demo shows how the user can set number of inputs/outputs and configInputs for a ROS node by means of private parameters.

The ROS node is located under `demonodes/basic/org.hanns.demonodes.privateParams.DefineIO` and the user can setup:

  • number of data inputs (each should contain one float value)
  • number of configuration inputs (for online configuration of nodes parameters)
  • number of data outputs

This node computes the following equation: `y= sum(DataInputs)*sum(ConfigInputs) + a*sin(b*t)`. The resulting value is published on all outputs (with added small random error).

Running the Demo

To start the node and setup its parameters, run the following command:

cd demonodes/basic
./runner org.hanns.demonodes.privateParams.DefineIO _a:=3 _b:=2 _shouldLog:=true _noDataInputs:=2 _noDataOutputs:=10 _noDataConfigs:=1

This results in a ROS node with two data inputs, one configuration input and ten outputs. After checking parameters by means of `./jrosparam list`, we obtain the following data:

------------------------- parameters are:
Param: /SetPrivateParametersNode/b val: 2
Param: /SetPrivateParametersNode/a val: 3
Param: /SetPrivateParametersNode/noDataInputs val: 2
Param: /SetPrivateParametersNode/shouldLog val: true

The resulting ROS network looks as follows: nodeio