Hormodular 1.0
Locomotion gait discovery by using digital hormones on modular robots
std::vector< float > hormodular::GaitTable::getParameters ( int  id)

Returns the value of all the parameters for a given ID.

Returns:
The value of all the parameters for a given ID. If the ID was not found, returns a vector of zeroes with the correct dimensions (and shows an error message).
{
    int tableRow = lookForID(id);

    if ( tableRow == -1)
    {
        std::cerr << "[GaitTable] Error: ID "<< id <<" not found on gait table." << std::endl;
        std::vector<float> vector_of_zeroes;

        for (int i = 0; i < num_parameters; i++)
            vector_of_zeroes.push_back(0);

        return vector_of_zeroes;
    }

    return data[tableRow];
}
 All Classes Functions Variables Friends