Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 06829ee
Author: Sachin Kumar <[email protected]>
Date:   Wed Jan 15 19:21:07 2025 +0100

    removed unused code

    Co-authored-by: Dr. Denis <[email protected]>

commit e82f6a6
Author: Sachin Kumar <[email protected]>
Date:   Wed Jan 15 19:20:36 2025 +0100

    license update

    Co-authored-by: Dr. Denis <[email protected]>

commit 2eb73a2
Author: Sachin Kumar <[email protected]>
Date:   Wed Jan 15 19:12:52 2025 +0100

    removed for merge upstream

    Co-authored-by: Dr. Denis <[email protected]>

commit 6034aeb
Author: Sachin Kumar <[email protected]>
Date:   Wed Jan 15 17:29:59 2025 +0100

    not_empty validation added

    Co-authored-by: Dr. Denis <[email protected]>

commit 947da59
Author: Sachin Kumar <[email protected]>
Date:   Wed Jan 15 17:29:37 2025 +0100

    not_empty validation added

    Co-authored-by: Dr. Denis <[email protected]>

commit 2551d41
Author: Sachin Kumar <[email protected]>
Date:   Wed Jan 15 17:28:59 2025 +0100

    copyright update

    Co-authored-by: Dr. Denis <[email protected]>

commit c1df617
Author: sachinkum0009 <[email protected]>
Date:   Fri Jan 10 00:47:14 2025 +0100

    remove set_command state asset

commit 7d6cd6f
Author: sachinkum0009 <[email protected]>
Date:   Fri Jan 10 00:46:45 2025 +0100

    sort headers alphabatically and remove find_config state

commit 3de5224
Author: Sachin Kumar <[email protected]>
Date:   Fri Jan 10 00:33:08 2025 +0100

    sort headers alphabatically

    Co-authored-by: Dr. Denis <[email protected]>

commit e40f164
Author: Sachin Kumar <[email protected]>
Date:   Fri Jan 10 00:32:10 2025 +0100

    copyright update

    Co-authored-by: Dr. Denis <[email protected]>

commit b0a6922
Author: Sachin Kumar <[email protected]>
Date:   Fri Jan 10 00:31:38 2025 +0100

    params updated

    Co-authored-by: Dr. Denis <[email protected]>

commit 9c62539
Author: Sachin Kumar <[email protected]>
Date:   Fri Jan 10 00:30:30 2025 +0100

    Update io_gripper_controller/doc/userdoc.rst

    Co-authored-by: Dr. Denis <[email protected]>

commit a20a981
Author: Sachin Kumar <[email protected]>
Date:   Fri Jan 10 00:30:08 2025 +0100

    user doc updated

    Co-authored-by: Dr. Denis <[email protected]>

commit 37874af
Author: sachinkum0009 <[email protected]>
Date:   Fri Jan 3 02:21:47 2025 +0100

    user doc reformatted

commit 3943aff
Author: sachinkum0009 <[email protected]>
Date:   Fri Jan 3 02:02:42 2025 +0100

    pre-commit changes

commit 545d28d
Author: sachinkum0009 <[email protected]>
Date:   Thu Jan 2 23:10:39 2025 +0100

    removed unused code

commit ac2fc99
Author: sachinkum0009 <[email protected]>
Date:   Thu Jan 2 23:06:04 2025 +0100

    - doc string added for rt buffer members
    - renamed service_buffer_ to gripper_service_buffer_

commit 2bd2bd2
Author: Sachin Kumar <[email protected]>
Date:   Thu Jan 2 22:48:32 2025 +0100

    removed unused code

    Co-authored-by: Dr. Denis <[email protected]>

commit d7394e4
Author: sachinkum0009 <[email protected]>
Date:   Thu Jan 2 22:47:01 2025 +0100

    interface named changes as  per control_msgs

commit 485abbf
Author: sachinkum0009 <[email protected]>
Date:   Thu Jan 2 14:03:19 2025 +0100

    InterfaceMsg renamed to DynInterfaceMsg for all files

commit cd0d6a5
Author: Sachin Kumar <[email protected]>
Date:   Thu Jan 2 13:57:30 2025 +0100

    InterfaceMsg renamed to DynInterfaceMsg

    Co-authored-by: Dr. Denis <[email protected]>

commit 0c08284
Author: sachinkum0009 <[email protected]>
Date:   Thu Jan 2 13:56:00 2025 +0100

    controllerStateMsg changed to jointStateMsg for other files

commit 534a723
Author: Sachin Kumar <[email protected]>
Date:   Thu Jan 2 13:52:29 2025 +0100

    controllerStateMsg changed to jointStateMsg

    Co-authored-by: Dr. Denis <[email protected]>

commit 94c9b81
Author: sachinkum0009 <[email protected]>
Date:   Thu Jan 2 13:51:09 2025 +0100

    opensrvtype changed to openclosesrvtype

commit dc5e828
Author: Sachin Kumar <[email protected]>
Date:   Thu Jan 2 13:43:21 2025 +0100

    OpenSrvType changed to OpenCloseSrvType

    Co-authored-by: Dr. Denis <[email protected]>

