|
Hormodular 1.0
Locomotion gait discovery by using digital hormones on modular robots
|
Interface to the modular robot via serial port. More...
#include <SerialModularRobotInterface.hpp>


Public Member Functions | |
| SerialModularRobotInterface (ConfigParser configParser) | |
| virtual bool | start () |
| Connects with the modular robot using the serial port. | |
| virtual bool | stop () |
| Stops the communication with the modular robot, closing the serial port. | |
| virtual bool | destroy () |
| Stops the communication with the modular robot, closing the serial port and frees all the dynamically allocated memory. | |
| virtual bool | reset () |
| Resets the communication with the modular robot, closing the serial port and connecting again to the robot. | |
| virtual bool | setProperty (std::string property, std::string value) |
| Configure a property or parameter of the interface. | |
| virtual float | getTravelledDistance () |
| Returns the distance travelled my the modular robot in meters. | |
| virtual bool | sendJointValues (std::vector< float > joint_values, float step_ms=0) |
| Sends the specified joint position values to the modular robot through the serial connection. | |
| virtual std::vector< float > | getJointValues () |
| Returns the joint position values stored in this class. | |
Private Member Functions | |
| bool | initSerialPort () |
| Configures and opens the serial port. | |
| bool | checkConnection () |
| Checks that the modular robot is connected by checking the initial message from the robot. | |
| bool | toggleLED () |
| Sends the commands required for toggling the user LED on the robot board. | |
| bool | sendJointValuesSerial (std::vector< float > joint_values) |
| Sends the commands required for setting the joint position values on the modular robots. | |
Private Attributes | |
| std::string | port_name |
| SerialPort * | serialPort |
| int | step_ms |
| int | num_modules |
| std::vector< float > | joint_values |
Interface to the modular robot via serial port.
1.7.4