Configure GIO Module (command line)ΒΆ

To update the configuration of your GIO module, for example setting each channel as an input or output mode, you’ll need to use the Dynamic Reconfigure interfaces. To do this from the command line we can call a service and tell the RoNeX driver which configurations we want to change.

For the following command you can use the tab key to auto complete the name of the service and message type, and once you’ve entered the message type you can actually double tap tab again to produce an empty message in the correct format, handy for when you’re not familiar with the message types.

In the example below we will set 4 of the digital channels as an outputs:

rosservice call /ronex/general_io/12/set_parameters "config:
     bools:
     - {name: '', value: false}
     ints:
     - {name: '', value: 0}
     strs:
     - {name: '', value: ''}
     doubles:
     - {name: '', value: 0.0}
     groups:
     - {name: '', state: false, id: 0, parent: 0}"

The service call will return the current state of the GIO parameters, alternatively you can view this information at any time by echoing the relevant topic:

rostopic list /ronex/general_io/12/parameter_updates