|
Hormodular 1.0
Locomotion gait discovery by using digital hormones on modular robots
|
Returns the actual joint position values of the simulated modular robot. Implements hormodular::ModularRobotInterface. {
if (!controller)
{
std::cerr << "[SimModRobInterface][Error] Could not access the controller." << std::endl;
return std::vector<float>();
}
//-- Send request to get the joint values:
std::stringstream is, os;
is << "getpos";
controller->SendCommand(os,is);
//-- Read the returned values:
std::vector<float> joint_values;
float aux;
while( os.good() )
{
os >> aux;
joint_values.push_back(aux);
}
return joint_values;
}
|
1.7.4