Skip to content

Conversation

@Nibanovic
Copy link

Implemented gpio state_interfaces in gz-system.

In the current implementation, it is not necessary to specify a separate state and command interfaces in the gpio, but this exports state_interfaces as commands as well, under the same names.
This declaration in urdf...

<gpio name="proximity_sensor">
        <state_interface name="state">
          <param name="initial_value">0.0</param>
        </state_interface>
        <state_interface name="state2">
          <param name="initial_value">0.0</param>
        </state_interface>
        <state_interface name="state3"/>
</gpio>

... results in this output:

Loading GPIO: proximity_sensor
        State:
                 state
                         found initial value: 0.000000
                 state2
                         found initial value: 0.000000
                 state3
        Command: (mocked)
                 state
                 state2
                 state3

Testing

  • verified instantiating multiple gpios
  • verified that the state mirroring works with our proximity_sensor_controller, which claims the state_interface as expected, and reads the proper value after I alter it with forward_command_controller

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants