54 err_type_t _home(
float velocity, u_int8_t sensitivity, u_int8_t current);
60 std::chrono::_V2::system_clock::time_point
last_set_position = std::chrono::high_resolution_clock::now();
71 float getDeltaT(std::chrono::_V2::system_clock::time_point &last_call,
bool update =
true);
Generic base class to control a single joint.
Definition mBaseJoint.h:27
std::string name
Joint name for logging.
Definition mBaseJoint.h:352
stp_reg_t
register and command definitions
Definition mBaseJoint.h:39
@ NONE
Used for signalling purposes.
Definition mBaseJoint.h:40
Representing a single joint mocking the hardware joint.
Definition mMockJoint.h:29
err_type_t setPosition(float pos) override
get the current joint position in radians or m for cylindrical and prismatic joints respectively.
Definition mMockJoint.cpp:44
float q
position
Definition mMockJoint.h:57
float getDeltaT(std::chrono::_V2::system_clock::time_point &last_call, bool update=true)
Compute the time since the given time point.
Definition mMockJoint.cpp:109
std::chrono::_V2::system_clock::time_point async_start_time
Definition mMockJoint.h:62
err_type_t enable(u_int8_t driveCurrent, u_int8_t holdCurrent) override
Engages the joint.
Definition mMockJoint.cpp:10
err_type_t _home(float velocity, u_int8_t sensitivity, u_int8_t current)
Call to start the homing sequence of a joint.
Definition mMockJoint.cpp:82
err_type_t getVelocity(float &vel) override
get the current joint velocity in radians/s or m/s for cylindrical and prismatic joints respectively.
Definition mMockJoint.cpp:54
err_type_t setVelocity(float vel) override
Set the current joint velocity in radians/s or m/s for cylindrical and prismatic joints respectively.
Definition mMockJoint.cpp:60
err_type_t getPosition(float &pos) override
get the current joint position in radians or m for cylindrical and prismatic joints respectively.
Definition mMockJoint.cpp:24
bool isHomed(void) override
Checks the state if the motor is homed.
Definition mMockJoint.cpp:95
std::chrono::_V2::system_clock::time_point last_set_position
Definition mMockJoint.h:60
err_type_t checkOrientation(float angle=2.0) override
Calls the checkOrientation method of the motor. Checks in which direction the motor is turning.
Definition mMockJoint.cpp:70
float qd
velocity
Definition mMockJoint.h:58
stp_reg_t op_mode
Definition mMockJoint.h:73
err_type_t disable(void) override
disenganges the joint
Definition mMockJoint.cpp:17
err_type_t stop(void) override
Stops the motor.
Definition mMockJoint.cpp:76
err_type_t getFlags(void) override
Overload of getFlags(u_int8_t &flags)
Definition mMockJoint.cpp:90
std::chrono::_V2::system_clock::time_point last_set_velocity
Definition mMockJoint.h:61
File including the BaseJoint class.
Definition mBaseJoint.h:19
err_type_t
Enum defining common error types.
Definition uErr.h:23