6 const std::map<std::string, std::shared_ptr<franka_gazebo::Joint>>& joints,
7 const std::string& arm_id)
9 for (
const auto& joint : joints) {
21 [](
const auto& resource) {
39 if (not
areFingerJoints(claimed_resource.resources) or claimed_resource.resources.size() != 2) {
44 if (not control_method) {
47 if (control_method.value() ==
EFFORT) {
62 return std::all_of(resources.begin(), resources.end(), [
this](
const std::string& joint_name) {
64 [&joint_name,
this](
const std::string& joint) {
66 if (joint.find(
arm_id_ +
"_finger_joint") != std::string::npos) {
69 return joint == joint_name;
75 return std::all_of(resources.begin(), resources.end(), [
this](
const std::string& joint_name) {
76 return joint_name.find(
arm_id_ +
"_finger_joint") != std::string::npos;
82 if (hardware_interface.find(
"hardware_interface::PositionJointInterface") != std::string::npos) {
85 if (hardware_interface.find(
"hardware_interface::VelocityJointInterface") != std::string::npos) {
88 if (hardware_interface.find(
"hardware_interface::EffortJointInterface") != std::string::npos) {
static boost::optional< ControlMethod > determineControlMethod(const std::string &hardware_interface)
returns the control method of a hardware interface
bool isClaimingArmController(const hardware_interface::ControllerInfo &info) const
checks if a controller that uses the joints of the arm (not gripper joints) claims a position...
bool isClaimingGripperController(const hardware_interface::ControllerInfo &info) const
checks if a controller wants to use the finger joints with the effort interface
std::vector< std::string > joint_names_
bool areFingerJoints(const std::set< std::string > &resources) const
checks if a set of joint_names only contains the joints that are used for the gripper ...
bool isValidController(const hardware_interface::ControllerInfo &controller) const
checks if a controller can be used in the franka_hw gazebo plugin
std::set< std::string > resources
static bool hasControlMethodAndValidSize(const hardware_interface::InterfaceResources &resource)
ControllerVerifier(const std::map< std::string, std::shared_ptr< franka_gazebo::Joint >> &joints, const std::string &arm_id)
Creates a ControllerVerifier object to check controllers for franka_gazebo.
bool areArmJoints(const std::set< std::string > &resources) const
checks if a set of joint_names only contains the joints that are used for the arm ...
std::vector< InterfaceResources > claimed_resources
std::string hardware_interface