commit f7b4875
Author: sachinkum0009 <[email protected]>
Date:   Thu Jan 2 13:36:44 2025 +0100

    deps updated as per cmakelist

commit d4facba
Author: sachinkum0009 <[email protected]>
Date:   Thu Jan 2 13:30:31 2025 +0100

    pkg deps aranged alphabatically

commit 099337c
Author: sachinkum0009 <[email protected]>
Date:   Thu Jan 2 13:28:18 2025 +0100

    doc strings with descript of inputs and outputs updated

commit 8acbec5
Author: sachinkum0009 <[email protected]>
Date:   Thu Jan 2 13:18:38 2025 +0100

    author and maintainer list updated

commit f357e97
Author: sachinkum0009 <[email protected]>
Date:   Thu Jan 2 13:18:12 2025 +0100

    deps changed alphabetically

commit 69c47ce
Author: Sachin Kumar <[email protected]>
Date:   Thu Jan 2 13:21:06 2025 +0100

    removed license from xml

    Co-authored-by: Dr. Denis <[email protected]>

commit 8571d6f
Author: Sachin Kumar <[email protected]>
Date:   Thu Jan 2 13:14:00 2025 +0100

    removed interface package deps

    Co-authored-by: Dr. Denis <[email protected]>

commit b13c507
Author: Sachin Kumar <[email protected]>
Date:   Thu Jan 2 13:12:16 2025 +0100

    Update io_gripper_controller/CMakeLists.txt

    Co-authored-by: Dr. Denis <[email protected]>

commit 0ebb499
Author: Sachin Kumar <[email protected]>
Date:   Thu Jan 2 13:11:37 2025 +0100

    Update io_gripper_controller/CMakeLists.txt

    Co-authored-by: Dr. Denis <[email protected]>

commit 4640609
Author: sachinkum0009 <[email protected]>
Date:   Thu Jan 2 13:06:06 2025 +0100

    - removed visibility macros and used solution S1 for visibility macros
    - removed the template from license
    - added one variable per line
    - documented the enums
    - updated the doc folder as per `joint_trajectory_controller`

commit e079889
Author: Dr. Denis <[email protected]>
Date:   Thu Jan 2 13:00:23 2025 +0100

    Delete io_gripper_controller/doc/.gitkeep

commit 913ab88
Author: Dr. Denis <[email protected]>
Date:   Thu Jan 2 12:59:55 2025 +0100

    Delete io_gripper_controller/include/io_gripper_controller/visibility_control.h

commit 2a5fd5e
Author: sachinkum0009 <[email protected]>
Date:   Mon Dec 23 15:21:39 2024 +0100

    using result from set_value
    - minor code clean

commit 353b42a
Author: sachinkum0009 <[email protected]>
Date:   Mon Dec 23 15:13:57 2024 +0100

    cleaned the code to impove the readabiligy and consistency

commit f5163ed
Merge: 3f6a373 81c0d41
Author: Sachin Kumar <[email protected]>
Date:   Sat Dec 21 18:58:59 2024 +0100

    Merge branch 'ros-controls:master' into io_gripper_controller

commit 3f6a373
Author: sachinkum0009 <[email protected]>
Date:   Sat Dec 21 18:57:20 2024 +0100

    io gripper controller added which provides functionality to control gripper using ios

commit 81c0d41
Author: Christoph Fröhlich <[email protected]>
Date:   Sat Dec 21 11:36:15 2024 +0100

    Fix label of good first issue template (ros-controls#1438)
  • Loading branch information
destogl committed Jan 16, 2025
1 parent eaeefdf commit ac35ddf
Show file tree
Hide file tree
Showing 18 changed files with 3,560 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/good-first-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Good first issue
about: Create an issue to welcome a new contributor into the community.
title: ''
labels: good-first-issue
labels: ["good first issue"]
assignees: ''

---
Expand Down
106 changes: 106 additions & 0 deletions io_gripper_controller/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
cmake_minimum_required(VERSION 3.8)
project(io_gripper_controller)

if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow)
endif()

# using this instead of visibility macros
# S1 from https://github.com/ros-controls/ros2_controllers/issues/1053
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

# find dependencies
set(THIS_PACKAGE_INCLUDE_DEPENDS
ament_cmake
ament_cmake_gmock
control_msgs
controller_interface
controller_manager
generate_parameter_library
hardware_interface
pluginlib
rclcpp
rclcpp_lifecycle
realtime_tools
ros2_control_test_assets
sensor_msgs
std_msgs
std_srvs
)

foreach(Dependency IN ITEMS ${THIS_PACKAGE_INCLUDE_DEPENDS})
find_package(${Dependency} REQUIRED)
endforeach()

