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

Sends the specified joint position values to the modular robot through the serial connection.

Implements hormodular::ModularRobotInterface.

{
    //-- Check number of input values:
    if (joint_values.size() != num_modules)
    {
        std::cerr << "[SerialModRobInteface] Error: input joint values size differs with number of modules in robot"
                     << std::endl;
        return false;
    }

    //-- Save joint values
    for (int i = 0; i < num_modules; i++)
        this->joint_values[i] = joint_values[i];

    //-- Send actual values:
    bool result = sendJointValuesSerial(joint_values);
    usleep(step_ms * 1000);

    return result;
}
 All Classes Functions Variables Friends