Hormodular 1.0
Locomotion gait discovery by using digital hormones on modular robots
bool hormodular::SimulatedModularRobotInterface::sendJointValues ( std::vector< float >  joint_values,
float  step_ms = 0 
) [virtual]

Sends the specified joint position values to the simulated modular robot servocontroller.

Implements hormodular::ModularRobotInterface.

{
    if (!controller)
    {
        std::cerr << "[SimModRobInterface][Error] Could not access the controller." << std::endl;
        return false;
    }

    //-- Send joint values to openRAVE:
    std::stringstream is, os;
    is << "setpos ";

    for (int i = 0; i < (int) joint_values.size(); i++)
        is << joint_values[i] << " ";

    //std::cout << "[Debug] Joint values sent:" << is.str() << std::endl;
    if (!controller->SendCommand(os,is) )
        return false;

    if ( step_ms > 0)
            simulation->step(step_ms / 1000);


    return true;
}
 All Classes Functions Variables Friends