-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/upgrade_ci
- Loading branch information
Showing
70 changed files
with
1,011 additions
and
828 deletions.
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
14 changes: 7 additions & 7 deletions
14
examples/iiqka_moveit_example/config/dummy_impedance_publisher.yaml
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
/publisher_joint_impedance_controller: | ||
ros__parameters: | ||
|
||
controller_name: "joint_impedance_controller" | ||
controller_name: "joint_group_impedance_controller" | ||
|
||
stiffness_goals: [30, 0, 30, 30, 30, 30] | ||
damping_goals: [0.7, 0.0, 0.7, 0.7, 0.7, 0.7] | ||
|
||
joints: | ||
- joint_a1 | ||
- joint_a2 | ||
- joint_a3 | ||
- joint_a4 | ||
- joint_a5 | ||
- joint_a6 | ||
- joint_1 | ||
- joint_2 | ||
- joint_3 | ||
- joint_4 | ||
- joint_5 | ||
- joint_6 |
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
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -1,11 +1,39 @@ | ||
# Message describing the state of the robot and FRI | ||
|
||
# FRI session state enum | ||
# IDLE = 0, MONITORING_WAIT = 1, MONITORING_READY = 2,COMMANDING_WAIT = 3, COMMANDING_ACTIVE = 4 | ||
int32 session_state | ||
|
||
# FRI connection quality | ||
# POOR = 0, FAIR = 1, GOOD = 2, EXCELLENT = 3 | ||
int32 connection_quality | ||
|
||
# Safety state | ||
# NORMAL_OPERATION = 0, SAFETY_STOP_LEVEL_0 = 1, SAFETY_STOP_LEVEL_1 = 2, SAFETY_STOP_LEVEL_2 = 3 | ||
int32 safety_state | ||
|
||
# Client command mode | ||
# NO_COMMAND_MODE = 0, POSITION = 1, WRENCH = 2, TORQUE = 3 | ||
int32 command_mode | ||
|
||
# Control mode of the robot | ||
# POSITION_CONTROL_MODE = 0, CART_IMP_CONTROL_MODE = 1, JOINT_IMP_CONTROL_MODE = 2, NO_CONTROL = 3 | ||
int32 control_mode | ||
|
||
# Operation mode | ||
# TEST_MODE_1 = 0, TEST_MODE_2 = 1, AUTOMATIC_MODE = 2 | ||
int32 operation_mode | ||
|
||
# Drive state | ||
# OFF = 0, TRANSITIONING = 1, ACTIVE = 2 | ||
int32 drive_state | ||
|
||
# Overlay overlay_type | ||
# NO_OVERLAY = 0, JOINT = 1, CARTESIAN = 2 | ||
int32 overlay_type | ||
|
||
# Tracking performance of the robot | ||
# Indicates how well the commanded robot is able to follow the commands of the FRI client. | ||
# The best possible value is 1.0, when the robot executes the given commands instantaneously. | ||
# The tracking performance is always 0 when the session state is not COMMANDING_ACTIVE. | ||
float64 tracking_performance |
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
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
67 changes: 67 additions & 0 deletions
67
kuka_drivers_core/include/communication_helpers/ros2_control_tools.hpp
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,67 @@ | ||
// Copyright 2020 Áron Svastits | ||
// | ||
// 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. | ||
|
||
#ifndef COMMUNICATION_HELPERS__ROS2_CONTROL_TOOLS_HPP_ | ||
#define COMMUNICATION_HELPERS__ROS2_CONTROL_TOOLS_HPP_ | ||
|
||
#include <string> | ||
#include <vector> | ||
#include <memory> | ||
|
||
#include "rclcpp/rclcpp.hpp" | ||
#include "controller_manager_msgs/srv/set_hardware_component_state.hpp" | ||
#include "controller_manager_msgs/srv/switch_controller.hpp" | ||
#include "communication_helpers/service_tools.hpp" | ||
|
||
namespace kuka_drivers_core | ||
{ | ||
|
||
bool changeHardwareState( | ||
rclcpp::Client<controller_manager_msgs::srv::SetHardwareComponentState>::SharedPtr client, | ||
const std::string & hardware_name, uint8_t state, int timeout_ms = 2000) | ||
{ | ||
auto hw_request = | ||
std::make_shared<controller_manager_msgs::srv::SetHardwareComponentState::Request>(); | ||
hw_request->name = hardware_name; | ||
hw_request->target_state.id = state; | ||
auto hw_response = sendRequest<controller_manager_msgs::srv::SetHardwareComponentState::Response>( | ||
client, hw_request, 0, timeout_ms); | ||
if (!hw_response || !hw_response->ok) { | ||
return false; | ||
} | ||
return true; | ||
} | ||
|
||
bool changeControllerState( | ||
rclcpp::Client<controller_manager_msgs::srv::SwitchController>::SharedPtr client, | ||
const std::vector<std::string> & activate_controllers, | ||
const std::vector<std::string> & deactivate_controllers, | ||
int32_t strictness = controller_manager_msgs::srv::SwitchController::Request::STRICT) | ||
{ | ||
auto controller_request = | ||
std::make_shared<controller_manager_msgs::srv::SwitchController::Request>(); | ||
controller_request->strictness = strictness; | ||
controller_request->activate_controllers = activate_controllers; | ||
controller_request->deactivate_controllers = deactivate_controllers; | ||
|
||
auto controller_response = sendRequest<controller_manager_msgs::srv::SwitchController::Response>( | ||
client, controller_request, 0, 2000); | ||
if (!controller_response || !controller_response->ok) { | ||
return false; | ||
} | ||
return true; | ||
} | ||
} // namespace kuka_drivers_core | ||
|
||
#endif // COMMUNICATION_HELPERS__ROS2_CONTROL_TOOLS_HPP_ |
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
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
56 changes: 56 additions & 0 deletions
56
kuka_drivers_core/include/kuka_drivers_core/hardware_interface_types.hpp
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,56 @@ | ||
// Copyright 2023 Áron Svastits | ||
// | ||
// 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. | ||
|
||
|
||
#ifndef KUKA_DRIVERS_CORE__HARDWARE_INTERFACE_TYPES_HPP_ | ||
#define KUKA_DRIVERS_CORE__HARDWARE_INTERFACE_TYPES_HPP_ | ||
|
||
namespace hardware_interface | ||
{ | ||
/* Custom interfaces */ | ||
// Constant defining stiffness interface | ||
static constexpr char HW_IF_STIFFNESS[] = "stiffness"; | ||
// Constant defining damping interface | ||
static constexpr char HW_IF_DAMPING[] = "damping"; | ||
// Constant defining external torque interface | ||
static constexpr char HW_IF_EXTERNAL_TORQUE[] = "external_torque"; | ||
|
||
/* Interface prefixes */ | ||
// Constant defining prefix for I/O interfaces | ||
static constexpr char IO_PREFIX[] = "gpio"; | ||
// Constant defining prefix for interfaces of "configuration controllers" | ||
static constexpr char CONFIG_PREFIX[] = "runtime_config"; | ||
// Constant defining prefix for fri state | ||
static constexpr char FRI_STATE_PREFIX[] = "fri_state"; | ||
|
||
/* Configuration interfaces */ | ||
// Constant defining control_mode configuration interface | ||
static constexpr char CONTROL_MODE[] = "control_mode"; | ||
// Constant defining the receive multiplier interface needed for FRI | ||
static constexpr char RECEIVE_MULTIPLIER[] = "receive_multiplier"; | ||
|
||
/* FRI state interfaces */ | ||
static constexpr char SESSION_STATE[] = "session_state"; | ||
static constexpr char CONNECTION_QUALITY[] = "connection_quality"; | ||
static constexpr char SAFETY_STATE[] = "safety_state"; | ||
static constexpr char COMMAND_MODE[] = "command_mode"; | ||
static constexpr char OPERATION_MODE[] = "operation_mode"; | ||
static constexpr char DRIVE_STATE[] = "drive_state"; | ||
static constexpr char OVERLAY_TYPE[] = "overlay_type"; | ||
static constexpr char TRACKING_PERFORMANCE[] = "tracking_performance"; | ||
|
||
|
||
} // namespace hardware_interface | ||
|
||
#endif // KUKA_DRIVERS_CORE__HARDWARE_INTERFACE_TYPES_HPP_ |
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
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
Oops, something went wrong.