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
ROSEE::ActionGeneric
Class to handle a generic, simple action. Differently from other class, this is easily creable manual...
Definition: ActionGeneric.h:32
ROSEE::ActionGeneric::ActionGeneric
ActionGeneric()
default costructor. It is used when parsing a file with YamlWorker,
Definition: ActionGeneric.cpp:20
ROSEE::ActionGeneric::getJointPos
JointPos getJointPos() const override
Get the joint position related to this action, overriden from Action.
Definition: ActionGeneric.cpp:97
ROSEE
Definition: EEInterface.h:30
ROSEE::JointsInvolvedCount
std::map< std::string, unsigned int > JointsInvolvedCount
The map to describe, how many times a joint is set by the action. An ActionPrimitive and an ActionCom...
Definition: Action.h:63
ROSEE::Action
The pure virtual class representing an Action. It has members that are in common to all derived class...
Definition: Action.h:71
Action.h
Utils.h
ROSEE::ActionGeneric::jointPos
JointPos jointPos
Definition: ActionGeneric.h:94
ROSEE::ActionGeneric::fillFromYaml
virtual bool fillFromYaml(YAML::const_iterator yamlIt) override
function to fill members of the Action with infos taken from yaml files
Definition: ActionGeneric.cpp:130
ROSEE::ActionGeneric::getAllJointPos
std::vector< ROSEE::JointPos > getAllJointPos() const override
Get the joint position related to this action, overriden from Action Necessary to not make this class...
Definition: ActionGeneric.cpp:101
ROSEE::ActionGeneric::ConstPtr
std::shared_ptr< const ActionGeneric > ConstPtr
Definition: ActionGeneric.h:36
ROSEE::ActionGeneric::Ptr
std::shared_ptr< ActionGeneric > Ptr
Definition: ActionGeneric.h:35
ROSEE::JointPos
std::map< std::string, std::vector< double > > JointPos
The map to describe the position of all actuated joints. The key is the name of the string,...
Definition: Action.h:40
ROSEE::ActionGeneric::emitYaml
virtual void emitYaml(YAML::Emitter &out) const override
Function to fill the argument passed with info about the action. Pure virtual because each derived cl...
Definition: ActionGeneric.cpp:107
ROSEE::Action::fingersInvolved
std::set< std::string > fingersInvolved
Definition: Action.h:148


end-effector
Author(s): Luca Muratore , Davide Torielli , Liana Bertoni
autogenerated on Sat Dec 14 2024 03:49:26