File tree 2 files changed +19
-1
lines changed
2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -79,9 +79,11 @@ namespace dynamicgraph {
79
79
virtual dg::Vector& computeError ( dg::Vector& res, int );
80
80
virtual dg::Matrix& computeJacobian ( dg::Matrix& res, int );
81
81
virtual dg::Vector& computeActivation ( dg::Vector& res, int );
82
+ virtual dg::Vector& computeErrorDot (dg::Vector& res,int time);
82
83
83
84
signalIn_t state_;
84
85
signalIn_t posture_;
86
+ signalIn_t postureDot_;
85
87
signalOut_t error_;
86
88
dg::Matrix jacobian_;
87
89
private:
Original file line number Diff line number Diff line change @@ -53,11 +53,12 @@ namespace dynamicgraph {
53
53
: FeatureAbstract(name),
54
54
state_ (NULL , " FeaturePosture(" +name+" )::input(Vector)::state" ),
55
55
posture_(0 , " FeaturePosture(" +name+" )::input(Vector)::posture" ),
56
+ postureDot_(0 , " FeaturePosture(" +name+" )::input(Vector)::postureDot" ),
56
57
jacobian_(),
57
58
activeDofs_ (),
58
59
nbActiveDofs_ (0 )
59
60
{
60
- signalRegistration (state_ << posture_);
61
+ signalRegistration (state_ << posture_ << postureDot_ );
61
62
62
63
errorSOUT.addDependency (state_);
63
64
@@ -116,6 +117,21 @@ namespace dynamicgraph {
116
117
return res;
117
118
}
118
119
120
+ dg::Vector& FeaturePosture::computeErrorDot ( dg::Vector& res, int t)
121
+ {
122
+ const Vector& postureDot = postureDot_.access (t);
123
+
124
+ res.resize (nbActiveDofs_);
125
+ std::size_t index =0 ;
126
+ for (std::size_t i=0 ; i<activeDofs_.size (); ++i) {
127
+ if (activeDofs_ [i]) {
128
+ res (index ) = postureDot (i);
129
+ index ++;
130
+ }
131
+ }
132
+ return res;
133
+ }
134
+
119
135
void
120
136
FeaturePosture::selectDof (unsigned dofId, bool control)
121
137
{
You can’t perform that action at this time.
0 commit comments