Skip to content

Commit

Permalink
Merge branch 'master' into unused_header_cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bmagyar authored Jul 15, 2024
2 parents cee7a48 + 12b5310 commit d3d88e7
Show file tree
Hide file tree
Showing 33 changed files with 1,174 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ TEST(TestLoadAckermannSteeringController, load_controller)
std::make_shared<rclcpp::executors::SingleThreadedExecutor>();

controller_manager::ControllerManager cm(
executor, ros2_control_test_assets::minimal_robot_urdf, "test_controller_manager");
executor, ros2_control_test_assets::minimal_robot_urdf, true, "test_controller_manager");

ASSERT_NE(
cm.load_controller(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ TEST(TestLoadAdmittanceController, load_controller)
std::make_shared<rclcpp::executors::SingleThreadedExecutor>();

controller_manager::ControllerManager cm(
executor, ros2_control_test_assets::minimal_robot_urdf, "test_controller_manager");
executor, ros2_control_test_assets::minimal_robot_urdf, true, "test_controller_manager");

ASSERT_EQ(
cm.load_controller("load_admittance_controller", "admittance_controller/AdmittanceController"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ TEST(TestLoadBicycleSteeringController, load_controller)
std::make_shared<rclcpp::executors::SingleThreadedExecutor>();

controller_manager::ControllerManager cm(
executor, ros2_control_test_assets::minimal_robot_urdf, "test_controller_manager");
executor, ros2_control_test_assets::minimal_robot_urdf, true, "test_controller_manager");

ASSERT_NE(
cm.load_controller(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ TEST(TestLoadDiffDriveController, load_controller)
std::make_shared<rclcpp::executors::SingleThreadedExecutor>();

controller_manager::ControllerManager cm(
executor, ros2_control_test_assets::diffbot_urdf, "test_controller_manager");
executor, ros2_control_test_assets::diffbot_urdf, true, "test_controller_manager");

ASSERT_NE(
cm.load_controller("test_diff_drive_controller", "diff_drive_controller/DiffDriveController"),
Expand Down
5 changes: 3 additions & 2 deletions doc/controllers_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Guidelines and Best Practices

.. toctree::
:titlesonly:
:glob:

*
mobile_robot_kinematics.rst
writing_new_controller.rst


Controllers for Wheeled Mobile Robots
Expand Down Expand Up @@ -52,6 +52,7 @@ The controllers are using `common hardware interface definitions`_, and may use
Forward Command Controller <../forward_command_controller/doc/userdoc.rst>
Gripper Controller <../gripper_controllers/doc/userdoc.rst>
Joint Trajectory Controller <../joint_trajectory_controller/doc/userdoc.rst>
Parallel Gripper Controller <../parallel_gripper_controller/doc/userdoc.rst>
PID Controller <../pid_controller/doc/userdoc.rst>
Position Controllers <../position_controllers/doc/userdoc.rst>
Velocity Controllers <../velocity_controllers/doc/userdoc.rst>
Expand Down
4 changes: 2 additions & 2 deletions doc/migration/Jazzy.rst → doc/migration.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:github_url: https://github.com/ros-controls/ros2_controllers/blob/{REPOS_FILE_BRANCH}/doc/migration/Jazzy.rst
:github_url: https://github.com/ros-controls/ros2_controllers/blob/{REPOS_FILE_BRANCH}/doc/migration.rst

Iron to Jazzy
Migration Guides: Iron to Jazzy
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This list summarizes important changes between Iron (previous) and Jazzy (current) releases, where changes to user code might be necessary.

Expand Down
4 changes: 2 additions & 2 deletions doc/release_notes/Jazzy.rst → doc/release_notes.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:github_url: https://github.com/ros-controls/ros2_controllers/blob/{REPOS_FILE_BRANCH}/doc/release_notes/Jazzy.rst
:github_url: https://github.com/ros-controls/ros2_controllers/blob/{REPOS_FILE_BRANCH}/doc/release_notes.rst

Iron to Jazzy
Release Notes: Iron to Jazzy
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This list summarizes the changes between Iron (previous) and Jazzy (current) releases.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ TEST(TestLoadJointGroupVelocityController, load_controller)
std::make_shared<rclcpp::executors::SingleThreadedExecutor>();

controller_manager::ControllerManager cm(
executor, ros2_control_test_assets::minimal_robot_urdf, "test_controller_manager");
executor, ros2_control_test_assets::minimal_robot_urdf, true, "test_controller_manager");

ASSERT_NE(
cm.load_controller(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ TEST(TestLoadForceTorqueSensorBroadcaster, load_controller)
std::make_shared<rclcpp::executors::SingleThreadedExecutor>();

controller_manager::ControllerManager cm(
executor, ros2_control_test_assets::minimal_robot_urdf, "test_controller_manager");
executor, ros2_control_test_assets::minimal_robot_urdf, true, "test_controller_manager");

ASSERT_NE(
cm.load_controller(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ TEST(TestLoadMultiInterfaceForwardController, load_controller)
std::make_shared<rclcpp::executors::SingleThreadedExecutor>();

controller_manager::ControllerManager cm(
executor, ros2_control_test_assets::minimal_robot_urdf, "test_controller_manager");
executor, ros2_control_test_assets::minimal_robot_urdf, true, "test_controller_manager");

ASSERT_NE(
cm.load_controller(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ void GripperActionController<HardwareInterface>::preempt_active_goal()
template <const char * HardwareInterface>
controller_interface::CallbackReturn GripperActionController<HardwareInterface>::on_init()
{
RCLCPP_WARN(
get_node()->get_logger(),
"[Deprecated]: the `position_controllers/GripperActionController` and "
"`effort_controllers::GripperActionController` controllers are replaced by "
"'parallel_gripper_controllers/GripperActionController' controller");
try
{
param_listener_ = std::make_shared<ParamListener>(get_node());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ TEST(TestLoadGripperActionControllers, load_controller)
std::make_shared<rclcpp::executors::SingleThreadedExecutor>();

controller_manager::ControllerManager cm(
executor, ros2_control_test_assets::minimal_robot_urdf, "test_controller_manager");
executor, ros2_control_test_assets::minimal_robot_urdf, true, "test_controller_manager");

ASSERT_NE(
cm.load_controller(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ TEST(TestLoadIMUSensorBroadcaster, load_controller)
std::make_shared<rclcpp::executors::SingleThreadedExecutor>();

controller_manager::ControllerManager cm(
executor, ros2_control_test_assets::minimal_robot_urdf, "test_controller_manager");
executor, ros2_control_test_assets::minimal_robot_urdf, true, "test_controller_manager");

ASSERT_NE(
cm.load_controller(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ TEST(TestLoadJointStateBroadcaster, load_controller)
std::make_shared<rclcpp::executors::SingleThreadedExecutor>();

controller_manager::ControllerManager cm(
executor, ros2_control_test_assets::minimal_robot_urdf, "test_controller_manager");
executor, ros2_control_test_assets::minimal_robot_urdf, true, "test_controller_manager");

ASSERT_NE(
cm.load_controller(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ TEST(TestLoadJointStateController, load_controller)
std::make_shared<rclcpp::executors::SingleThreadedExecutor>();

controller_manager::ControllerManager cm(
executor, ros2_control_test_assets::minimal_robot_urdf, "test_controller_manager");
executor, ros2_control_test_assets::minimal_robot_urdf, true, "test_controller_manager");

ASSERT_NE(
cm.load_controller(
Expand Down
84 changes: 84 additions & 0 deletions parallel_gripper_controller/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
cmake_minimum_required(VERSION 3.16)
project(parallel_gripper_controller LANGUAGES CXX)

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

set(THIS_PACKAGE_INCLUDE_DEPENDS
control_msgs
control_toolbox
controller_interface
generate_parameter_library
hardware_interface
pluginlib
rclcpp
rclcpp_action
realtime_tools
)

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

generate_parameter_library(parallel_gripper_action_controller_parameters
src/gripper_action_controller_parameters.yaml
)

add_library(parallel_gripper_action_controller SHARED
src/parallel_gripper_action_controller.cpp
)
target_compile_features(parallel_gripper_action_controller PUBLIC cxx_std_17)
target_include_directories(parallel_gripper_action_controller PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include/parallel_gripper_action_controller>
)
target_link_libraries(parallel_gripper_action_controller PUBLIC
parallel_gripper_action_controller_parameters
)
ament_target_dependencies(parallel_gripper_action_controller PUBLIC ${THIS_PACKAGE_INCLUDE_DEPENDS})

pluginlib_export_plugin_description_file(controller_interface ros_control_plugins.xml)

if(BUILD_TESTING)
find_package(ament_cmake_gmock REQUIRED)
find_package(controller_manager REQUIRED)
find_package(ros2_control_test_assets REQUIRED)

ament_add_gmock(test_load_parallel_gripper_action_controllers
test/test_load_parallel_gripper_action_controller.cpp
)
ament_target_dependencies(test_load_parallel_gripper_action_controllers
controller_manager
ros2_control_test_assets
)

ament_add_gmock(test_parallel_gripper_controller
test/test_parallel_gripper_controller.cpp
)
target_link_libraries(test_parallel_gripper_controller
parallel_gripper_action_controller
)
endif()

install(
DIRECTORY include/
DESTINATION include/parallel_gripper_action_controller
)
install(
TARGETS
parallel_gripper_action_controller
parallel_gripper_action_controller_parameters
EXPORT export_parallel_gripper_action_controller
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
INCLUDES DESTINATION include
)

ament_export_targets(export_parallel_gripper_action_controller HAS_LIBRARY_TARGET)
ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS})
ament_package()
19 changes: 19 additions & 0 deletions parallel_gripper_controller/doc/userdoc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
:github_url: https://github.com/ros-controls/ros2_controllers/blob/{REPOS_FILE_BRANCH}/parallel_gripper_controller/doc/userdoc.rst

.. _parallel_gripper_controller_userdoc:

Parallel Gripper Action Controller
-----------------------------------

Controller for executing a ``ParallelGripperCommand`` action for simple parallel grippers.
This controller supports grippers that offer position only control as well as grippers that allow configuring the velocity and effort.
By default, the controller will only claim the ``{joint}/position`` interface for control.
The velocity and effort interfaces can be optionally claimed by setting the ``max_velocity_interface`` and ``max_effort_interface`` parameter, respectively.
By default, the controller will try to claim position and velocity state interfaces.
The claimed state interfaces can be configured by setting the ``state_interfaces`` parameter.

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

.. generate_parameter_library_details:: ../src/gripper_action_controller_parameters.yaml
Loading

0 comments on commit d3d88e7

Please sign in to comment.