Example #1
0
MyRobot::MyRobot() : DifferentialWheels()
{
    _time_step = 64;

    enableEncoders(_time_step);

    _mode = FORWARD;
    _distance = 0;
}
MyRobot::MyRobot() : DifferentialWheels()
{
    _time_step = 64;
    //Enable the encoders
    enableEncoders(_time_step);
    //set the initial wheels speed
    _left_speed = 100;
    _right_speed = 100;
    //ser the initial distance and flag
    _distance = 0;
    flag = 1;
}
MyRobot::MyRobot() : DifferentialWheels()
{
    _time_step = 64;

    _left_speed = 0;
    _right_speed = 0;

    // Get and enable the compass device
    _my_compass = getCompass("compass");
    _my_compass -> enable(_time_step);

    // Eneable and get encoders
    enableEncoders(_time_step);
    _left_encoder = getLeftEncoder();
    _right_encoder = getRightEncoder();
}
MyRobot::MyRobot() : DifferentialWheels()
{
    _time_step = 64;

    //Inital values for desired distance
    desired_distance=17;

    //Enable encoders
    enableEncoders(_time_step);

    //Initial values for speeds
    _left_speed = 0;
    _right_speed = 0;

    //Initial value for the distance
    _distance = 0;
}
MyRobot::MyRobot() : DifferentialWheels()
{
    _time_step = 64;

    _left_speed = 0;
    _right_speed = 0;

    // Get and enable the compass device
    _my_compass = getCompass("compass");
    _my_compass->enable(_time_step);
    // Initialize _posicion_final and _Radio.
    _posicion_final = 0.0;
    _Radio = 0.0825;

    enableEncoders(_time_step);



}