Hormodular 1.0
Locomotion gait discovery by using digital hormones on modular robots
bool hormodular::Module::attach ( int  localConnector,
Connector *  remoteConnector,
int  orientation = -1 
)

Connects a connector from this module to other connector from other module.

Parameters:
localConnectorIdentifier of the connector from this module (0 for front, 1 for right, 2 for back and 3 for left)
remoteConnectorRemote connector to be connected to this module connector
orientationOrientation between both connectors (no longer being used, replaced by Orientation class)
Returns:
True if completed successfully, false otherwise

Todo:
I should not take the orientation from the config file happily
Todo:
I think this is already solved by using the Orientation class (no longer neeeded)

{
    if (localConnector < 0 || localConnector >= (int) connectors.size())
    {
        std::cerr << "[Module] Error: could not attach to connector: " << localConnector << std::endl;
        return false;
    }

    connectors[localConnector]->connectTo(remoteConnector);

    connectors[localConnector]->setLocalOrientation(orientation);

    return true;
}
 All Classes Functions Variables Friends