Open rafa-martin opened 3 months ago
I think that this will not solve your problem, but as I didn't see any mention in the issue description... Have you heard about the gpio tag?
Yes, I heard about it, but probably I not explained the goal well.
From the example you provided, it's clear that the controller must be configured with the number of GPIOs defined in the robot's YAML file prior to launching the node, as demonstrated here: config. This setup does not support dynamic addition or removal of GPIOs based on the interfaces exposed by the loaded hardware interfaces.
The goal is to have a way to take all state interfaces:
main_gpio/output_[0-9]+
to identify these interfaces.The main challenge isn't about sharing GPIO data between a controller and a hardware_interface. Rather, it's about dynamically capturing all command_interfaces—which must already exist and are blocked when a controller accesses this shared resource. While it's currently possible for state_interfaces to be automatically captured by the controller_manager, enhancing this functionality with filtering capabilities would be ideal, wouldn't it?
Situation:
In industrial robotics, motor drivers typically come equipped with one or more digital inputs and outputs. These I/O interfaces can be automatically detected by a "smart" HardwareInterface, which can then expose them via command and state interfaces (for digital outputs) or via state interfaces alone (for digital inputs) automatically by itself, without any config from ROS side.
Current Arquitecture:
left_wheel_joint/velocity
,left_wheel_joint/digital_output_0
,left_wheel_joint/digital_output_1
,right_wheel_joint/velocity
,right_wheel_joint/digital_output_0
left_wheel_joint/position
,left_wheel_joint/velocity
,left_wheel_joint/position
,left_wheel_joint/digital_output_0
,left_wheel_joint/digital_output_1
,left_wheel_joint/digital_input_0
,right_wheel_joint/position
,right_wheel_joint/velocity
,right_wheel_joint/position
,right_wheel_joint/digital_output_0
,right_wheel_joint/digital_input_0
,right_wheel_joint/digital_input_1
,robot_io_controller: ros__parameters: wheel_names:
Problem:
wheel_names
,digital_inputs
anddigital_outputs
.Proposed Solutions:
command_interface_configuration()
andstate_interface_configuration()
to accept regular expressions. This would enable the automatic matching of interfaces, rather than relying on raw strings.command_interface_configuration()
andstate_interface_configuration()
to retrieve and list available commands or provide a callable method that returns this information dynamically during their invocation.I would like to help in the project. Ideas are welcome.