|
bitsim
Model, simulate, estimate and control robots in C++
|
A microcontroller board that drives one or more DC motors. The application sets a target speed per motor, and the board runs the motors and reports back what its encoders measure. One board usually drives several motors over a single connection, so the motors share it. More...
#include <dc_motor_board_base.h>

Public Member Functions | |
| virtual | ~DCMotorBoardBase ()=default |
| virtual void | connect ()=0 |
| Connect to the board. | |
| virtual uint_t | n_motors () const noexcept=0 |
| virtual void | set_target_speed (uint_t channel, real_t speed)=0 |
| Set the target speed of the output shaft of a motor [rad/s]. | |
| virtual void | update ()=0 |
| Exchange messages with the board: send the targets when it is time and read what has arrived. Cheap, so it is safe to call it often. | |
| virtual std::optional< MotorChannelState > | motor_state (uint_t channel) const =0 |
| virtual bool | is_alive () const =0 |
Protected Member Functions | |
| DCMotorBoardBase ()=default | |
A microcontroller board that drives one or more DC motors. The application sets a target speed per motor, and the board runs the motors and reports back what its encoders measure. One board usually drives several motors over a single connection, so the motors share it.
|
virtualdefault |
|
protecteddefault |
|
pure virtual |
Connect to the board.
Implemented in bitsim::boards::arduino::DCArduinoBoardImpl, and real_dc_motors::DCArduinoBoardImpl.
|
pure virtual |
Implemented in bitsim::boards::arduino::DCArduinoBoardImpl, and real_dc_motors::DCArduinoBoardImpl.
|
pure virtual |
Implemented in bitsim::boards::arduino::DCArduinoBoardImpl, and real_dc_motors::DCArduinoBoardImpl.
|
pure virtualnoexcept |
Implemented in bitsim::boards::arduino::DCArduinoBoardImpl, and real_dc_motors::DCArduinoBoardImpl.
|
pure virtual |
Set the target speed of the output shaft of a motor [rad/s].
Implemented in bitsim::boards::arduino::DCArduinoBoardImpl, and real_dc_motors::DCArduinoBoardImpl.
|
pure virtual |
Exchange messages with the board: send the targets when it is time and read what has arrived. Cheap, so it is safe to call it often.
Implemented in bitsim::boards::arduino::DCArduinoBoardImpl, and real_dc_motors::DCArduinoBoardImpl.