openvmp / switch_r413d08

ROS2 driver for R413D08

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ROS2 package for R413D08

License

This package implements management and control of R413D08. It could possibly work as well for R421A08, STM8S103, N4D8B08 and others.

Note: there must be something shared by all these boards (like a chip or firmware) that should be used in the name of this package instead of r413d08. If you know what that is, please, let me know.

This module can be configured to use either local or remote interface to Modbus RTU. It is recommended to the use the remote interface (see 'modbus_is_remote' below) so that the drivers of all devices use the same way of accessing the bus.

Parameters

  • switch_r413d08_inverted (Default: false)

    The boolean flag indicating whether ON and OFF are inverted on this device.

  • switch_channels (Default: 1)

    The number of channels.

  • switch_prefix (Default: /switch/default)

    The prefix of the ROS2 interface of this module. See 'Publishers' and 'Services' below.

  • modbus_is_remote (Default: true)

    The boolean flag determining whether the Modbus interface should be initialized within the same process or should be accessed remotely using ROS2 interfaces.

    If 'false', an instance of the Modbus RTU module is initialized using the corresponding parameters (see the documentation of the Modbus RTU module for more info).

    If 'true', all Modbus commands are executed over DDS using services under 'modbus_prefix' (see below).

  • modbus_prefix (Default: /modbus/default)

    The prefix of Modbus ROS2 interfaces (including the registers specific to this device).

  • modbus_leaf_id (Default: 1)

    The ID of this device on the Modbus bus.

Publishers

  • <switch_r413d08_prefix>/channel/last_changed

    The timestamp when the state of the corresponding channel was changed for the last time.

  • <switch_r413d08_prefix>/channel/last_on

    The boolean flag of the current state of the corresponding channel.

Services

  • <switch_r413d08_prefix>/channel/on

    Turn the certain channel ON.

  • <switch_r413d08_prefix>/channel/off

    Turn the certain channel OFF.

  • <switch_r413d08_prefix>/channel/toggle

    Toggle the state of the certain channel.

  • <switch_r413d08_prefix>/change_leaf_id

    Change the Modbus leaf_id of this device.

About

ROS2 driver for R413D08

License:Apache License 2.0


Languages

Language:C++ 63.9%Language:CMake 36.1%