Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
7cea102
io gripper controller added which provides functionality to control g…
sachinkum0009 Dec 21, 2024
8010ca5
cleaned the code to impove the readabiligy and consistency
sachinkum0009 Dec 23, 2024
3f6151c
using result from set_value
sachinkum0009 Dec 23, 2024
55e5237
Delete io_gripper_controller/include/io_gripper_controller/visibility…
destogl Jan 2, 2025
4f6de01
Delete io_gripper_controller/doc/.gitkeep
destogl Jan 2, 2025
0338ff0
- removed visibility macros and used solution S1 for visibility macros
sachinkum0009 Jan 2, 2025
e85cc1e
Update io_gripper_controller/CMakeLists.txt
sachinkum0009 Jan 2, 2025
5e99ee5
Update io_gripper_controller/CMakeLists.txt
sachinkum0009 Jan 2, 2025
cd6f8cd
removed interface package deps
sachinkum0009 Jan 2, 2025
6e31a33
removed license from xml
sachinkum0009 Jan 2, 2025
e5af267
deps changed alphabetically
sachinkum0009 Jan 2, 2025
fa22df4
author and maintainer list updated
sachinkum0009 Jan 2, 2025
1d61e04
doc strings with descript of inputs and outputs updated
sachinkum0009 Jan 2, 2025
aa1b523
pkg deps aranged alphabatically
sachinkum0009 Jan 2, 2025
8de0e37
deps updated as per cmakelist
sachinkum0009 Jan 2, 2025
c229592
OpenSrvType changed to OpenCloseSrvType
sachinkum0009 Jan 2, 2025
3f719fe
opensrvtype changed to openclosesrvtype
sachinkum0009 Jan 2, 2025
b4c7852
controllerStateMsg changed to jointStateMsg
sachinkum0009 Jan 2, 2025
73267ac
controllerStateMsg changed to jointStateMsg for other files
sachinkum0009 Jan 2, 2025
a5a6e3a
InterfaceMsg renamed to DynInterfaceMsg
sachinkum0009 Jan 2, 2025
8f0de5c
InterfaceMsg renamed to DynInterfaceMsg for all files
sachinkum0009 Jan 2, 2025
f1350dd
interface named changes as per control_msgs
sachinkum0009 Jan 2, 2025
39ef8cb
removed unused code
sachinkum0009 Jan 2, 2025
393a014
- doc string added for rt buffer members
sachinkum0009 Jan 2, 2025
c12f9c8
removed unused code
sachinkum0009 Jan 2, 2025
d3f39ac
pre-commit changes
sachinkum0009 Jan 3, 2025
128a054
user doc reformatted
sachinkum0009 Jan 3, 2025
e15cd1e
user doc updated
sachinkum0009 Jan 9, 2025
4f0ff44
Update io_gripper_controller/doc/userdoc.rst
sachinkum0009 Jan 9, 2025
94ca4bb
params updated
sachinkum0009 Jan 9, 2025
efbc005
copyright update
sachinkum0009 Jan 9, 2025
c875eff
sort headers alphabatically
sachinkum0009 Jan 9, 2025
b7d882b
sort headers alphabatically and remove find_config state
sachinkum0009 Jan 9, 2025
66ae103
remove set_command state asset
sachinkum0009 Jan 9, 2025
062e5f5
copyright update
sachinkum0009 Jan 15, 2025
d1436bf
not_empty validation added
sachinkum0009 Jan 15, 2025
e20b4fa
not_empty validation added
sachinkum0009 Jan 15, 2025
80de84d
removed for merge upstream
sachinkum0009 Jan 15, 2025
7527668
license update
sachinkum0009 Jan 15, 2025
e981d6a
removed unused code
sachinkum0009 Jan 15, 2025
5dcae08
Fix services QoS
destogl Jan 16, 2025
807c563
Update headers to `hpp` to avoid warnings.
destogl Jan 16, 2025
058a18c
Remove confusing output when checking states.
destogl Jan 16, 2025
3fca0bc
Correct output that was wrong.
destogl Jan 16, 2025
d68f2fe
Update of gripper after testing with simulator.
destogl Jan 16, 2025
25b3cf2
Code simplification and adding more user-readable state message.
destogl Jan 17, 2025
54b3666
Apply suggestions from code review
destogl Jan 20, 2025
41e0ae2
accepting upcoming changes
sachinkum0009 Jan 20, 2025
3611623
compilation issue fixed
sachinkum0009 Jan 26, 2025
c684b6d
changes to use the message IOGripperState intsead of enum
sachinkum0009 Jan 28, 2025
7021394
Set ros2_control_test_assets as test_depend
sachinkum0009 Jan 28, 2025
7c1d644
email updated
sachinkum0009 Feb 16, 2025
fd4107b
Update io_gripper_controller/include/io_gripper_controller/io_gripper…
sachinkum0009 Feb 16, 2025
4864e10
Apply suggestions from code review
sachinkum0009 Feb 16, 2025
4a84285
udpate handle_gripper_transisition
sachinkum0009 Feb 16, 2025
b16d309
fix logic for open gripper
sachinkum0009 Feb 18, 2025
f2dc9cc
close state and open state code updated
sachinkum0009 Feb 19, 2025
a1c8cb8
minor changes for timeout function
sachinkum0009 Feb 19, 2025
a12c335
timeout feature updated
sachinkum0009 Feb 23, 2025
0fe4a23
test yaml file added
sachinkum0009 Mar 21, 2025
1f4bbb4
fixing header files
sachinkum0009 Mar 21, 2025
2fc1622
fixing header files
sachinkum0009 Mar 21, 2025
a0f5067
header files changed for unit tests
sachinkum0009 Mar 21, 2025
48ca870
header files changed for unit tests
sachinkum0009 Mar 21, 2025
e60b083
header files changed for unit tests
sachinkum0009 Mar 21, 2025
630db23
Rewrote IO Gripper Controller to GPIO Tool Controller.
destogl Jun 13, 2025
7bfce93
Ignore all other packages.
destogl Jun 13, 2025
cdd8add
Fully working on the Gripper example.
destogl Aug 16, 2025
a3c9553
print warnings about states also on activation.
destogl Aug 16, 2025
2575a90
Using the name of the final state of configuration when using action.
destogl Sep 1, 2025
e0ae1ac
Merge branch 'master' into io_gripper_controller
destogl Sep 1, 2025
55d06b7
Removed colcone ignore files.
destogl Sep 2, 2025
93bd467
Improve output messages and add automatic state chnage by external in…
destogl Sep 2, 2025
6f4c315
Fix the time substraciton issues.
destogl Sep 3, 2025
7c71238
Fix the time substraciton issues.
destogl Sep 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 60 additions & 7 deletions gpio_controllers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,59 @@ export_windows_symbols()

