|
Hormodular 1.0
Locomotion gait discovery by using digital hormones on modular robots
|
Configures and opens the serial port. {
serialPort = new SerialPort( port_name );
try
{
serialPort->Open( SerialPort::BAUD_57600, SerialPort::CHAR_SIZE_8,
SerialPort::PARITY_NONE, SerialPort::STOP_BITS_1,
SerialPort::FLOW_CONTROL_NONE );
}
catch ( SerialPort::OpenFailed e )
{
std::cerr << "[SerialModularRobotInterface] Error opening the serial port"
<< port_name << std::endl;
return false;
}
if ( ! checkConnection() )
{
std::cerr << "Error communicating with the robot. Exiting...\n"
<< port_name << std::endl;
return false;
}
return true;
}
|
1.7.4