-
Notifications
You must be signed in to change notification settings - Fork 414
Add admittance controller #370
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
Merged
destogl
merged 128 commits into
ros-controls:master
from
pac48:add-admittance-controller
Oct 10, 2022
Merged
Changes from 122 commits
Commits
Show all changes
128 commits
Select commit
Hold shift + click to select a range
0206ee6
Make forward controller chainable.
destogl 43f39a0
Enabling chanable mode for forward command controllers.
destogl 29c4393
Fix all bugs in chained-controllers mode.
destogl 6f2f956
Remove debug output from forwarding controller.
destogl 704ba5d
Make forward controller chainable.
destogl 6759bb5
Enabling chanable mode for forward command controllers.
destogl 7afdefc
Fix all bugs in chained-controllers mode.
destogl 7c03f79
Remove debug output from forwarding controller.
destogl f8556ea
Some compile fixes
destogl d77b4b6
Fix some small issues.
destogl 778ed13
Update to use class.
destogl 39b640e
added admittance controller
pac48 be2f308
merge fwd chainable controller
pac48 4f3d709
merged additional from fwd chainable controllers
pac48 fcc2be2
fixed interface memory bug
pac48 0aac28e
changed position/velocity reference fields
pac48 7033048
added gravity compensation
pac48 1a266bc
replaced Eigen 3.4 API with Eigen 3.3
pac48 8dc9b37
clean up and TODOs
pac48 1563113
removed reshaped operation and fix forward velocity
pac48 5d59427
code cleanup and refactored gravity compensation
pac48 18097a2
replaced parameter handler with auto-generated struct
pac48 dfc27bf
dynamic parameter updating enabled
pac48 2db281f
enable/disable parameter update during execution + fill state message
pac48 9990dca
remove unused code
pac48 690b89b
eliminate ik drift: broken
pac48 0e6cfb1
correct drift from integrating position
pac48 79a54dc
working drift correction for position and rotation
pac48 23ed194
Merge branch 'master' into add-admittance-controller
pac48 c54d46c
fix pparameter copying behaviour
pac48 906c602
add parameter field for IK package
pac48 4a6f779
fix struct formatting
pac48 84ccdde
enable tests: currently failing
pac48 976d286
updated auto generated struct with parameter validation
pac48 965c226
added parameter validation and descriptions
pac48 a0f4bae
general code clean up
pac48 27ea60f
parameter handling tests passing
pac48 737363c
declare parameters in test
pac48 6936c5d
change parameter struct format
pac48 382a1b6
passing tests
pac48 cbd124c
add error checks on all public methods
pac48 967f64f
code clean up
pac48 bcac129
added parameters for drift correction
pac48 7b29386
Update controllers with new get_name hardware interfaces (#369)
Schulze18 da52b32
integrate motion in joint space to eliminate drift error
pac48 0951605
remove drift correction parameters
pac48 f2acf62
Merge branch 'add-admittance-controller' of https://github.com/pac48/…
pac48 9885432
move interface vector reset to on_activate
pac48 7d5fcf2
remove interface maps
pac48 f19b096
Merge branch 'master' of https://github.com/ros-controls/ros2_control…
pac48 cf7031f
fix JTC with newest ros_control
pac48 bdb32b4
mend
pac48 ed37061
revert forward command controller changes
pac48 c7c7312
update force reading in hardware read function
pac48 7a3ecf9
Merge branch 'add-admittance-controller' of https://github.com/pac48/…
pac48 45b8afd
initialize reference vectors properly
pac48 893cea6
resize states in activate
pac48 13959e1
Merge branch 'add-admittance-controller' of https://github.com/pac48/…
pac48 911ecdd
use reference wrapper instead of double pointer
pac48 d8999a5
remove rotation struct
pac48 6c4bf66
Merge branch 'add-admittance-controller' of github.com:pac48/ros2_con…
pac48 4833f4a
update test
pac48 7f22790
remove generated code
pac48 451f6d4
use Eigen tranformation types
pac48 8c1bcf4
update state message
pac48 bff17df
remove warnings
pac48 2c1282e
implement state message information and enable selected axes
pac48 cc90178
add test
pac48 3086290
Merge branch 'master' of https://github.com/ros-controls/ros2_control…
pac48 d850b47
update README
pac48 51e85c6
update variable names
pac48 1541318
update kinematics interface use
pac48 932a554
Make tricycle controller the same as master.
destogl a15728e
Revert "Make tricycle controller the same as master."
destogl f97f7d9
Merge remote-tracking branch 'upstream/master' into add-admittance-co…
destogl ccec03d
Correct formatting and linting issues.
destogl 01f5e3e
Merge remote-tracking branch 'upstream/master' into add-admittance-co…
destogl 9760b92
JTC should be the same as on master.
destogl 6ba8bcc
A bit more code cleaning and polishing.
destogl 9a08f77
update control_msgs repo
pac48 8011760
Merge branch 'add-admittance-controller' of github.com:pac48/ros2_con…
pac48 4b0b4b2
remove joint limits from package
pac48 8f85ead
add kinematics_interface to not released .repo files
pac48 742b252
add tf2_kdl to admittance package.xml
pac48 9774584
add kinematics_interface to all .repo files
pac48 a225c17
add generate_parameter_library to .repos
pac48 dc1641b
fix url
pac48 84fa4fe
add control_msgs to not-released .repos
pac48 8ae5090
update kinematics plugin name
pac48 e323d14
fix parameter update on restart
pac48 9c148a0
update repos
pac48 795cdce
Precommit
pac48 2f609be
update repos
pac48 7710448
fix test output
pac48 a5847a2
move parameter initialization to controller class
pac48 d8674cd
use single admittance transforms struct
pac48 d1d42df
rename cog_ and ee_weight_ variables
pac48 d6050dd
Update admittance_controller/include/admittance_controller/admittance…
pac48 93bd627
reset on values deactivate
pac48 ac307ce
fix admittance reset
pac48 ed0b014
add joint damping parameter
pac48 ba73aee
update documenation in admittance_rule
pac48 c61217b
Update comments
pac48 dacd8bb
update descriptions for the admittance parameters
pac48 ce583b0
refactor indexing to be like JTC
pac48 d814028
clear joint_command_interface_ and joint_state_interface_ in deactivate
pac48 c4ae3da
fix include for rolling
pac48 3dc1816
update README
pac48 3287740
update comments
pac48 bde3d39
Update admittance_controller/include/admittance_controller/admittance…
pac48 f23b6a6
Update admittance_controller/src/admittance_controller.cpp
pac48 bbdc506
Update admittance_controller/src/admittance_controller.cpp
pac48 c45b668
move dynamic allocations in state message to reset method
pac48 a4817c1
Merge branch 'add-admittance-controller' of github.com:pac48/ros2_con…
pac48 ea59076
Update admittance_controller/src/admittance_controller.cpp
pac48 f94ca25
Update admittance_controller/include/admittance_controller/admittance…
pac48 6a0281f
Remove unneeded code and chnage field name
pac48 4346e3d
update comments/docs
pac48 82c0018
remove tmp variables
pac48 2855cc7
Merge branch 'master' into add-admittance-controller
destogl 91af1ac
Merge branch 'master' into add-admittance-controller
2644a4e
Improve some comments
ec55e5c
Merge branch 'master' into add-admittance-controller
destogl 08b3909
Merge branch 'master' into add-admittance-controller
destogl 83c6e5d
Updated documentation.
destogl 2e57e4a
Fixing linters.
destogl 28c5665
Small polishing
destogl e9c7432
Update upstream repo.
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 hidden or 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,120 @@ | ||
| cmake_minimum_required(VERSION 3.5) | ||
| project(admittance_controller) | ||
|
|
||
| if(NOT CMAKE_CXX_STANDARD) | ||
| set(CMAKE_CXX_STANDARD 17) | ||
| endif() | ||
|
|
||
| if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
| add_compile_options(-Wall -Wextra -Wpedantic) | ||
| endif() | ||
|
|
||
| # find dependencies | ||
| set(THIS_PACKAGE_INCLUDE_DEPENDS | ||
| angles | ||
| control_msgs | ||
| control_toolbox | ||
| controller_interface | ||
| kinematics_interface | ||
| Eigen3 | ||
| generate_parameter_library | ||
| geometry_msgs | ||
| hardware_interface | ||
| joint_trajectory_controller | ||
| pluginlib | ||
| rclcpp | ||
| rclcpp_lifecycle | ||
| realtime_tools | ||
| tf2 | ||
| tf2_eigen | ||
| tf2_geometry_msgs | ||
| tf2_kdl | ||
| tf2_ros | ||
| trajectory_msgs | ||
| ) | ||
|
|
||
| find_package(ament_cmake REQUIRED) | ||
| foreach(Dependency IN ITEMS ${THIS_PACKAGE_INCLUDE_DEPENDS}) | ||
| find_package(${Dependency} REQUIRED) | ||
| endforeach() | ||
|
|
||
| add_library(${PROJECT_NAME} SHARED src/admittance_controller.cpp) | ||
| target_include_directories(${PROJECT_NAME} PRIVATE include) | ||
| generate_parameter_library(${PROJECT_NAME}_parameters src/admittance_controller_parameters.yaml) | ||
| target_link_libraries(${PROJECT_NAME} admittance_controller_parameters) | ||
| ament_target_dependencies(${PROJECT_NAME} ${THIS_PACKAGE_INCLUDE_DEPENDS}) | ||
| # Causes the visibility macros to use dllexport rather than dllimport, | ||
| # which is appropriate when building the dll but not consuming it. | ||
| target_compile_definitions(${PROJECT_NAME} PRIVATE "ADMITTANCE_CONTROLLER_BUILDING_DLL") | ||
| pluginlib_export_plugin_description_file(controller_interface admittance_controller.xml) | ||
|
|
||
| install(DIRECTORY include/ | ||
| DESTINATION include | ||
| ) | ||
|
|
||
| install(TARGETS ${PROJECT_NAME} | ||
| RUNTIME DESTINATION bin | ||
| ARCHIVE DESTINATION lib | ||
| LIBRARY DESTINATION lib | ||
| ) | ||
|
|
||
| if(BUILD_TESTING) | ||
| find_package(ament_cmake_gmock REQUIRED) | ||
| find_package(control_msgs REQUIRED) | ||
| find_package(controller_manager REQUIRED) | ||
| find_package(controller_interface REQUIRED) | ||
| find_package(hardware_interface REQUIRED) | ||
| find_package(ros2_control_test_assets REQUIRED) | ||
|
|
||
| # create custom test function to pass yaml file into test main | ||
| function(add_test_with_yaml_input TARGET SOURCES YAML_FILE) | ||
| add_executable(${TARGET} ${SOURCES}) | ||
| _ament_cmake_gmock_find_gmock() | ||
| target_include_directories(${TARGET} PUBLIC "${GMOCK_INCLUDE_DIRS}") | ||
| target_link_libraries(${TARGET} ${GMOCK_LIBRARIES}) | ||
| set(executable "$<TARGET_FILE:${TARGET}>") | ||
| set(result_file "${AMENT_TEST_RESULTS_DIR}/${PROJECT_NAME}/${TARGET}.gtest.xml") | ||
| ament_add_test( | ||
| ${TARGET} | ||
| COMMAND ${executable} --ros-args --params-file ${YAML_FILE} | ||
| --gtest_output=xml:${result_file} | ||
| OUTPUT_FILE ${AMENT_TEST_RESULTS_DIR}/${PROJECT_NAME}/${TARGET}.txt | ||
| RESULT_FILE ${result_file} | ||
| ) | ||
| endfunction() | ||
|
|
||
| # test loading admittance controller | ||
| add_test_with_yaml_input(test_load_admittance_controller test/test_load_admittance_controller.cpp | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/test/test_params.yaml) | ||
| target_include_directories(test_load_admittance_controller PUBLIC ${GMOCK_INCLUDE_DIRS}) | ||
| target_link_libraries(test_load_admittance_controller ${GMOCK_LIBRARIES}) | ||
| ament_target_dependencies( | ||
| test_load_admittance_controller | ||
| controller_manager | ||
| hardware_interface | ||
| ros2_control_test_assets | ||
| ) | ||
| # test admittance controller function | ||
| add_test_with_yaml_input(test_admittance_controller test/test_admittance_controller.cpp | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/test/test_params.yaml) | ||
| target_include_directories(test_admittance_controller PRIVATE include) | ||
| target_link_libraries(test_admittance_controller admittance_controller) | ||
| ament_target_dependencies( | ||
| test_admittance_controller | ||
| control_msgs | ||
| controller_interface | ||
| hardware_interface | ||
| ros2_control_test_assets | ||
| ) | ||
| endif() | ||
|
|
||
| ament_export_dependencies( | ||
| ${THIS_PACKAGE_INCLUDE_DEPENDS} | ||
| ) | ||
| ament_export_include_directories( | ||
| include | ||
| ) | ||
| ament_export_libraries( | ||
| ${PROJECT_NAME} | ||
| ) | ||
| ament_package() |
This file contains hidden or 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,10 @@ | ||
| admittance_controller | ||
| ========================================== | ||
|
|
||
| The admittance controller operates in one of two modes: chained and non-chained. | ||
| In the non-chained mode, the controller listens to joint commands on the `~/joint_commands` topic to get a reference. In chained mode, the admittance controller receives its reference from another controller. In both modes, the controller applies the calculated admittance values to the received reference and write the modified reference to its command interfaces. | ||
|
|
||
| The controller requires an external kinematics plugin to function. The [kinematics_interface](https://github.com/ros-controls/kinematics_interface) repository provides an interface and an implementation that the admittance controller can use. | ||
|
|
||
| ## Parameters: | ||
| The admittance controller's uses the [generate_parameter_library](https://github.com/PickNikRobotics/generate_parameter_library) to handle its parameters. The parameter definition file, located [here](../admittance_controller/src/admittance_controller_parameters.yaml) contains descriptions for all the parameters used by the controller. | ||
This file contains hidden or 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,9 @@ | ||
| <library path="admittance_controller"> | ||
| <class name="admittance_controller/AdmittanceController" | ||
| type="admittance_controller::AdmittanceController" | ||
| base_class_type="controller_interface::ChainableControllerInterface"> | ||
| <description> | ||
| AdmittanceController ros2_control controller. | ||
| </description> | ||
| </class> | ||
| </library> |
187 changes: 187 additions & 0 deletions
187
admittance_controller/include/admittance_controller/admittance_controller.hpp
This file contains hidden or 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,187 @@ | ||
| // Copyright (c) 2022, PickNik, Inc. | ||
| // | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
| // | ||
| /// \authors: Denis Stogl, Andy Zelenak, Paul Gesel | ||
|
|
||
| #ifndef ADMITTANCE_CONTROLLER__ADMITTANCE_CONTROLLER_HPP_ | ||
| #define ADMITTANCE_CONTROLLER__ADMITTANCE_CONTROLLER_HPP_ | ||
|
|
||
| #include <chrono> | ||
| #include <memory> | ||
| #include <string> | ||
| #include <vector> | ||
|
|
||
| // include generated parameter library | ||
| #include "admittance_controller_parameters.hpp" | ||
|
|
||
| #include "admittance_controller/admittance_rule.hpp" | ||
| #include "admittance_controller/visibility_control.h" | ||
| #include "control_msgs/msg/admittance_controller_state.hpp" | ||
| #include "controller_interface/chainable_controller_interface.hpp" | ||
| #include "geometry_msgs/msg/pose_stamped.hpp" | ||
| #include "geometry_msgs/msg/transform_stamped.hpp" | ||
| #include "geometry_msgs/msg/wrench_stamped.hpp" | ||
| #include "hardware_interface/types/hardware_interface_type_values.hpp" | ||
| #include "pluginlib/class_loader.hpp" | ||
| #include "rclcpp/duration.hpp" | ||
| #include "rclcpp/time.hpp" | ||
| #include "rclcpp_lifecycle/node_interfaces/lifecycle_node_interface.hpp" | ||
| #include "rclcpp_lifecycle/state.hpp" | ||
| #include "realtime_tools/realtime_buffer.h" | ||
| #include "realtime_tools/realtime_publisher.h" | ||
| #include "semantic_components/force_torque_sensor.hpp" | ||
|
|
||
| #include "trajectory_msgs/msg/joint_trajectory.hpp" | ||
|
|
||
| namespace admittance_controller | ||
| { | ||
| using ControllerStateMsg = control_msgs::msg::AdmittanceControllerState; | ||
|
|
||
| class AdmittanceController : public controller_interface::ChainableControllerInterface | ||
| { | ||
| public: | ||
| ADMITTANCE_CONTROLLER_PUBLIC | ||
| controller_interface::CallbackReturn on_init() override; | ||
|
|
||
| /// Export configuration of required state interfaces. | ||
| /** | ||
| * Allowed types of state interfaces are \ref hardware_interface::POSITION, | ||
| * \ref hardware_interface::VELOCITY, \ref hardware_interface::ACCELERATION. | ||
| */ | ||
| ADMITTANCE_CONTROLLER_PUBLIC | ||
| controller_interface::InterfaceConfiguration command_interface_configuration() const override; | ||
|
|
||
| /// Export configuration of required state interfaces. | ||
| /** | ||
| * Allowed types of state interfaces are \ref hardware_interface::POSITION, | ||
| * \ref hardware_interface::VELOCITY, \ref hardware_interface::ACCELERATION. | ||
| */ | ||
| ADMITTANCE_CONTROLLER_PUBLIC | ||
| controller_interface::InterfaceConfiguration state_interface_configuration() const override; | ||
|
|
||
| ADMITTANCE_CONTROLLER_PUBLIC | ||
| controller_interface::CallbackReturn on_configure( | ||
| const rclcpp_lifecycle::State & previous_state) override; | ||
|
|
||
| ADMITTANCE_CONTROLLER_PUBLIC | ||
| controller_interface::CallbackReturn on_activate( | ||
| const rclcpp_lifecycle::State & previous_state) override; | ||
|
|
||
| ADMITTANCE_CONTROLLER_PUBLIC | ||
| controller_interface::CallbackReturn on_deactivate( | ||
| const rclcpp_lifecycle::State & previous_state) override; | ||
|
|
||
| ADMITTANCE_CONTROLLER_PUBLIC | ||
| controller_interface::CallbackReturn on_cleanup( | ||
| const rclcpp_lifecycle::State & previous_state) override; | ||
|
|
||
| ADMITTANCE_CONTROLLER_PUBLIC | ||
| controller_interface::CallbackReturn on_error( | ||
| const rclcpp_lifecycle::State & previous_state) override; | ||
|
|
||
| ADMITTANCE_CONTROLLER_PUBLIC | ||
| controller_interface::return_type update_and_write_commands( | ||
| const rclcpp::Time & time, const rclcpp::Duration & period) override; | ||
|
|
||
| protected: | ||
| std::vector<hardware_interface::CommandInterface> on_export_reference_interfaces() override; | ||
|
|
||
| controller_interface::return_type update_reference_from_subscribers() override; | ||
|
|
||
| size_t num_joints_ = 0; | ||
| std::vector<std::string> command_joint_names_; | ||
|
|
||
| // The interfaces are defined as the types in 'allowed_interface_types_' member. | ||
| // For convenience, for each type the interfaces are ordered so that i-th position | ||
| // matches i-th index in joint_names_ | ||
| template <typename T> | ||
| using InterfaceReferences = std::vector<std::vector<std::reference_wrapper<T>>>; | ||
|
|
||
| InterfaceReferences<hardware_interface::LoanedCommandInterface> joint_command_interface_; | ||
| InterfaceReferences<hardware_interface::LoanedStateInterface> joint_state_interface_; | ||
|
|
||
| bool has_position_state_interface_ = false; | ||
| bool has_velocity_state_interface_ = false; | ||
| bool has_acceleration_state_interface_ = false; | ||
| bool has_position_command_interface_ = false; | ||
| bool has_velocity_command_interface_ = false; | ||
| bool has_acceleration_command_interface_ = false; | ||
| bool has_effort_command_interface_ = false; | ||
|
|
||
| // To reduce number of variables and to make the code shorter the interfaces are ordered in types | ||
| // as the following constants | ||
| const std::vector<std::string> allowed_interface_types_ = { | ||
| hardware_interface::HW_IF_POSITION, hardware_interface::HW_IF_VELOCITY, | ||
| hardware_interface::HW_IF_ACCELERATION}; | ||
|
|
||
| // internal reference values | ||
| const std::vector<std::string> allowed_reference_interfaces_types_ = { | ||
| hardware_interface::HW_IF_POSITION, hardware_interface::HW_IF_VELOCITY}; | ||
| std::vector<std::reference_wrapper<double>> position_reference_; | ||
| std::vector<std::reference_wrapper<double>> velocity_reference_; | ||
|
|
||
| // Admittance rule and dependent variables; | ||
| std::unique_ptr<admittance_controller::AdmittanceRule> admittance_; | ||
|
|
||
| // force torque sensor | ||
| std::unique_ptr<semantic_components::ForceTorqueSensor> force_torque_sensor_; | ||
|
|
||
| // ROS subscribers | ||
| rclcpp::Subscription<trajectory_msgs::msg::JointTrajectoryPoint>::SharedPtr | ||
| input_joint_command_subscriber_; | ||
| rclcpp::Publisher<control_msgs::msg::AdmittanceControllerState>::SharedPtr s_publisher_; | ||
|
|
||
| // admittance parameters | ||
| std::shared_ptr<admittance_controller::ParamListener> parameter_handler_; | ||
|
|
||
| // ROS messages | ||
| std::shared_ptr<trajectory_msgs::msg::JointTrajectoryPoint> joint_command_msg_; | ||
|
|
||
| // real-time buffer | ||
| realtime_tools::RealtimeBuffer<std::shared_ptr<trajectory_msgs::msg::JointTrajectoryPoint>> | ||
| input_joint_command_; | ||
| std::unique_ptr<realtime_tools::RealtimePublisher<ControllerStateMsg>> state_publisher_; | ||
|
|
||
| trajectory_msgs::msg::JointTrajectoryPoint last_commanded_; | ||
| trajectory_msgs::msg::JointTrajectoryPoint last_reference_; | ||
|
|
||
| // control loop data | ||
| // reference_: reference value read by the controller | ||
| // joint_state_: current joint readings from the hardware | ||
| // reference_admittance_: reference value used by the controller after the admittance values are | ||
| // applied ft_values_: values read from the force torque sensor | ||
| trajectory_msgs::msg::JointTrajectoryPoint reference_, joint_state_, reference_admittance_; | ||
| geometry_msgs::msg::Wrench ft_values_; | ||
|
|
||
| /** | ||
| * @brief Read values from hardware interfaces and set corresponding fields of state_current and ft_values | ||
| */ | ||
| void read_state_from_hardware( | ||
| trajectory_msgs::msg::JointTrajectoryPoint & state_current, | ||
| geometry_msgs::msg::Wrench & ft_values); | ||
|
|
||
| /** | ||
| * @brief Set fields of state_reference with values from controllers exported position and velocity references | ||
| */ | ||
| void read_state_reference_interfaces(trajectory_msgs::msg::JointTrajectoryPoint & state); | ||
|
|
||
| /** | ||
| * @brief Write values from state_command to claimed hardware interfaces | ||
| */ | ||
| void write_state_to_hardware(const trajectory_msgs::msg::JointTrajectoryPoint & state_command); | ||
| }; | ||
|
|
||
| } // namespace admittance_controller | ||
|
|
||
| #endif // ADMITTANCE_CONTROLLER__ADMITTANCE_CONTROLLER_HPP_ |
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.
Uh oh!
There was an error while loading. Please reload this page.