Go to the documentation of this file.
25 for (
const auto &jsEl : jp) {
26 output <<
"\t\t"<<jsEl.first <<
" : ";
27 for(
const auto &jValue : jsEl.second){
28 output << jValue <<
", ";
30 output.seekp (-2, output.cur);
38 return jp *= multiplier;
43 return jp *= multiplier;
48 for (
auto &jsEl : jp) {
49 for (
int i = 0; i< jsEl.second.size(); i++) {
50 jsEl.second.at(i) *= multiplier;
68 for (
auto &jsEl : jp1) {
69 if (jsEl.second.size() != jp2.at(jsEl.first).size() ) {
70 throw "Dofs not same";
73 for (
int i = 0; i < jsEl.second.size(); i++) {
74 jsEl.second.at(i) += jp2.at(jsEl.first).at(i);
82 for (
const auto &jicEl : jic) {
83 output <<
"\t"<< jicEl.first <<
" : " << jicEl.second;
92 #define PROCESS_VAL(p) case(p): s = #p; break;
126 return fingersInvolved;
131 return jointsInvolvedCount;
137 std::stringstream output;
138 output <<
"ActionName: " <<
name << std::endl;
140 if (fingersInvolved.size() > 0 ){
141 output <<
"FingersInvolved: [";
142 for (
auto fingName : fingersInvolved){
143 output << fingName <<
", " ;
145 output.seekp (-2, output.cur);
146 output <<
"]" << std::endl;
149 output <<
"FingersInvolved: <not inserted>" << std::endl;
153 output <<
"JointsInvolvedCount: " << std::endl;;
154 output << jointsInvolvedCount << std::endl;
156 output <<
"JointPos:" << std::endl;
157 output << getJointPos() << std::endl;
161 std::cout << output.str();
JointPos operator+(JointPos jp1, JointPos jp2)
bool keys_equal(std::map< keyType, valueType1 > const &lhs, std::map< keyType, valueType2 > const &rhs)
Return false if two maps have different keys. The type of the keys (typename) must be the same obviou...
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...
JointPos & operator+=(JointPos &jp1, ROSEE::JointPos jp2)
JointPos operator*(double multiplier, JointPos jp)
JointPos & operator*=(JointPos &jp, double multiplier)
std::set< std::string > getFingersInvolved() const
Get for fingersInvolved.
Type
Enum useful to discriminate each action when, for example, we want to parse a file @remind if you cha...
JointsInvolvedCount getJointsInvolvedCount() const
Get for jointsInvolvedCount.
std::ostream & operator<<(std::ostream &output, const JointPos jp)
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,...
std::string getName() const
Get the name of the action.
virtual void print() const
Overridable functions, if we want to make them more action-specific.
end-effector
Author(s): Luca Muratore
, Davide Torielli , Liana Bertoni
autogenerated on Sat Dec 14 2024 03:49:26