Hormodular 1.0
Locomotion gait discovery by using digital hormones on modular robots
hormodular::Orientation::Orientation ( std::string  serialized_orientation)

Creates an Orientation object from a space-separated string containing the serialized data.

The string format is the following: "roll pitch yaw" (i.e. "90 180 270")

Parameters:
serialized_orientationSpace-separated string containing the roll, pitch and yaw.
{
    std::vector<std::string> components = splitString(serialized_orientation);

    if (components.size() == 3)
    {
        roll = angle0to360( atoi( components[0].c_str() ) );
        pitch= angle0to360( atoi( components[1].c_str() ) );
        yaw =  angle0to360( atoi( components[2].c_str() ) );
    }
    else
    {
        std::cerr << "[Orientation] Error: bad string!" << std::endl;
        roll = 0; pitch = 0; yaw = 0;
    }
}
 All Classes Functions Variables Friends