ROSEndEffector
ROS End-Effector package: provides a ROS-based set of standard interfaces to command robotics end-effectors in an agnostic fashion.
ActionSingleJointMultipleTips.h
Go to the documentation of this file.
1 /*
2  * Copyright 2020 <copyright holder> <email>
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef ACTIONSINGLEJOINTMULTIPLETIPS_H
18 #define ACTIONSINGLEJOINTMULTIPLETIPS_H
19 
21 #include <yaml-cpp/yaml.h>
22 #include <iostream>
23 
24 namespace ROSEE {
25 
32 
33 public:
34 
35  typedef std::map < std::string, ActionSingleJointMultipleTips > Map;
36 
38 
45  ActionSingleJointMultipleTips(std::string actionName, unsigned int nFingers);
58  ActionSingleJointMultipleTips (std::string actionName, std::vector<std::string> fingers, std::string jointName, JointPos jpFurther, JointPos jpNearer);
59 
65  std::vector < JointPos > getAllJointPos() const override;
66 
71  JointPos getJointPos () const override;
72 
77  std::set < std::string> getKeyElements () const override;
78 
80  JointPos getJointPosNearer () const;
81  std::string getJointName() const;
82 
83  void print () const override;
84  void emitYaml ( YAML::Emitter& out ) const override;
85  bool fillFromYaml( YAML::const_iterator yamlIt ) override;
86 
87 private:
88 
91  std::string jointInvolved;
92 };
93 }
94 
95 #endif // ACTIONSINGLEJOINTMULTIPLETIPS_H
Virtual class, Base of all the primitive actions.
void print() const override
Overridable functions, if we want to make them more action-specific.
std::map< std::string, std::vector< double > > JointPos
The map to describe the position of all actuated joints.
Definition: Action.h:40
bool fillFromYaml(YAML::const_iterator yamlIt) override
function to fill members of the Action with infos taken from yaml files
std::map< std::string, ActionSingleJointMultipleTips > Map
void emitYaml(YAML::Emitter &out) const override
Function to fill the argument passed with info about the action.
std::vector< JointPos > getAllJointPos() const override
Overriden get from the pure virtual function of the base class Action The signature must be equal...
std::set< std::string > getKeyElements() const override
Necessary method to know the key used by the maps which store all the Actions of one type...
Primitive which indicate a motion of n fingers moving ONLY ONE joint.
JointPos getJointPos() const override
Overriden get from the pure virtual function of the base class Action.