An abstract motor class.
More...
#include <base_motor.h>
|
void | constructVelController () |
| Constructs a Jacobian Vel Controller.
|
|
void | unscheduleVelocityEvent () |
| Unschedules the velocity event if it exists.
|
|
◆ base_motor() [1/2]
Constructor for base motor.
- Parameters
-
motor | The motor id to manipulate. |
hasPosSensor | Boolean to indicate if the motor has a position sensor. |
◆ base_motor() [2/2]
robot::base_motor::base_motor |
( |
const base_motor & | | ) |
|
|
delete |
Delete the copy constructor.
- Parameters
-
◆ getMotorPos()
Get the last reported position of the specified motor.
- Returns
- types::DataPoint<int32_t> The last reported position of the motor, if it exists. If the motor has not reported a position (because it hasn't been received yet or if it doesn't have an encoder) then an empty data point is returned.
Implemented in robot::can_motor, and robot::sim_motor.
◆ hasPositionSensor()
bool robot::base_motor::hasPositionSensor |
( |
| ) |
const |
Returns the status of the motor position sensor.
- Returns
- True if the motor has a position sensor and false if not
◆ operator=()
Delete the copy operator.
- Parameters
-
◆ setMotorPos()
virtual void robot::base_motor::setMotorPos |
( |
int32_t | targetPos | ) |
|
|
pure virtual |
Set the target position of the motor.
This will have no effect if the motor does not support PID.
- Parameters
-
targetPos | The target position, in millidegrees. Refer to the specific motor for more information. |
Implemented in robot::can_motor, and robot::sim_motor.
◆ setMotorPower()
virtual void robot::base_motor::setMotorPower |
( |
double | power | ) |
|
|
pure virtual |
◆ setMotorVel()
void robot::base_motor::setMotorVel |
( |
int32_t | targetVel | ) |
|
|
virtual |
Sets the velocity of the motor.
- Parameters
-
targetVel | The target velocity, in millidegrees per second. |
Reimplemented in robot::can_motor.
The documentation for this class was generated from the following files:
- src/world_interface/motor/base_motor.h
- src/world_interface/motor/base_motor.cpp