//----------------------------------------------------------------------------- void CCBRobot::quit() { if ( mCBDrivetrain ) mCBDrivetrain->stop(); mCBDriver->setSpeed(CVelocity2d(0,0,0)); mFgRunning = false; }
//----------------------------------------------------------------------------- CStageDrivetrain2dof::CStageDrivetrain2dof ( Stg::ModelPosition* stgModel, std::string devName ) : ADrivetrain2dof ( devName ) { assert ( stgModel ); mStgPosition = stgModel; mFgEnabled = false; mStgPosition->GetWorld()->AddUpdateCallback ( ( Stg::stg_world_callback_t ) positionUpdate, this ); mOdometry = new CStageOdometry ( mStgPosition, devName + ":odometry" ); assert ( mOdometry ); // velocity limits mUpperVelocityLimit = CVelocity2d( 1.0, 0.0, D2R(60.0) ); mLowerVelocityLimit = CVelocity2d(-1.0, 0.0, -D2R(60.0) ); // acceleration limits mTransAccelLimit.setLimit(-1.0, 1.0); mRotatAccelLimit.setLimit(-D2R(30.0), D2R(30.0)); setEnabled ( true ); }