Skip to content

Commit 30eeb8e

Browse files
committed
Refactor prepare_switch
Refactored prepare_switch mechanism. This way it should be easier to understand and to extend.
1 parent 8662c93 commit 30eeb8e

File tree

2 files changed

+113
-222
lines changed

2 files changed

+113
-222
lines changed

ur_robot_driver/include/ur_robot_driver/hardware_interface.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@
4040
#define UR_ROBOT_DRIVER__HARDWARE_INTERFACE_HPP_
4141

4242
// System
43+
#include <limits>
4344
#include <memory>
4445
#include <string>
46+
#include <unordered_map>
4547
#include <vector>
46-
#include <limits>
4748

4849
// ros2_control hardware_interface
4950
#include "hardware_interface/hardware_info.hpp"
@@ -115,6 +116,7 @@ class URPositionHardwareInterface : public hardware_interface::SystemInterface
115116
{
116117
public:
117118
RCLCPP_SHARED_PTR_DEFINITIONS(URPositionHardwareInterface);
119+
URPositionHardwareInterface();
118120
virtual ~URPositionHardwareInterface();
119121

120122
hardware_interface::CallbackReturn on_init(const hardware_interface::HardwareInfo& system_info) final;
@@ -319,6 +321,8 @@ class URPositionHardwareInterface : public hardware_interface::SystemInterface
319321
const std::string FORCE_MODE_GPIO = "force_mode";
320322
const std::string FREEDRIVE_MODE_GPIO = "freedrive_mode";
321323
const std::string TOOL_CONTACT_GPIO = "tool_contact";
324+
325+
std::unordered_map<std::string, std::unordered_map<std::string, bool>> mode_compatibility_;
322326
};
323327
} // namespace ur_robot_driver
324328

0 commit comments

Comments
 (0)