Go to the documentation of this file.
75 uint8_t end_value = 0);
79 double min_target_pos,
80 double max_target_pos);
334 const Options&
options()
const;
342 const std::string&
fault()
const;
366 void set_spring(
double neutral_position,
double stiffness,
double damping);
431 struct OpaqueStateCommands;
432 std::unique_ptr<OpaqueStateCommands>
sta_cmd_;
435 struct InternalParameters;
437 struct ConversionRatios;
virtual bool velocity_mode_queried() const override
virtual bool profile_mode() const override
void manage_control_period(const std::optional< Options > &options)
@ profile_output_position_vibration_damping
bool following_error() const
In profile modes tell whether there is a following error.
void set_target_output_torque(double target_torque)
Function used to set the target torque on output shaft when device is command in output or basic torq...
Options & inertia(double output)
double motor_temperature() const
Get actual motor temperature in degrees celsius (°C).
Options & position_reached(double window, double time)
double velocity_window_time
Definition: sensojoint.h:54
bool sto_active() const
Check whether STO(Safe torque off) security has been triggerred.
Options & profile(double velocity, double accel=0., double decel=0.)
static control_mode_t control_code_to_mode(int8_t)
double velocity_window
Definition: sensojoint.h:53
Definition: sensojoint.h:31
void manage_digital_ios(const std::optional< Options > &options)
double position
Definition: sensojoint.h:34
void set_digital_outputs(uint8_t outputs)
Set value of digital outputs.
CIA402Device::state_t operation_state_t
Definition: sensojoint.h:116
static bool can_swap_mode(control_mode_t current, control_mode_t next)
void unpack_status_buffer()
double max_motor_velocity
Definition: sensojoint.h:44
virtual bool cyclic_mode_queried() const override
SensoJoint & operator=(const SensoJoint &)=delete
void initialize(const std::optional< Options > &options)
void set_motor_torque_feedforward(double torque_offset)
Function used to set the motor torque offset.
Options & torque_profile(double slope)
static SensoJoint::Options gen_options(double control_period, double min_target_pos, double max_target_pos)
bool brake_applied() const
Tell whether Sensojoint brake is applied.
const Options & options() const
Get options used in the Sensojoint.
void manage_max_output_velocity()
void manage_torque_offset(const std::optional< Options > &options)
virtual bool position_mode_queried() const override
double torque_slope
Definition: sensojoint.h:55
@ MODEL_3010
Definition: sensojoint.h:118
void force_target_output_torque(double target_torque)
Definition: sensojoint.h:37
uint8_t controlled_digital_outputs
Definition: sensojoint.h:59
static bool is_advanced_mode(control_mode_t)
static bool advanced_mode(int8_t)
@ gpio_3_io_fpp_pin
Definition: sensojoint.h:374
double zero_pos_offset
Definition: sensojoint.h:41
static bool is_torque_mode(control_mode_t)
double zero_torque_offset
Definition: sensojoint.h:42
virtual bool torque_mode() const override
void manage_user_max_motor_velocity(const std::optional< Options > &options)
virtual bool velocity_mode() const override
uint8_t digital_inputs() const
Get value of digital inputs.
static bool is_profile_mode(control_mode_t)
double initial_adjusted_position
Definition: sensojoint.h:39
double stiffness
Definition: sensojoint.h:32
void manage_digital_ios_end()
void set_spring(double neutral_position, double stiffness, double damping)
Set value of spring haptics effect parameters in advanced torque controller.
A container of static functions and types used to ease implementation of CiA 402 devices.
Definition: cia402_device.h:55
virtual bool position_mode() const override
void force_target_motor_torque(double target_torque)
double position_window
Definition: sensojoint.h:49
double min_target_position
Definition: sensojoint.h:40
static bool is_position_mode(control_mode_t)
Options & controlled_outputs(uint8_t outputs, uint8_t init_value=0, uint8_t end_value=0)
Options & standstill(double threshold=0.001, double time=0.001)
double profile_deceleration
Definition: sensojoint.h:48
double control_period_
Definition: sensojoint.h:38
Options & velocity_reached(double window, double time)
void manage_profile_config(const std::optional< Options > &options)
void manage_user_max_motor_torque(const std::optional< Options > &options)
void manage_ctrl_params(const std::optional< Options > &options)
double friction_torque() const
Get actual friction torque in newton meter (Nm).
void pdo_maps_configuration()
Model model_
Definition: sensojoint.h:429
double profile_acceleration
Definition: sensojoint.h:47
void update_internal_state()
static bool is_cyclic_mode(control_mode_t)
void set_target_position(double target_position)
Function used to set the target position when device is command in position mode.
@ profile_output_velocity
uint8_t digital_outputs_end_value
Definition: sensojoint.h:61
SensoJoint(const Model &model)
Constructor of SensoJoint class.
double position_window_time
Definition: sensojoint.h:50
void manage_position_offset(const std::optional< Options > &options)
IOFlag
Flag to ease setting the controlled/read GPIOS.
Definition: sensojoint.h:373
double profile_velocity
Definition: sensojoint.h:46
@ MODEL_7016
Definition: sensojoint.h:118
double velocity_threshold
Definition: sensojoint.h:51
void set_velocity_feedforward(double velocity_offset)
Function used to set the velocity offset.
double velocity() const
Get actual motor velocity in radians per second.
This class describe the EtherCAT driver for Sensodrive sensojoint actuator. It allows to communicate ...
Definition: sensojoint.h:29
void manage_user_position_limits(const std::optional< Options > &options)
bool set_control_mode(control_mode_t control_mode)
Select the desired control mode.
void set_target_motor_torque(double target_torque)
Function used to set the target motor torque when device is command in basic torque mode.
@ MODEL_4010
Definition: sensojoint.h:118
Options & read_inputs(uint8_t inputs)
std::string_view control_mode_str() const
Get current control mode used inside device as a string.
Options options_
Definition: sensojoint.h:428
std::unique_ptr< ConversionRatios > conversion_
Definition: sensojoint.h:437
static int8_t control_mode_to_code(control_mode_t)
double offset
Definition: sensojoint.h:35
virtual bool torque_mode_queried() const override
double initial_position() const
Get the theoric initial position from drive configuration.
std::unique_ptr< InternalParameters > internal_parameters_
Definition: sensojoint.h:435
bool warning() const
check if a warning is currently emitted.
@ cyclic_output_position_vibration_damping
double motor_current() const
Get actual motor current in A.
void set_external_load_torque_offset(double offset)
Set value of external load torque offset (gravity)
void manage_torque_slope(const std::optional< Options > &options)
const std::string & fault() const
Get last fault description.
void set_target_velocity(double target_velocity)
Function used to set the target velocity when device is command in velocity mode.
bool enable_haptics
Definition: sensojoint.h:57
void manage_max_motor_current()
void set_output_torque_feedforward(double torque_offset)
Function used to set the output torque offset.
std::unique_ptr< OpaqueStateCommands > sta_cmd_
Definition: sensojoint.h:431
double output_torque() const
Get actual output torque in newton meter (Nm).
void manage_max_motor_torque()
double max_motor_torque
Definition: sensojoint.h:43
static const std::map< int8_t, std::string_view > control_mode_decode_
Definition: sensojoint.h:434
control_mode_t control_mode() const
Get current control mode used inside device.
Main header file for ethercatcpp-core.
@ gpio_4_out_pin
Definition: sensojoint.h:375
uint8_t read_digital_inputs
Definition: sensojoint.h:62
void read_base_units_values()
double position() const
Get actual motor position in radians.
control_mode_t
This enum define the possible "control modes" of the actuator.
Definition: sensojoint.h:83
void manage_max_motor_velocity()
uint16_t error_code() const
Get last error code.
void manage_endstop_config(const std::optional< Options > &options)
Options & endstops(double stiffness, double damping)
double damping
Definition: sensojoint.h:33
void find_initial_position()
double max_target_position
Definition: sensojoint.h:40
static bool is_velocity_mode(control_mode_t)
bool sbc_active() const
Check whether SBC(Safe braque control) security has been triggerred.
@ gpio_5_io_sbo_pin
Definition: sensojoint.h:376
double velocity_threshold_time
Definition: sensojoint.h:52
double drive_temperature() const
Get actual drive temperature in degrees celsius (°C).
virtual bool cyclic_mode() const override
double output_inertia
Definition: sensojoint.h:45
EndStop endstop_specs
Definition: sensojoint.h:56
double motor_torque() const
Get actual motor torque in newton meter.
uint8_t digital_outputs_init_value
Definition: sensojoint.h:60
Options & max(double motor_torque, double motor_vel)
double sensor_temperature() const
Get actual torque sensor temperature in degrees celsius (°C).
@ MODEL_5016
Definition: sensojoint.h:118
void manage_max_output_torque()
Model
Definition: sensojoint.h:118
@ gpio_6_io_sbo_pin
Definition: sensojoint.h:377
bool standstill() const
In profile velocity modes tell whether the motor is standstill.
void manage_quickstop_config(const std::optional< Options > &options)
Options & offsets(double pos_offset, double torque_offset)
static std::string_view control_mode_to_str(control_mode_t)
convert the operation state into a human readable information
virtual bool profile_mode_queried() const override
void manage_torque_based_quick_stop()