Skip to content

Adding Io gripper controller #1439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 67 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
3f6a373
io gripper controller added which provides functionality to control g…
sachinkum0009 Dec 21, 2024
f5163ed
Merge branch 'ros-controls:master' into io_gripper_controller
sachinkum0009 Dec 21, 2024
353b42a
cleaned the code to impove the readabiligy and consistency
sachinkum0009 Dec 23, 2024
2a5fd5e
using result from set_value
sachinkum0009 Dec 23, 2024
913ab88
Delete io_gripper_controller/include/io_gripper_controller/visibility…
destogl Jan 2, 2025
e079889
Delete io_gripper_controller/doc/.gitkeep
destogl Jan 2, 2025
4640609
- removed visibility macros and used solution S1 for visibility macros
sachinkum0009 Jan 2, 2025
0ebb499
Update io_gripper_controller/CMakeLists.txt
sachinkum0009 Jan 2, 2025
b13c507
Update io_gripper_controller/CMakeLists.txt
sachinkum0009 Jan 2, 2025
8571d6f
removed interface package deps
sachinkum0009 Jan 2, 2025
69c47ce
removed license from xml
sachinkum0009 Jan 2, 2025
f357e97
deps changed alphabetically
sachinkum0009 Jan 2, 2025
8acbec5
author and maintainer list updated
sachinkum0009 Jan 2, 2025
099337c
doc strings with descript of inputs and outputs updated
sachinkum0009 Jan 2, 2025
d4facba
pkg deps aranged alphabatically
sachinkum0009 Jan 2, 2025
f7b4875
deps updated as per cmakelist
sachinkum0009 Jan 2, 2025
dc5e828
OpenSrvType changed to OpenCloseSrvType
sachinkum0009 Jan 2, 2025
94c9b81
opensrvtype changed to openclosesrvtype
sachinkum0009 Jan 2, 2025
534a723
controllerStateMsg changed to jointStateMsg
sachinkum0009 Jan 2, 2025
0c08284
controllerStateMsg changed to jointStateMsg for other files
sachinkum0009 Jan 2, 2025
cd0d6a5
InterfaceMsg renamed to DynInterfaceMsg
sachinkum0009 Jan 2, 2025
485abbf
InterfaceMsg renamed to DynInterfaceMsg for all files
sachinkum0009 Jan 2, 2025
d7394e4
interface named changes as per control_msgs
sachinkum0009 Jan 2, 2025
2bd2bd2
removed unused code
sachinkum0009 Jan 2, 2025
ac2fc99
- doc string added for rt buffer members
sachinkum0009 Jan 2, 2025
545d28d
removed unused code
sachinkum0009 Jan 2, 2025
3943aff
pre-commit changes
sachinkum0009 Jan 3, 2025
37874af
user doc reformatted
sachinkum0009 Jan 3, 2025
a20a981
user doc updated
sachinkum0009 Jan 9, 2025
9c62539
Update io_gripper_controller/doc/userdoc.rst
sachinkum0009 Jan 9, 2025
b0a6922
params updated
sachinkum0009 Jan 9, 2025
e40f164
copyright update
sachinkum0009 Jan 9, 2025
3de5224
sort headers alphabatically
sachinkum0009 Jan 9, 2025
7d6cd6f
sort headers alphabatically and remove find_config state
sachinkum0009 Jan 9, 2025
c1df617
remove set_command state asset
sachinkum0009 Jan 9, 2025
2551d41
copyright update
sachinkum0009 Jan 15, 2025
947da59
not_empty validation added
sachinkum0009 Jan 15, 2025
6034aeb
not_empty validation added
sachinkum0009 Jan 15, 2025
2eb73a2
removed for merge upstream
sachinkum0009 Jan 15, 2025
e82f6a6
license update
sachinkum0009 Jan 15, 2025
06829ee
removed unused code
sachinkum0009 Jan 15, 2025
217a6d8
Fix services QoS
destogl Jan 16, 2025
2e42b89
Update headers to `hpp` to avoid warnings.
destogl Jan 16, 2025
032c7d9
Remove confusing output when checking states.
destogl Jan 16, 2025
ce0ab6c
Correct output that was wrong.
destogl Jan 16, 2025
6b06318
Update of gripper after testing with simulator.
destogl Jan 16, 2025
6257762
Code simplification and adding more user-readable state message.
destogl Jan 17, 2025
ede058d
Apply suggestions from code review
destogl Jan 20, 2025
6bf304c
accepting upcoming changes
sachinkum0009 Jan 20, 2025
2c5e682
compilation issue fixed
sachinkum0009 Jan 26, 2025
dfcd97d
changes to use the message IOGripperState intsead of enum
sachinkum0009 Jan 28, 2025
7056b9a
Set ros2_control_test_assets as test_depend
sachinkum0009 Jan 28, 2025
268561e
email updated
sachinkum0009 Feb 16, 2025
0ed5689
Update io_gripper_controller/include/io_gripper_controller/io_gripper…
sachinkum0009 Feb 16, 2025
7950394
Apply suggestions from code review
sachinkum0009 Feb 16, 2025
40a12ac
udpate handle_gripper_transisition
sachinkum0009 Feb 16, 2025
860c2d3
fix logic for open gripper
sachinkum0009 Feb 18, 2025
4633fd6
close state and open state code updated
sachinkum0009 Feb 19, 2025
58a335b
minor changes for timeout function
sachinkum0009 Feb 19, 2025
5bd4221
timeout feature updated
sachinkum0009 Feb 23, 2025
06678d1
test yaml file added
sachinkum0009 Mar 21, 2025
698ba7b
fixing header files
sachinkum0009 Mar 21, 2025
a91bfc3
fixing header files
sachinkum0009 Mar 21, 2025
5f48cd8
header files changed for unit tests
sachinkum0009 Mar 21, 2025
6d555a9
header files changed for unit tests
sachinkum0009 Mar 21, 2025
ac961cb
header files changed for unit tests
sachinkum0009 Mar 21, 2025
4ffbec4
Rewrote IO Gripper Controller to GPIO Tool Controller.
destogl Jun 13, 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
54 changes: 46 additions & 8 deletions gpio_controllers/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -14,22 +14,22 @@ endif()