# find dependencies
find_package(ament_cmake REQUIRED)
find_package(control_msgs REQUIRED)
find_package(controller_interface REQUIRED)
find_package(generate_parameter_library REQUIRED)
find_package(hardware_interface REQUIRED)
find_package(pluginlib REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rclcpp_lifecycle REQUIRED)
find_package(realtime_tools REQUIRED)
find_package(generate_parameter_library REQUIRED)
find_package(control_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(std_srvs REQUIRED)

generate_parameter_library(gpio_command_controller_parameters
src/gpio_command_controller_parameters.yaml
)

add_library(gpio_controllers
SHARED
add_library(gpio_controllers SHARED
src/gpio_command_controller.cpp
)
target_include_directories(gpio_controllers PRIVATE include)
target_link_libraries(gpio_controllers PUBLIC
gpio_command_controller_parameters
target_link_libraries(gpio_controllers PUBLIC gpio_command_controller_parameters)
ament_target_dependencies(gpio_controllers PUBLIC
builtin_interfaces
controller_interface
hardware_interface
pluginlib
rclcpp_lifecycle
rcutils
realtime_tools
control_msgs
)

generate_parameter_library(gpio_tool_controller_parameters
src/gpio_tool_controller.yaml
)
add_library(gpio_tool_controllers SHARED
src/gpio_tool_controller.cpp
)
target_compile_features(gpio_tool_controllers PUBLIC cxx_std_20)
target_include_directories(gpio_tool_controllers PUBLIC
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>")
target_link_libraries(gpio_tool_controllers PUBLIC
gpio_tool_controller_parameters
controller_interface::controller_interface
hardware_interface::hardware_interface
pluginlib::pluginlib
rclcpp::rclcpp
rclcpp_lifecycle::rclcpp_lifecycle
realtime_tools::realtime_tools
${control_msgs_TARGETS}
${builtin_interfaces_TARGETS})
${builtin_interfaces_TARGETS}
${std_srvs_TARGETS}
)

pluginlib_export_plugin_description_file(controller_interface gpio_controllers_plugin.xml)

Expand All @@ -46,6 +71,7 @@ install(
install(
TARGETS
gpio_controllers
gpio_tool_controllers
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
Expand Down Expand Up @@ -78,6 +104,32 @@ if(BUILD_TESTING)
gpio_controllers
ros2_control_test_assets::ros2_control_test_assets
)

ament_add_gmock(
test_load_gpio_tool_controller
test/test_load_gpio_tool_controller.cpp
)
target_include_directories(test_load_gpio_tool_controller PRIVATE include)
target_link_libraries(test_load_gpio_tool_controller
gpio_tool_controllers
controller_manager::controller_manager
ros2_control_test_assets::ros2_control_test_assets
)

# ament_add_gmock(test_gpio_tool_controller
# test/gpio_tool_controller/test_gpio_tool_controller.cpp
# test/gpio_tool_controller/test_gpio_tool_controller_open.cpp
# test/gpio_tool_controller/test_gpio_tool_controller_close.cpp
# test/gpio_tool_controller/test_gpio_tool_controller_all_param_set.cpp
# test/gpio_tool_controller/test_gpio_tool_controller_open_close_action.cpp
# test/gpio_tool_controller/test_gpio_tool_controller_reconfigure.cpp
# test/gpio_tool_controller/test_gpio_tool_controller_reconfigure_action.cpp
# )
# target_include_directories(test_gpio_tool_controller PRIVATE include)
# target_link_libraries(test_gpio_tool_controller
# gpio_tool_controller
# ros2_control_test_assets::ros2_control_test_assets
# )
endif()

ament_export_dependencies(
Expand All @@ -92,5 +144,6 @@ ament_export_include_directories(
)
ament_export_libraries(
gpio_controllers
gpio_tool_controllers
)
ament_package()
23 changes: 23 additions & 0 deletions gpio_controllers/doc/userdoc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,26 @@ The controller expects at least one GPIO interface and the corresponding command
- ana.2

With the above-defined controller configuration, the controller will accept commands for all gpios' interfaces and will only publish the state of Gpio2.



### gpio_tool_controller

The controller enables control of tools connected to the robot or components of a robot via general-purpose inputs and outputs (GPIO), digital or analog.
Concretely the controller is made for controlling the custom-made industrial grippers or tools, or components like lifts or breaks.
The IOs might even be virtual, like controlling the state machine of a robot that is implemented on a PLC.

The controller provides high-level interface for engaging or disengaging a tool or a component, as well as for reconfiguring it.
The reconfiguration is possible only in *disengaged* state.
In the example of gripper this would be *open* state.



The controller implements state machine for the transition between states and


1. Tool Actions

1. Tool state machine

2. Transitions
9 changes: 9 additions & 0 deletions gpio_controllers/gpio_controllers_plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@
</description>
</class>
</library>

<library path="gpio_tool_controllers">
<class name="gpio_tool_controller/GpioToolController" type="gpio_tool_controller::GpioToolController" base_class_type="controller_interface::ControllerInterface">
<description>
The gpio tool controllers enables control of the tools that are controlled using GPIOs. For example, pneumatic grippers, lifts, etc. It enables management of multiple engaged state, e.g., if gripper is closed with or without an object.
The controller can be also be used in the simple form where certian states of a device are set through GPIOs, e.g., manual and automatic mode.
</description>
</class>
</library>
Loading
Loading