@@ -304,6 +304,19 @@ increment( const double & dt )
304
304
integrate ( dt );
305
305
sotDEBUG (25 ) << " q" << time << " = " << state_ << endl;
306
306
307
+ /* Position the signals corresponding to sensors. */
308
+ stateSOUT .setConstant ( state_ ); stateSOUT.setTime ( time+1 );
309
+ if ( secondOrderIntegration_ )
310
+ {
311
+ velocitySOUT.setConstant ( velocity_ );
312
+ velocitySOUT.setTime ( time+1 );
313
+ }
314
+ for ( int i=0 ;i<4 ;++i ){
315
+ if ( !withForceSignals[i] ) forcesSOUT[i]->setConstant (forceZero6);
316
+ }
317
+ ml::Vector zmp (3 ); zmp.fill ( .0 );
318
+ ZMPPreviousControllerSOUT .setConstant ( zmp );
319
+
307
320
// Run Synchronous commands and evaluate signals outside the main
308
321
// connected component of the graph.
309
322
try
@@ -329,18 +342,6 @@ increment( const double & dt )
329
342
<< " running periodical commands (after)" << std::endl;
330
343
}
331
344
332
- /* Position the signals corresponding to sensors. */
333
- stateSOUT .setConstant ( state_ ); stateSOUT.setTime ( time+1 );
334
- if ( secondOrderIntegration_ )
335
- {
336
- velocitySOUT.setConstant ( velocity_ );
337
- velocitySOUT.setTime ( time+1 );
338
- }
339
- for ( int i=0 ;i<4 ;++i ){
340
- if ( !withForceSignals[i] ) forcesSOUT[i]->setConstant (forceZero6);
341
- }
342
- ml::Vector zmp (3 ); zmp.fill ( .0 );
343
- ZMPPreviousControllerSOUT .setConstant ( zmp );
344
345
345
346
// Others signals.
346
347
motorcontrolSOUT .setConstant ( state_ );
0 commit comments