# find dependencies
find_package(ament_cmake REQUIRED)
find_package(example_interfaces 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)

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)
@@ -44,9 +44,30 @@ ament_target_dependencies(gpio_controllers PUBLIC
realtime_tools
control_msgs
)
# Causes the visibility macros to use dllexport rather than dllimport,
# which is appropriate when building the dll but not consuming it.
target_compile_definitions(gpio_controllers PRIVATE "GPIO_COMMAND_CONTROLLER_BUILDING_DLL")

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}
${example_interfaces_TARGETS}
)

pluginlib_export_plugin_description_file(controller_interface gpio_controllers_plugin.xml)

install(
@@ -57,6 +78,7 @@ install(
install(
TARGETS
gpio_controllers
gpio_tool_controllers
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
@@ -97,6 +119,21 @@ if(BUILD_TESTING)
ros2_control_test_assets
control_msgs
)

# 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(
@@ -111,5 +148,6 @@ ament_export_include_directories(
)
ament_export_libraries(
gpio_controllers
gpio_tool_controllers
)
ament_package()
9 changes: 9 additions & 0 deletions gpio_controllers/gpio_controllers_plugin.xml
Original file line number Diff line number Diff line change
@@ -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>
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@

#include "control_msgs/msg/dynamic_interface_group_values.hpp"
#include "controller_interface/controller_interface.hpp"
#include "gpio_command_controller_parameters.hpp"
#include "gpio_controllers/gpio_command_controller_parameters.hpp"
#include "gpio_controllers/visibility_control.h"
#include "rclcpp_lifecycle/node_interfaces/lifecycle_node_interface.hpp"
#include "rclcpp_lifecycle/state.hpp"
Loading