hpp-manipulation-urdf  4.9.0
Implementation of a parser for hpp-manipulation.
position.hh
Go to the documentation of this file.
1 // Copyright (c) 2014, LAAS-CNRS
2 // Authors: Joseph Mirabel (joseph.mirabel@laas.fr)
3 //
4 // This file is part of hpp-manipulation-urdf.
5 // hpp-manipulation-urdf is free software: you can redistribute it
6 // and/or modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation, either version
8 // 3 of the License, or (at your option) any later version.
9 //
10 // hpp-manipulation-urdf is distributed in the hope that it will be
11 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
12 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // General Lesser Public License for more details. You should have
14 // received a copy of the GNU Lesser General Public License along with
15 // hpp-manipulation-urdf. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef HPP_MANIPULATION_SRDF_FACTORIES_POSITION_HH
18 # define HPP_MANIPULATION_SRDF_FACTORIES_POSITION_HH
19 
20 # include <hpp/manipulation/fwd.hh>
21 
22 # include <pinocchio/spatial/se3.hpp>
24 
25 namespace hpp {
26  namespace manipulation {
27  namespace srdf {
30 
37  class PositionFactory : public parser::SequenceFactory <float> {
38  public:
40  SequenceFactory <float> (parent, element, 7) {}
41 
42  virtual void finishTags ();
43 
44  const Transform3f& position () const
45  {
46  return position_;
47  }
48 
49  private:
50  void computeTransformFromText ();
51  void computeTransformFromAttributes ();
52 
53  Transform3f position_;
54  };
55 
57  } // namespace srdf
58  } // namespace manipulation
59 } // namespace hpp
60 
61 #endif // HPP_MANIPULATION_SRDF_FACTORIES_POSITION_HH
TiXmlElement XMLElement
Definition: parser.hh:31
PositionFactory(ObjectFactory *parent, const parser::XMLElement *element)
Definition: position.hh:39
pinocchio::Transform3f Transform3f
SequenceFactory(ObjectFactory *parent, const XMLElement *element, const int nbValue=-1)
Definition: sequence.hh:39
Factory parsing sequence of values.
Definition: sequence.hh:36
const Transform3f & position() const
Definition: position.hh:44
Class that catch XML Parser events for a specific tag and build the corresponding Object...
Definition: parser.hh:73
virtual void finishTags()
Called when all the child tags have been processed.
Build a fcl::Transform.
Definition: position.hh:37