|
Hormodular 1.0
Locomotion gait discovery by using digital hormones on modular robots
|
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")
{
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;
}
}
|
1.7.4