sr_actuator.hpp
Go to the documentation of this file.
1 
27 #ifndef _SR_ACTUATOR_HPP_
28 #define _SR_ACTUATOR_HPP_
29 
31 #include <ros_ethercat_model/hardware_interface.hpp>
32 
33 #include <utility>
34 #include <string>
35 #include <vector>
36 
37 namespace sr_actuator
38 {
40 {
41 public:
49  serial_number_low_set(false),
53  serial_number(0),
57  tests_(0),
59  {
60  }
61 
62  // Serial number is composed of a low and a high byte.
63  void set_serial_number_low(unsigned int serial)
64  {
65  serial_number_low = serial;
66  serial_number_low_set = true;
67 
69  {
70  // we received both bytes
72  }
73  };
74 
75  void set_serial_number_high(unsigned int serial)
76  {
77  serial_number_high = serial;
79 
81  {
82  // we received both bytes
84  }
85  };
86 
88  {
90  };
91 
92  double position_unfiltered_;
93 
96 
100 
103  unsigned int serial_number_low;
104  unsigned int serial_number_high;
105  unsigned int serial_number;
106 
107  unsigned int assembly_data_year;
108  unsigned int assembly_data_month;
109  unsigned int assembly_data_day;
110 
111  int tests_;
112  unsigned int can_error_counters;
113 
114  std::vector<int> raw_sensor_values_;
115  std::vector<double> calibrated_sensor_values_;
116 
124  std::vector<std::pair<std::string, bool> > flags_;
125 
126  std::vector<tactiles::AllTactileData> *tactiles_;
127 }; // end class SrActuatorState
128 
130  public SrActuatorState
131 {
132 public:
134  strain_gauge_left_(0),
135  strain_gauge_right_(0),
136  force_unfiltered_(0.0),
137  pwm_(0),
138  motor_gear_ratio(0),
139  force_control_f_(0),
140  force_control_p_(0),
141  force_control_i_(0),
142  force_control_d_(0),
143  force_control_imax_(0),
144  force_control_deadband_(0),
145  force_control_sign_(0),
146  force_control_frequency_(0),
147  temperature_(0.0)
148  {
149  }
150 
153 
155 
156  int pwm_;
157 
158  unsigned int motor_gear_ratio;
159 
168 
172  double temperature_;
173 }; // end class SrMotorActuatorState
174 
176  public SrActuatorState
177 {
178 public:
180  pressure_(),
181  last_commanded_valve_()
182  {
183  }
184 
186  uint16_t pressure_[2];
187  int8_t last_commanded_valve_[2];
188 }; // end class SrMuscleActuatorState
189 
191 {
192 public:
194  valve_()
195  {
196  }
197 
198  int8_t valve_[2];
199 }; // end class SrMuscleActuatorCommand
200 
205  public ros_ethercat_model::Actuator
206 {
207 public:
209 }; // end class SrMotorActuator
210 
215  public ros_ethercat_model::Actuator
216 {
217 public:
220 }; // end class SrMotorActuator
221 } // namespace sr_actuator
222 
223 /* For the emacs weenies in the crowd.
224 Local Variables:
225  c-basic-offset: 2
226 End:
227  */
228 
229 #endif
230 
std::vector< int > raw_sensor_values_
SrMuscleActuatorState muscle_state_
std::vector< std::pair< std::string, bool > > flags_
unsigned int pic_firmware_git_revision_
Definition: sr_actuator.hpp:97
SrMuscleActuatorCommand muscle_command_
std::vector< double > calibrated_sensor_values_
unsigned int server_firmware_git_revision_
Definition: sr_actuator.hpp:98
std::vector< tactiles::AllTactileData > * tactiles_
Contains the different tactile sensors structures.
void set_serial_number_low(unsigned int serial)
Definition: sr_actuator.hpp:63
void set_serial_number_high(unsigned int serial)
Definition: sr_actuator.hpp:75
SrMotorActuatorState motor_state_


sr_hardware_interface
Author(s): Ugo Cupcic
autogenerated on Tue Oct 13 2020 03:55:41