GCC Code Coverage Report


Directory: ./
File: include/sot/core/feature-joint-limits.hh
Date: 2024-11-13 12:35:17
Exec Total Coverage
Lines: 0 3 0.0%
Branches: 0 6 0.0%

Line Branch Exec Source
1 /*
2 * Copyright 2010,
3 * François Bleibel,
4 * Olivier Stasse,
5 *
6 * CNRS/AIST
7 *
8 */
9
10 #ifndef __SOT_FEATURE_JOINTLIMITS_HH__
11 #define __SOT_FEATURE_JOINTLIMITS_HH__
12
13 /* --------------------------------------------------------------------- */
14 /* --- INCLUDE --------------------------------------------------------- */
15 /* --------------------------------------------------------------------- */
16
17 /* SOT */
18 #include <sot/core/exception-task.hh>
19 #include <sot/core/feature-abstract.hh>
20
21 /* --------------------------------------------------------------------- */
22 /* --- API ------------------------------------------------------------- */
23 /* --------------------------------------------------------------------- */
24
25 #if defined(WIN32)
26 #if defined(feature_joint_limits_EXPORTS)
27 #define SOTFEATUREJOINTLIMITS_EXPORT __declspec(dllexport)
28 #else
29 #define SOTFEATUREJOINTLIMITS_EXPORT __declspec(dllimport)
30 #endif
31 #else
32 #define SOTFEATUREJOINTLIMITS_EXPORT
33 #endif
34
35 /* --------------------------------------------------------------------- */
36 /* --- CLASS ----------------------------------------------------------- */
37 /* --------------------------------------------------------------------- */
38
39 namespace dynamicgraph {
40 namespace sot {
41
42 /*!
43 \class FeatureJointLimits
44 \brief Class that defines gradient vector for jl avoidance.
45 */
46 class SOTFEATUREJOINTLIMITS_EXPORT FeatureJointLimits
47 : public FeatureAbstract,
48 FeatureReferenceHelper<FeatureJointLimits> {
49 public:
50 static const std::string CLASS_NAME;
51 virtual const std::string &getClassName(void) const { return CLASS_NAME; }
52
53 protected:
54 double threshold;
55 const static double THRESHOLD_DEFAULT; // = .9;
56
57 /* unsigned int freeFloatingIndex,freeFloatingSize; */
58 /* static const unsigned int FREE_FLOATING_INDEX = 0; */
59 /* static const unsigned int FREE_FLOATING_SIZE = 5; */
60
61 /* --- SIGNALS ------------------------------------------------------------ */
62 public:
63 dynamicgraph::SignalPtr<dynamicgraph::Vector, int> jointSIN;
64 dynamicgraph::SignalPtr<dynamicgraph::Vector, int> upperJlSIN;
65 dynamicgraph::SignalPtr<dynamicgraph::Vector, int> lowerJlSIN;
66 dynamicgraph::SignalTimeDependent<dynamicgraph::Vector, int> widthJlSINTERN;
67
68 using FeatureAbstract::selectionSIN;
69
70 using FeatureAbstract::errorSOUT;
71 using FeatureAbstract::jacobianSOUT;
72
73 /*! \name Dealing with the reference value to be reach with this feature.
74 @{
75 */
76 DECLARE_REFERENCE_FUNCTIONS(FeatureJointLimits);
77 /*! @} */
78
79 public:
80 FeatureJointLimits(const std::string &name);
81 virtual ~FeatureJointLimits(void) {}
82
83 virtual unsigned int &getDimension(unsigned int &dim, int time);
84
85 virtual dynamicgraph::Vector &computeError(dynamicgraph::Vector &res,
86 int time);
87 virtual dynamicgraph::Matrix &computeJacobian(dynamicgraph::Matrix &res,
88 int time);
89 dynamicgraph::Vector &computeWidthJl(dynamicgraph::Vector &res,
90 const int &time);
91
92 /** Static Feature selection. */
93 inline static Flags selectActuated(void);
94
95 virtual void display(std::ostream &os) const;
96 };
97
98 } /* namespace sot */
99 } /* namespace dynamicgraph */
100
101 #endif // #ifndef __SOT_FEATURE_JOINTLIMITS_HH__
102
103 /*
104 * Local variables:
105 * c-basic-offset: 2
106 * End:
107 */
108