Ejemplo n.º 1
0
/*! @brief Returns true if the trial path has been completed */
bool EvaluateWalkParametersState::allPointsReached()
{
    if (not pointReached())
        return false;
    else
    {
        if (m_current_point_index == m_way_points.size()-1)
            return true;
        else
            return false;
    }
}
Ejemplo n.º 2
0
void paint::printCoordinates() {
    std::ofstream fout ("points.txt");
    fout << useful_points_count << std::endl;
    for (int pos = 0; pos < useful_points_count; pos++) {
        fout << points[pos].x << ' ' << points[pos].y << std::endl;
    }
    fout.close();
    emit pointReached(0, points);

    action(this);

    for (int pos = 0; pos < useful_points_count; pos++) {
         ui->plainTextEdit->appendPlainText(QString::number(pos) + ' ' + QString::number(points[pos].x) + ',' + QString::number(points[pos].y));
    }
}
Ejemplo n.º 3
0
/*! @brief Do the state behaviour */
void EvaluateWalkParametersState::doState()
{
    #if DEBUG_BEHAVIOUR_VERBOSITY > 3
        debug << "EvaluateWalkParametersState::doState() target: " << m_current_target_state << endl;
    #endif
    if (m_parent->stateChanged())
        start();
    else
    	tick();

    lookAtGoals();

    if (pointReached())
        m_current_target_state = getNextPoint();

    vector<float> speed = BehaviourPotentials::goToFieldState(m_field_objects->self, m_current_target_state, 0, 20, 5000);
    m_jobs->addMotionJob(new WalkJob(speed[0], speed[1], speed[2]));
}
Ejemplo n.º 4
0
void paint::pointReachEvent(int pos) {
    emit pointReached(pos, points);
}