hpp-constraints  4.9.1
Definition of basic geometric constraints for motion planning
explicit.hh
Go to the documentation of this file.
1 // Copyright (c) 2015, LAAS-CNRS
2 // Authors: Florent Lamiraux
3 //
4 // This file is part of hpp-constraints.
5 // hpp-constraints 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-constraints 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-constraints. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef HPP_CONSTRAINTS_EXPLICIT_HH
18 # define HPP_CONSTRAINTS_EXPLICIT_HH
19 
21 
22 namespace hpp {
23  namespace constraints {
26 
124  class HPP_CONSTRAINTS_DLLAPI Explicit : public virtual Implicit
125  {
126  public:
128  virtual ImplicitPtr_t copy () const;
129 
147  static ExplicitPtr_t create
148  (const DevicePtr_t& robot,
149  const DifferentiableFunctionPtr_t& function,
150  const segments_t& inputConf,
151  const segments_t& outputConf,
152  const segments_t& inputVelocity,
153  const segments_t& outputVelocity,
154  const ComparisonTypes_t& comp = ComparisonTypes_t())
156 
172  static ExplicitPtr_t create
173  (const LiegroupSpacePtr_t& configSpace,
174  const DifferentiableFunctionPtr_t& function,
175  const segments_t& inputConf,
176  const segments_t& outputConf,
177  const segments_t& inputVelocity,
178  const segments_t& outputVelocity,
179  const ComparisonTypes_t& comp = ComparisonTypes_t());
180 
182  static ExplicitPtr_t createCopy (const ExplicitPtr_t& other);
183 
187  {
188  return inputToOutput_;
189  }
190 
192  const segments_t& outputConf () const
193  {
194  return outputConf_;
195  }
197  const segments_t& outputVelocity () const
198  {
199  return outputVelocity_;
200  }
202  const segments_t& inputConf () const
203  {
204  return inputConf_;
205  }
207  const segments_t& inputVelocity () const
208  {
209  return inputVelocity_;
210  }
223  virtual void implicitToExplicitRhs (vectorIn_t implicitRhs,
224  vectorOut_t explicitRhs) const
225  {
226  explicitRhs = implicitRhs;
227  }
228 
241  virtual void explicitToImplicitRhs (vectorIn_t explicitRhs,
242  vectorOut_t implicitRhs) const
243  {
244  implicitRhs = explicitRhs;
245  }
246 
247  protected:
265  Explicit
266  (const DevicePtr_t& robot, const DifferentiableFunctionPtr_t& function,
267  const segments_t& inputConf,
268  const segments_t& outputConf,
269  const segments_t& inputVelocity,
270  const segments_t& outputVelocity,
272 
288  Explicit
289  (const LiegroupSpacePtr_t& configSpace,
290  const DifferentiableFunctionPtr_t& function,
291  const segments_t& inputConf,
292  const segments_t& outputConf,
293  const segments_t& inputVelocity,
294  const segments_t& outputVelocity,
295  const ComparisonTypes_t& comp);
296 
298  Explicit (const Explicit& other);
299 
300  // Store weak pointer to itself
301  void init (const ExplicitWkPtr_t& weak);
302  protected:
303  // Relation between input and output configuration variables
309  private:
310  ExplicitWkPtr_t weak_;
311  }; // class Explicit
313  } // namespace constraints
314 } // namespace hpp
315 
316 #endif // HPP_CONSTRAINTS_EXPLICIT_HH
segments_t inputConf_
Definition: explicit.hh:305
pinocchio::vectorIn_t vectorIn_t
Definition: fwd.hh:46
DifferentiableFunctionPtr_t inputToOutput_
Definition: explicit.hh:304
const segments_t & outputVelocity() const
Get output degrees of freedom.
Definition: explicit.hh:197
pinocchio::LiegroupSpacePtr_t LiegroupSpacePtr_t
Definition: fwd.hh:54
pinocchio::DevicePtr_t DevicePtr_t
Definition: fwd.hh:91
ObjectFactory * create(ObjectFactory *parent=NULL, const XMLElement *element=NULL)
std::vector< segment_t > segments_t
Definition: fwd.hh:69
Definition: explicit.hh:124
const segments_t & inputConf() const
Get input configuration variables.
Definition: explicit.hh:202
virtual DifferentiableFunctionPtr_t explicitFunction() const
Definition: explicit.hh:186
std::vector< ComparisonType > ComparisonTypes_t
Definition: fwd.hh:170
segments_t outputVelocity_
Definition: explicit.hh:308
boost::shared_ptr< Explicit > ExplicitPtr_t
Definition: fwd.hh:173
virtual void explicitToImplicitRhs(vectorIn_t explicitRhs, vectorOut_t implicitRhs) const
Definition: explicit.hh:241
const segments_t & inputVelocity() const
Get input degrees of freedom.
Definition: explicit.hh:207
boost::shared_ptr< DifferentiableFunction > DifferentiableFunctionPtr_t
Definition: fwd.hh:95
virtual void implicitToExplicitRhs(vectorIn_t implicitRhs, vectorOut_t explicitRhs) const
Definition: explicit.hh:223
pinocchio::vectorOut_t vectorOut_t
Definition: fwd.hh:47
const segments_t & outputConf() const
Get output configuration variables.
Definition: explicit.hh:192
segments_t outputConf_
Definition: explicit.hh:306
Definition: implicit.hh:96
boost::shared_ptr< Implicit > ImplicitPtr_t
Definition: fwd.hh:157
segments_t inputVelocity_
Definition: explicit.hh:307
DifferentiableFunctionSet DifferentiableFunctionStack HPP_CONSTRAINTS_DEPRECATED
Definition: fwd.hh:99