Skip to content

Add tool GPIO support to RobotDriverServer/Client and RobotDriverROS - #21

Open
erwinkendo wants to merge 2 commits into
SmartArmStack:jazzyfrom
erwinkendo:feature/tool_gpio
Open

erwinkendo wants to merge 2 commits into
SmartArmStack:jazzyfrom
erwinkendo:feature/tool_gpio

Conversation

@erwinkendo

@erwinkendo erwinkendo commented Oct 2, 2026 •

Copy link
Copy Markdown

This PR adds a client/server path for commanding the tool GPIO introduced in MarinhoLab/sas_cpp#13.

Changes

  • RobotDriverClient
    • New publisher on <topic_prefix>/set/tool_gpio (std_msgs/msg/ByteMultiArray).
    • New method send_tool_gpio(const std::array<bool, 2>&).
  • RobotDriverServer
    • New subscription on <topic_prefix>/set/tool_gpio. Like the other /set/ topics, it requires a single publisher.
    • Messages with the wrong number of elements are ignored with a warning.
    • New getter get_tool_gpio() const.
  • RobotDriverROS
    • New field RobotDriverROSConfiguration::robot_tool_gpio_enable (default false).
    • When it is enabled, control_loop() forwards the server's latest value to RobotDriver::set_tool_gpio().
  • Python bindings: RobotDriverClient.send_tool_gpio, RobotDriverServer.get_tool_gpio, and RobotDriverROSConfiguration.robot_tool_gpio_enable.
  • Docs: Tool GPIO section and topic table in the README, and a note in AGENTS.md.
  • Contributors sections updated.

New topic

Topic Type Direction Description
<topic_prefix>/set/tool_gpio std_msgs/msg/ByteMultiArray client → server Desired value per tool pin (data[i] is 0 or 1, exactly 2 elements)

Backwards compatibility

robot_tool_gpio_enable defaults to false, so existing nodes, including the composer and example nodes, behave as before.

Dependencies

Testing

All tests were run with https://github.com/erwinkendo/sas_robot_driver_tester (see SmartArmStack/sas_robot_driver_ur# for details). The CI flow in docker/compose.yml still builds and runs the Python interface example.

Erwin Lopez added 2 commits October 2, 2026 08:16
…th sas server/client architecture

Added functionality to modify tool_gpio_ from a RobotDriverROS using sas server/client architecture. A function is called inside the control_loop only if enabled in the `RobotDriverROSConfiguration` structure. This functionality can be used from the sas_robot_driver_client.

Key changes:
- `sas_robot_driver_ros.*`: Modified `RobotDriverROSConfiguration` with boolean flag and modified `control_loop`
- `sas_robot_driver_server.*`: Added subscribers and default callbacks for topic "/set/tool_gpio"
- `sas_robot_driver_client.*`: Added publisher for topic "/set/tool_gpio"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant