-
Notifications
You must be signed in to change notification settings - Fork 341
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
Adding Io gripper controller #1439
Draft
sachinkum0009
wants to merge
47
commits into
ros-controls:master
Choose a base branch
from
StoglRobotics-forks:io_gripper_controller
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,771
−0
Draft
Changes from 44 commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
3f6a373
io gripper controller added which provides functionality to control g…
sachinkum0009 f5163ed
Merge branch 'ros-controls:master' into io_gripper_controller
sachinkum0009 353b42a
cleaned the code to impove the readabiligy and consistency
sachinkum0009 2a5fd5e
using result from set_value
sachinkum0009 913ab88
Delete io_gripper_controller/include/io_gripper_controller/visibility…
destogl e079889
Delete io_gripper_controller/doc/.gitkeep
destogl 4640609
- removed visibility macros and used solution S1 for visibility macros
sachinkum0009 0ebb499
Update io_gripper_controller/CMakeLists.txt
sachinkum0009 b13c507
Update io_gripper_controller/CMakeLists.txt
sachinkum0009 8571d6f
removed interface package deps
sachinkum0009 69c47ce
removed license from xml
sachinkum0009 f357e97
deps changed alphabetically
sachinkum0009 8acbec5
author and maintainer list updated
sachinkum0009 099337c
doc strings with descript of inputs and outputs updated
sachinkum0009 d4facba
pkg deps aranged alphabatically
sachinkum0009 f7b4875
deps updated as per cmakelist
sachinkum0009 dc5e828
OpenSrvType changed to OpenCloseSrvType
sachinkum0009 94c9b81
opensrvtype changed to openclosesrvtype
sachinkum0009 534a723
controllerStateMsg changed to jointStateMsg
sachinkum0009 0c08284
controllerStateMsg changed to jointStateMsg for other files
sachinkum0009 cd0d6a5
InterfaceMsg renamed to DynInterfaceMsg
sachinkum0009 485abbf
InterfaceMsg renamed to DynInterfaceMsg for all files
sachinkum0009 d7394e4
interface named changes as per control_msgs
sachinkum0009 2bd2bd2
removed unused code
sachinkum0009 ac2fc99
- doc string added for rt buffer members
sachinkum0009 545d28d
removed unused code
sachinkum0009 3943aff
pre-commit changes
sachinkum0009 37874af
user doc reformatted
sachinkum0009 a20a981
user doc updated
sachinkum0009 9c62539
Update io_gripper_controller/doc/userdoc.rst
sachinkum0009 b0a6922
params updated
sachinkum0009 e40f164
copyright update
sachinkum0009 3de5224
sort headers alphabatically
sachinkum0009 7d6cd6f
sort headers alphabatically and remove find_config state
sachinkum0009 c1df617
remove set_command state asset
sachinkum0009 2551d41
copyright update
sachinkum0009 947da59
not_empty validation added
sachinkum0009 6034aeb
not_empty validation added
sachinkum0009 2eb73a2
removed for merge upstream
sachinkum0009 e82f6a6
license update
sachinkum0009 06829ee
removed unused code
sachinkum0009 217a6d8
Fix services QoS
destogl 2e42b89
Update headers to `hpp` to avoid warnings.
destogl 032c7d9
Remove confusing output when checking states.
destogl ce0ab6c
Correct output that was wrong.
destogl 6b06318
Update of gripper after testing with simulator.
destogl 6257762
Code simplification and adding more user-readable state message.
destogl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we need a section that describes the functionality of the gripper, i.e., the state machine then runs when opening/closing and changing configurations.