14 typedef std::shared_ptr<blmc_drivers::SafeMotor>
SafeMotor_ptr;
35 for(
unsigned int i=0 ; i<motor_list.size() ; ++i)
37 encoders_.push_back(std::deque<double>());
38 currents_.push_back(std::deque<double>());
86 static THREAD_FUNCTION_RETURN_TYPE
loop(
void* instance_pointer)
89 return THREAD_FUNCTION_RETURN_VALUE;
std::vector< std::deque< double > > encoders_
Encoder data.
Definition: sine_torque_control.hpp:114
real_time_tools::RealTimeThread rt_thread_
This is the real time thread object.
Definition: sine_torque_control.hpp:80
This namespace is the standard namespace of the package.
Definition: const_torque_control.cpp:12
std::vector< std::deque< double > > control_buffer_
control_buffer_
Definition: sine_torque_control.hpp:129
~SineTorqueControl()
Destroy the SineTorqueControl object.
Definition: sine_torque_control.hpp:52
void start_loop()
This method is a helper to start the thread loop.
Definition: sine_torque_control.hpp:61
std::vector< std::deque< double > > velocities_
Velocity data.
Definition: sine_torque_control.hpp:119
void stop_loop()
Stop the control and dump the data.
Definition: sine_torque_control.cpp:76
std::vector< SafeMotor_ptr > motor_list_
This is list of motors.
Definition: sine_torque_control.hpp:76
std::vector< std::deque< double > > currents_
current data
Definition: sine_torque_control.hpp:124
static THREAD_FUNCTION_RETURN_TYPE loop(void *instance_pointer)
this function is just a wrapper around the actual loop function, such that it can be spawned as a pos...
Definition: sine_torque_control.hpp:86
This is a basic PD controller to be used in the demos of this package.
Definition: sine_torque_control.hpp:19
SineTorqueControl(std::vector< SafeMotor_ptr > motor_list)
Construct a new SineTorqueControl object.
Definition: sine_torque_control.hpp:27
unsigned memory_buffer_size_
memory_buffer_size_ is the max size of the memory buffer.
Definition: sine_torque_control.hpp:109
void loop()
this is a simple control loop which runs at a kilohertz.
Definition: sine_torque_control.cpp:13
bool stop_loop_
managing the stopping of the loop
Definition: sine_torque_control.hpp:104
std::shared_ptr< blmc_drivers::SafeMotor > SafeMotor_ptr
This is a simple shortcut.
Definition: const_torque_control.hpp:15