ROSEndEffector
ROS End-Effector package: provides a ROS-based set of standard interfaces to command robotics end-effectors in an agnostic fashion.
ActionGeneric.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 ROSEE_ACTIONGENERIC_H
18 #define ROSEE_ACTIONGENERIC_H
19 
21 #include <yaml-cpp/yaml.h>
22 #include <end_effector/Utils.h>
23 
24 
25 namespace ROSEE {
26 
32 class ActionGeneric : public Action {
33 
34 public:
35  typedef std::shared_ptr<ActionGeneric> Ptr;
36  typedef std::shared_ptr<const ActionGeneric> ConstPtr;
37 
44  ActionGeneric() ;
50  ActionGeneric (std::string actionName, ROSEE::JointPos jointPos);
51 
60  ActionGeneric (std::string actionName, ROSEE::JointPos jointPos, JointsInvolvedCount jic);
61  ActionGeneric (std::string actionName, ROSEE::JointPos jointPos, JointsInvolvedCount jic, std::set <std::string> fingersInvolved);
62 
67  JointPos getJointPos () const override;
68 
75  std::vector < ROSEE::JointPos > getAllJointPos () const override;
76 
80  virtual void emitYaml ( YAML::Emitter& out ) const override;
81 
85  virtual bool fillFromYaml ( YAML::const_iterator yamlIt ) override;
86 
87 protected:
88 
92  ActionGeneric(std::string actionName) ;
93 
95 
96 
97 };
98 
99 }
100 
101 #endif // ROSEE_ACTIONGENERIC_H
std::map< std::string, std::vector< double > > JointPos
The map to describe the position of all actuated joints.
Definition: Action.h:40
std::map< std::string, unsigned int > JointsInvolvedCount
The map to describe, how many times a joint is set by the action.
Definition: Action.h:63
The pure virtual class representing an Action.
Definition: Action.h:71
std::vector< ROSEE::JointPos > getAllJointPos() const override
Get the joint position related to this action, overriden from Action Necessary to not make this class...
std::shared_ptr< ActionGeneric > Ptr
Definition: ActionGeneric.h:35
std::shared_ptr< const ActionGeneric > ConstPtr
Definition: ActionGeneric.h:36
Class to handle a generic, simple action.
Definition: ActionGeneric.h:32
virtual void emitYaml(YAML::Emitter &out) const override
Function to fill the argument passed with info about the action.
JointPos getJointPos() const override
Get the joint position related to this action, overriden from Action.
ActionGeneric()
default costructor.
std::set< std::string > fingersInvolved
Definition: Action.h:148
virtual bool fillFromYaml(YAML::const_iterator yamlIt) override
function to fill members of the Action with infos taken from yaml files