hpp-rbprm  4.14.0
Implementation of RB-PRM planner using hpp.
rbprm-device.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2014 CNRS
3 // Authors: Steve Tonneau (steve.tonneau@laas.fr)
4 //
5 // This file is part of hpp-rbprm.
6 // hpp-rbprm is free software: you can redistribute it
7 // and/or modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation, either version
9 // 3 of the License, or (at your option) any later version.
10 //
11 // hpp-rbprm is distributed in the hope that it will be
12 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // General Lesser Public License for more details. You should have
15 // received a copy of the GNU Lesser General Public License along with
16 // hpp-core If not, see
17 // <http://www.gnu.org/licenses/>.
18 
19 #ifndef HPP_RBPRM_DEVICE_HH
20 #define HPP_RBPRM_DEVICE_HH
21 
22 #include <hpp/pinocchio/device.hh>
23 #include <hpp/rbprm/config.hh>
24 #include <map>
25 
26 namespace hpp {
27 
28 namespace pinocchio {
29 HPP_PREDEF_CLASS(RbPrmDevice);
30 
31 typedef std::map<std::string, DevicePtr_t> T_Rom;
32 
40 class RbPrmDevice;
41 typedef shared_ptr<RbPrmDevice> RbPrmDevicePtr_t;
42 
43 class HPP_RBPRM_DLLAPI RbPrmDevice : public Device {
44  public:
51  static RbPrmDevicePtr_t create(const std::string& name,
52  DevicePtr_t& robotRom);
53 
59  static RbPrmDevicePtr_t create(const std::string& name,
60  const T_Rom& robotRoms);
61 
62  public:
63  virtual ~RbPrmDevice();
64 
65  public:
68  virtual bool currentConfiguration(ConfigurationIn_t configuration);
69 
70  virtual void setDimensionExtraConfigSpace(const size_type& dimension);
71 
76  virtual void setEffectorReference(std::string romName, vector3_t ref);
77 
82  virtual vector3_t getEffectorReference(std::string romName);
83 
84  public:
86  const T_Rom robotRoms_;
87 
88  protected:
89  RbPrmDevice(const std::string& name, const T_Rom& robotRoms);
90 
94  void init(const RbPrmDeviceWkPtr_t& weakPtr);
95 
96  private:
97  std::map<std::string, vector3_t> effectorsReferences_;
98  RbPrmDeviceWkPtr_t weakPtr_;
99 }; // class RbPrmDevice
100 } // namespace pinocchio
101 } // namespace hpp
102 
103 #endif // HPP_RBPRM_DEVICE_HH
#define HPP_RBPRM_DLLAPI
Definition: config.hh:64
Definition: algorithm.hh:26
shared_ptr< RbPrmDevice > RbPrmDevicePtr_t
Definition: dynamic-validation.hh:27
HPP_PREDEF_CLASS(RbPrmDevice)
const T_Rom robotRoms_
Range Of Motion of the robot.
Definition: rbprm-device.hh:86
std::map< std::string, DevicePtr_t > T_Rom
Definition: rbprm-device.hh:31
Definition: rbprm-device.hh:43