resource_helpers.h
Go to the documentation of this file.
1 // Copyright (c) 2017 Franka Emika GmbH
2 // Use of this source code is governed by the Apache-2.0 license, see LICENSE
3 #pragma once
4 
5 #include <list>
6 #include <map>
7 #include <string>
8 #include <vector>
9 
11 
12 #include <franka_hw/control_mode.h>
13 
14 namespace franka_hw {
15 
16 using ResourceWithClaimsMap = std::map<std::string, std::vector<std::vector<std::string>>>;
17 
19  uint8_t joint_position_claims = 0;
20  uint8_t joint_velocity_claims = 0;
21  uint8_t joint_torque_claims = 0;
23  uint8_t cartesian_pose_claims = 0;
24 };
25 
26 using ArmClaimedMap = std::map<std::string, ResourceClaims>;
27 
28 bool findArmIdInResourceId(const std::string& resource_id, std::string* arm_id);
29 
30 ResourceWithClaimsMap getResourceMap(const std::list<hardware_interface::ControllerInfo>& info);
31 
32 bool getArmClaimedMap(ResourceWithClaimsMap& resource_map, ArmClaimedMap& arm_claim_map);
33 
34 ControlMode getControlMode(const std::string& arm_id, ArmClaimedMap& arm_claim_map);
35 
36 bool hasConflictingMultiClaim(const ResourceWithClaimsMap& resource_map);
37 
38 bool hasConflictingJointAndCartesianClaim(const ArmClaimedMap& arm_claim_map,
39  const std::string& arm_id);
40 
41 bool partiallyClaimsArmJoints(const ArmClaimedMap& arm_claim_map, const std::string& arm_id);
42 
43 bool hasTrajectoryClaim(const ArmClaimedMap& arm_claim_map, const std::string& arm_id);
44 
45 } // namespace franka_hw
std::string arm_id
bool getArmClaimedMap(ResourceWithClaimsMap &resource_map, ArmClaimedMap &arm_claim_map)
bool hasConflictingJointAndCartesianClaim(const ArmClaimedMap &arm_claim_map, const std::string &arm_id)
ControlMode getControlMode(const std::string &arm_id, ArmClaimedMap &arm_claim_map)
std::map< std::string, ResourceClaims > ArmClaimedMap
bool findArmIdInResourceId(const std::string &resource_id, std::string *arm_id)
std::map< std::string, std::vector< std::vector< std::string >>> ResourceWithClaimsMap
bool hasTrajectoryClaim(const ArmClaimedMap &arm_claim_map, const std::string &arm_id)
bool partiallyClaimsArmJoints(const ArmClaimedMap &arm_claim_map, const std::string &arm_id)
ResourceWithClaimsMap getResourceMap(const std::list< hardware_interface::ControllerInfo > &info)
bool hasConflictingMultiClaim(const ResourceWithClaimsMap &resource_map)


franka_hw
Author(s): Franka Emika GmbH
autogenerated on Fri Oct 23 2020 03:47:05