generate_parameter_library(io_gripper_controller_parameters
src/io_gripper_controller.yaml
)
add_library(
io_gripper_controller
SHARED
src/io_gripper_controller.cpp
)
target_include_directories(io_gripper_controller PUBLIC
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>")
target_link_libraries(io_gripper_controller io_gripper_controller_parameters)
ament_target_dependencies(io_gripper_controller ${THIS_PACKAGE_INCLUDE_DEPENDS})
target_compile_definitions(io_gripper_controller PRIVATE "io_gripper_controller_BUILDING_DLL")

pluginlib_export_plugin_description_file(
controller_interface io_gripper_controller.xml)

install(
TARGETS
io_gripper_controller
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)

install(
DIRECTORY include/
DESTINATION include/${PROJECT_NAME}
)

if(BUILD_TESTING)

ament_add_gmock(test_load_io_gripper_controller test/test_load_io_gripper_controller.cpp)
target_include_directories(test_load_io_gripper_controller PRIVATE include)
ament_target_dependencies(
test_load_io_gripper_controller
controller_manager
hardware_interface
ros2_control_test_assets
)

ament_add_gmock(test_io_gripper_controller
test/test_io_gripper_controller.cpp
test/test_io_gripper_controller_open.cpp
test/test_io_gripper_controller_close.cpp
test/test_io_gripper_controller_all_param_set.cpp
test/test_io_gripper_controller_open_close_action.cpp
test/test_io_gripper_controller_reconfigure.cpp
test/test_io_gripper_controller_reconfigure_action.cpp
)
target_include_directories(test_io_gripper_controller PRIVATE include)
target_link_libraries(test_io_gripper_controller io_gripper_controller)
ament_target_dependencies(
test_io_gripper_controller
controller_interface
hardware_interface
)

endif()

ament_export_include_directories(
include
)
ament_export_dependencies(
${THIS_PACKAGE_INCLUDE_DEPENDS}
)
ament_export_libraries(
io_gripper_controller
)

ament_package()
5 changes: 5 additions & 0 deletions io_gripper_controller/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# io_gripper_controller package

The package implements controllers to control the gripper using IOs.

For detailed documentation check the `docs` folder or [ros2_control documentation](https://control.ros.org/).
102 changes: 102 additions & 0 deletions io_gripper_controller/doc/userdoc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
:github_url: https://github.com/ros-controls/ros2_controllers/blob/{REPOS_FILE_BRANCH}/io_gripper_controller/doc/userdoc.rst

.. _io_gripper_controller_userdoc:

io_gripper_controller
=============================

The IO Gripper Controller provides implementation to control the grippers that are commanded using IOs.
This is often the case for pneumatic gripper in the industy, that can range from simple parallel gripper up to custom, multi-dof grippers for manipulating specific parts.
It provides functionalities like open, close and reconfigure which can be used either though action server or service server and also publishes gripper's joint values if any and provides output for all gripper's command and state interfaces.

Description of controller's interfaces
---------------------------------------

- ``joint_states`` [``sensor_msgs::msg::JointState``]: Publishes the state of gripper's open/close joint if any and configuration joints that might influece the geometry and kinematics of the gripper.
- ``dynamic_interfaces`` [``control_msgs::msg::DynamicInterfaceValues``]: Publishes all command and state interface of the IOs and sensors of gripper.


Parameters
,,,,,,,,,,,

This controller uses the `generate_parameter_library <https://github.com/PickNikRobotics/generate_parameter_library>`_ to handle its parameters.

This controller adds the following parameters:

.. generate_parameter_library_details:: ../src/io_gripper_controller.yaml


Example parameters
....................

.. code-block:: yaml
io_gripper_controller:
ros__parameters:
use_action: true
open_close_joints: [gripper_clamp_jaw]
open:
joint_states: [0.0]
set_before_command:
high: [Release_Break_valve]
low: []
command:
high: [Open_valve]
low: [Close_valve]
state:
high: [Opened_signal]
low: [Closed_signal]
set_after_command:
high: []
low: [Release_Break_valve]
possible_closed_states: ['empty_close', 'full_close']
close:
set_before_command:
high: [Release_Break_valve]
low: []
command:
high: [Close_valve]
low: [Open_valve]
state:
empty_close:
joint_states: [0.16]
high: [Closed_signal]
low: [Part_Grasped_signal]
set_after_command_high: []
set_after_command_low: [Release_Break_valve]
full_close:
joint_states: [0.08]
high: [Part_Grasped_signal]
low: [Closed_signal]
set_after_command_high: []
set_after_command_low: [Release_Break_valve]
configurations: ["narrow_objects", "wide_objects"]
configuration_joints: [gripper_gripper_distance_joint]
configuration_setup:
narrow_objects:
joint_states: [0.1]
command_high: [Narrow_Configuration_Cmd]
command_low: [Wide_Configuration_Cmd]
state_high: [Narrow_Configuraiton_Signal]
state_low: [Wide_Configuration_Signal]
wide_objects:
joint_states: [0.2]
command_high: [Wide_Configuration_Cmd]
command_low: [Narrow_Configuration_Cmd]
state_high: [Wide_Configuration_Signal]
state_low: [Narrow_Configuraiton_Signal]
gripper_specific_sensors: ["part_sensor_top", "part_sensor"]
sensors_interfaces:
part_sensor_top:
input: "Part_Sensor_Top_signal"
part_sensor:
input: "Part_Grasped_signal"
Loading

0 comments on commit ac35ddf

Please sign in to comment.