DataTrace.cpp
Go to the documentation of this file.
1 /****************************************************************
2  *
3  * Copyright (c) 2011
4  * All rights reserved.
5  *
6  * Hochschule Bonn-Rhein-Sieg
7  * University of Applied Sciences
8  * Computer Science Department
9  *
10  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11  *
12  * Author:
13  * Jan Paulus, Nico Hochgeschwender, Michael Reckhaus, Azamat Shakhimardanov
14  * Supervised by:
15  * Gerhard K. Kraetzschmar
16  *
17  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
18  *
19  * This sofware is published under a dual-license: GNU Lesser General Public
20  * License LGPL 2.1 and BSD license. The dual-license implies that users of this
21  * code may choose which terms they prefer.
22  *
23  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
24  *
25  * Redistribution and use in source and binary forms, with or without
26  * modification, are permitted provided that the following conditions are met:
27  *
28  * * Redistributions of source code must retain the above copyright
29  * notice, this list of conditions and the following disclaimer.
30  * * Redistributions in binary form must reproduce the above copyright
31  * notice, this list of conditions and the following disclaimer in the
32  * documentation and/or other materials provided with the distribution.
33  * * Neither the name of the Hochschule Bonn-Rhein-Sieg nor the names of its
34  * contributors may be used to endorse or promote products derived from
35  * this software without specific prior written permission.
36  *
37  * This program is free software: you can redistribute it and/or modify
38  * it under the terms of the GNU Lesser General Public License LGPL as
39  * published by the Free Software Foundation, either version 2.1 of the
40  * License, or (at your option) any later version or the BSD license.
41  *
42  * This program is distributed in the hope that it will be useful,
43  * but WITHOUT ANY WARRANTY; without even the implied warranty of
44  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45  * GNU Lesser General Public License LGPL and the BSD license for more details.
46  *
47  * You should have received a copy of the GNU Lesser General Public
48  * License LGPL and BSD license along with this program.
49  *
50  ****************************************************************/
52 namespace youbot {
53 
54 DataTrace::DataTrace(YouBotJoint& youBotJoint, const std::string Name, const bool overwriteFiles):joint(youBotJoint) {
55  // Bouml preserved body begin 000C8F71
56 
58  PWMSetpoint.pwm = 0;
60 
61  InverseMovementDirection invertDirectionParameter;
62  joint.getConfigurationParameter(invertDirectionParameter);
63  bool inverted = false;
64  invertDirectionParameter.getParameter(inverted);
65  if(inverted){
66  invertDirection = -1;
67  }else{
68  invertDirection = 1;
69  }
70 
71  this->name = Name;
72  if(Name != ""){
73  this->path = Name;
74  this->path.append("/");
75  }
76  char input = 0;
77 
78  if(boost::filesystem::exists((path+"jointDataTrace").c_str())){
79  while(input != 'y' && input != 'n' && overwriteFiles == false){
80  std::cout << "Do you want to overwrite the existing files? [n/y]" << std::endl;
81 
82  input = getchar();
83 
84  if(input == 'n'){
85  throw std::runtime_error("Will not overwrite files!");
86  }
87  }
88 
89  }else{
90  boost::filesystem::path rootPath (this->path);
91 
92  if ( !boost::filesystem::exists(this->path) ){
93  if ( !boost::filesystem::create_directory( rootPath ))
94  throw std::runtime_error("could not create folder: " + this->path);
95  }
96  }
97 
98  // Bouml preserved body end 000C8F71
99 }
100 
102  // Bouml preserved body begin 000C8FF1
103  // Bouml preserved body end 000C8FF1
104 }
105 
107  // Bouml preserved body begin 000C93F1
108 
110 
111 
112  file.open((path+"jointDataTrace").c_str(), std::fstream::out | std::fstream::trunc);
113 
114  ptime today;
115  today = second_clock::local_time();
116 
117  file << "# Name: " << this->name << std::endl;
118 
119  file << "# Date: " << boost::posix_time::to_simple_string(today) << std::endl;
120 
121  JointName jointName;
122  FirmwareVersion firmwareParameter;
123  std::string parameterString;
124  joint.getConfigurationParameter(firmwareParameter);
125  joint.getConfigurationParameter(jointName);
126  jointName.toString(parameterString);
127  file << "# " << parameterString << std::endl;
128  firmwareParameter.toString(parameterString);
129  file << "# " << parameterString << std::endl;
130 
131 
132  file << "# time [milliseconds]"
133  << " " << "angle setpoint [rad]"
134  << " " << "velocity setpoint [rad/s]"
135  << " " << "RPM setpoint"
136  << " " << "current setpoint [A]"
137  << " " << "torque setpoint [Nm]"
138  << " " << "ramp generator setpoint [rad/s]"
139  << " " << "encoder setpoint"
140 
141  << " " << "sensed angle [rad]"
142  << " " << "sensed encoder ticks"
143  << " " << "sensed velocity [rad/s]"
144  << " " << "sensed RPM"
145  << " " << "sensed current [A]"
146  << " " << "sensed torque [Nm]"
147  << " " << "actual PWM"
148 
149  << " " << "OVER_CURRENT" << " "
150  << "UNDER_VOLTAGE" << " "
151  << "OVER_VOLTAGE" << " "
152  << "OVER_TEMPERATURE" << " "
153  << "MOTOR_HALTED" << " "
154  << "HALL_SENSOR_ERROR" << " "
155  << "PWM_MODE_ACTIVE" << " "
156  << "VELOCITY_MODE" << " "
157  << "POSITION_MODE" << " "
158  << "TORQUE_MODE" << " "
159  << "POSITION_REACHED" << " "
160  << "INITIALIZED" << " "
161  << "TIMEOUT" << " "
162  << "I2T_EXCEEDED" << " "
163  << std::endl;
164 
165  parametersBeginTraceFile.open((path+"ParametersAtBegin").c_str(), std::fstream::out | std::fstream::trunc);
166 
167 
168 
169  parameterVector.push_back(new ActualMotorVoltage);
170  // parameterVector.push_back(new ErrorAndStatus);
172  parameterVector.push_back(new I2tSum);
173  parameterVector.push_back(new PositionError);
174  parameterVector.push_back(new PositionErrorSum);
175  parameterVector.push_back(new RampGeneratorSpeed);
176  parameterVector.push_back(new VelocityError);
177  parameterVector.push_back(new VelocityErrorSum);
178  // parameterVector.push_back(new CalibrateJoint);
184 
190  // parameterVector.push_back(new InitializeJoint);
191 
197 
199  parameterVector.push_back(new MotorAcceleration);
208 
211  // parameterVector.push_back(new ApproveProtectedParameters);
212  parameterVector.push_back(new BEMFConstant);
213  // parameterVector.push_back(new ClearI2tExceededFlag);
214  // parameterVector.push_back(new ClearMotorControllerTimeoutFlag);
215  parameterVector.push_back(new CommutationMode);
218  parameterVector.push_back(new EncoderResolution);
219  parameterVector.push_back(new EncoderStopSwitch);
221  parameterVector.push_back(new I2tExceedCounter);
222  parameterVector.push_back(new I2tLimit);
223  parameterVector.push_back(new InitializationMode);
224  parameterVector.push_back(new InitSineDelay);
225  parameterVector.push_back(new MassInertiaConstant);
226  parameterVector.push_back(new MaximumMotorCurrent);
228  parameterVector.push_back(new MotorCoilResistance);
230  parameterVector.push_back(new MotorPoles);
231  parameterVector.push_back(new OperationalTime);
232  parameterVector.push_back(new PIDControlTime);
239  parameterVector.push_back(new StopSwitchPolarity);
242  parameterVector.push_back(new MotorHaltedVelocity);
243 
244 // apiParameterVector.push_back(new JointName);
245 // apiParameterVector.push_back(new TorqueConstant);
246 // apiParameterVector.push_back(new JointLimits);
247 // apiParameterVector.push_back(new GearRatio);
248 // apiParameterVector.push_back(new EncoderTicksPerRound);
249 // apiParameterVector.push_back(new InverseMovementDirection);
250 
251 // for (int i = 0; i < apiParameterVector.size(); i++) {
252 // joint.getConfigurationParameter(*(apiParameterVector[i]));
253 // apiParameterVector[i]->toString(parameterString);
254 // // std::cout << parameterString << std::endl;
255 // parametersBeginTraceFile << parameterString << std::endl;
256 // }
257 
258 
259  parametersBeginTraceFile << "Name: " << this->name << std::endl;
260  parametersBeginTraceFile << "Date: " << boost::posix_time::to_simple_string(today) << std::endl;
261  // joint.getConfigurationParameter(jointName);
262  jointName.toString(parameterString);
263  // std::cout << parameterString << std::endl;
264  parametersBeginTraceFile << parameterString << std::endl;
265  firmwareParameter.toString(parameterString);
266  parametersBeginTraceFile << parameterString << std::endl;
267 
268  TorqueConstant torqueconst;
269  joint.getConfigurationParameter(torqueconst);
270  torqueconst.toString(parameterString);
271  // std::cout << parameterString << std::endl;
272  parametersBeginTraceFile << parameterString << std::endl;
273 
274  JointLimits jointLimits;
275  joint.getConfigurationParameter(jointLimits);
276  jointLimits.toString(parameterString);
277  // std::cout << parameterString << std::endl;
278  parametersBeginTraceFile << parameterString << std::endl;
279 
280  EncoderTicksPerRound encoderTicksPerRound;
281  joint.getConfigurationParameter(encoderTicksPerRound);
282  encoderTicksPerRound.toString(parameterString);
283  // std::cout << parameterString << std::endl;
284  parametersBeginTraceFile << parameterString << std::endl;
285 
286  GearRatio gearRatio;
287  joint.getConfigurationParameter(gearRatio);
288  gearRatio.toString(parameterString);
289  // std::cout << parameterString << std::endl;
290  parametersBeginTraceFile << parameterString << std::endl;
291 
292  InverseMovementDirection inverseMovementDirection;
293  joint.getConfigurationParameter(inverseMovementDirection);
294  inverseMovementDirection.toString(parameterString);
295  // std::cout << parameterString << std::endl;
296  parametersBeginTraceFile << parameterString << std::endl;
297 
298 
299  for (unsigned int i = 0; i < parameterVector.size(); i++) {
301  parameterVector[i]->toString(parameterString);
302  // std::cout << parameterString << std::endl;
303  parametersBeginTraceFile << parameterString << std::endl;
304  }
305  parametersBeginTraceFile.close();
306 
307 
308  traceStartTime = microsec_clock::local_time();
309  // Bouml preserved body end 000C93F1
310 }
311 
313  // Bouml preserved body begin 000C9471
314  file.close();
315 
316  parametersEndTraceFile.open((path+"ParametersAfterTrace").c_str(), std::fstream::out | std::fstream::trunc);
317  std::string parameterString;
318 
319  parametersEndTraceFile << "Name: " << this->name << std::endl;
320  ptime today;
321  today = second_clock::local_time();
322  parametersEndTraceFile << "Date: " << boost::posix_time::to_simple_string(today) << std::endl;
323 
324  JointName jointName;
325  joint.getConfigurationParameter(jointName);
326  jointName.toString(parameterString);
327  // std::cout << parameterString << std::endl;
328  parametersEndTraceFile << parameterString << std::endl;
329 
330  FirmwareVersion firmwareParameter;
331  joint.getConfigurationParameter(firmwareParameter);
332  firmwareParameter.toString(parameterString);
333  parametersEndTraceFile << parameterString << std::endl;
334 
335  TorqueConstant torqueconst;
336  joint.getConfigurationParameter(torqueconst);
337  torqueconst.toString(parameterString);
338  // std::cout << parameterString << std::endl;
339  parametersEndTraceFile << parameterString << std::endl;
340 
341  JointLimits jointLimits;
342  joint.getConfigurationParameter(jointLimits);
343  jointLimits.toString(parameterString);
344  // std::cout << parameterString << std::endl;
345  parametersEndTraceFile << parameterString << std::endl;
346 
347  EncoderTicksPerRound encoderTicksPerRound;
348  joint.getConfigurationParameter(encoderTicksPerRound);
349  encoderTicksPerRound.toString(parameterString);
350  // std::cout << parameterString << std::endl;
351  parametersEndTraceFile << parameterString << std::endl;
352 
353  GearRatio gearRatio;
354  joint.getConfigurationParameter(gearRatio);
355  gearRatio.toString(parameterString);
356  // std::cout << parameterString << std::endl;
357  parametersEndTraceFile << parameterString << std::endl;
358 
359  InverseMovementDirection inverseMovementDirection;
360  joint.getConfigurationParameter(inverseMovementDirection);
361  inverseMovementDirection.toString(parameterString);
362  // std::cout << parameterString << std::endl;
363  parametersEndTraceFile << parameterString << std::endl;
364 
365  for (unsigned int i = 0; i < parameterVector.size(); i++) {
367  parameterVector[i]->toString(parameterString);
368  parametersEndTraceFile << parameterString << std::endl;
369  delete parameterVector[i];
370  }
371 
372 
373  parametersEndTraceFile.close();
374  // Bouml preserved body end 000C9471
375 }
376 
378  // Bouml preserved body begin 000C9571
379 
380  std::string executeString = "cd ";
381  executeString.append(path);
382  executeString.append("; gnuplot ../../gnuplotconfig > /dev/null 2>&1");
383  std::system(executeString.c_str());
384  // Bouml preserved body end 000C9571
385 }
386 
388  // Bouml preserved body begin 000C9071
389  angleSetpoint = setpoint;
391  this->update();
392  // Bouml preserved body end 000C9071
393 }
394 
396  // Bouml preserved body begin 000C90F1
397  velocitySetpoint = setpoint;
399  this->update();
400  // Bouml preserved body end 000C90F1
401 }
402 
404  // Bouml preserved body begin 000C9171
405  roundsPerMinuteSetpoint = setpoint;
407  this->update();
408  // Bouml preserved body end 000C9171
409 }
410 
412  // Bouml preserved body begin 000C91F1
413  currentSetpoint = setpoint;
415  this->update();
416  // Bouml preserved body end 000C91F1
417 }
418 
420  // Bouml preserved body begin 000C9271
421  torqueSetpoint = setpoint;
423  this->update();
424  // Bouml preserved body end 000C9271
425 }
426 
428  // Bouml preserved body begin 000C9371
429  encoderSetpoint = setpoint;
431  this->update();
432  // Bouml preserved body end 000C9371
433 }
434 
436  // Bouml preserved body begin 000EEC71
437  YouBotSlaveMsg message;
438  joint.getData(message);
439  switch (message.stctOutput.controllerMode) {
440  case MOTOR_STOP:
442  break;
443  case POSITION_CONTROL:
446  break;
447  case VELOCITY_CONTROL:
450  break;
451  case NO_MORE_ACTION:
453  break;
456  break;
457  case CURRENT_MODE:
458  currentSetpoint.current = (double)message.stctOutput.value /1000.0 * invertDirection* ampere;
460  break;
461  default:
463  break;
464  };
465 
466 
467  this->update();
468  // Bouml preserved body end 000EEC71
469 }
470 
472  // Bouml preserved body begin 000DCFF1
473  return timeDurationMicroSec;
474  // Bouml preserved body end 000DCFF1
475 }
476 
478  // Bouml preserved body begin 000C94F1
479  timeDuration = microsec_clock::local_time() - traceStartTime;
480  timeDurationMicroSec = timeDuration.total_milliseconds();
481  unsigned int statusFlags;
482  joint.getStatus(statusFlags);
493 
494  std::stringstream angleSet, angleEncSet, velSet, velRPMSet, currentSet, pwmSet, torqueSet;
495 
496  switch (controllerMode) {
498  angleSet << angleSetpoint.angle.value();
499  angleEncSet << "NaN";
500  velSet << targetVelocity.angularVelocity.value();
501  velRPMSet << "NaN";
502  currentSet << targetCurrent.current.value();
503  pwmSet << "NaN";
504  torqueSet << "NaN";
505  break;
507  angleSet << "NaN";
508  angleEncSet << encoderSetpoint.encoderTicks;
509  velSet << targetVelocity.angularVelocity.value();
510  velRPMSet << "NaN";
511  currentSet << targetCurrent.current.value();
512  pwmSet << "NaN";
513  torqueSet << "NaN";
514  break;
516  angleSet << "NaN";
517  angleEncSet << "NaN";
518  velSet << velocitySetpoint.angularVelocity.value();
519  velRPMSet << "NaN";
520  currentSet << targetCurrent.current.value();
521  pwmSet << "NaN";
522  torqueSet << "NaN";
523  break;
525  angleSet << "NaN";
526  angleEncSet << "NaN";
527  velSet << "NaN";
528  velRPMSet << roundsPerMinuteSetpoint.rpm;
529  currentSet << targetCurrent.current.value();
530  pwmSet << "NaN";
531  torqueSet << "NaN";
532  break;
534  angleSet << "NaN";
535  angleEncSet << "NaN";
536  velSet << "NaN";
537  velRPMSet << "NaN";
538  currentSet << currentSetpoint.current.value();
539  pwmSet << "NaN";
540  torqueSet << "NaN";
541  break;
542  case TORQUE_CONTROL_MODE:
543  angleSet << "NaN";
544  angleEncSet << "NaN";
545  velSet << "NaN";
546  velRPMSet << "NaN";
547  currentSet << "NaN";
548  pwmSet << "NaN";
549  torqueSet << torqueSetpoint.torque.value();
550  break;
551  case NOT_DEFINED:
552  angleSet << "NaN";
553  angleEncSet << "NaN";
554  velSet << "NaN";
555  velRPMSet << "NaN";
556  currentSet << "NaN";
557  pwmSet << "NaN";
558  torqueSet << "NaN";
559  break;
560  };
561 
562 
563 
565  << " " << angleSet.str() //2
566  << " " << velSet.str() //3
567  << " " << velRPMSet.str() //4
568  << " " << currentSet.str() //5
569  << " " << torqueSet.str() //6
570  << " " << rampGenSetpoint.angularVelocity.value() //7
571  << " " << angleEncSet.str() //8
572 
573  << " " << sensedAngle.angle.value() //9
574  << " " << sensedEncoderTicks.encoderTicks //10
575  << " " << sensedVelocity.angularVelocity.value() //11
576  << " " << sensedRoundsPerMinute.rpm //12
577  << " " << sensedCurrent.current.value() //13
578  << " " << sensedTorque.torque.value() //14
579  << " " << "0" //15 //dummy has been pwm
580 
581  << " " << bool(statusFlags & OVER_CURRENT) << " " //16
582  << bool(statusFlags & UNDER_VOLTAGE) << " " //17
583  << bool(statusFlags & OVER_VOLTAGE) << " " //18
584  << bool(statusFlags & OVER_TEMPERATURE) << " " //19
585  << bool(statusFlags & MOTOR_HALTED) << " " //20
586  << bool(statusFlags & HALL_SENSOR_ERROR) << " " //21
587  << "0" << " " //22 //dummy has been pwm
588  << bool(statusFlags & VELOCITY_MODE) << " " //23
589  << bool(statusFlags & POSITION_MODE) << " " //24
590  << bool(statusFlags & TORQUE_MODE) << " " //25
591  << bool(statusFlags & POSITION_REACHED) << " " //26
592  << bool(statusFlags & INITIALIZED) << " " //27
593  << bool(statusFlags & TIMEOUT) << " " //28
594  << bool(statusFlags & I2T_EXCEEDED) //29
595  << std::endl;
596 
597 
598  // Bouml preserved body end 000C94F1
599 }
600 
601 
602 } // namespace youbot
An actual I2t sum that exceeds this limit leads to increasing the I2t exceed counter.
I-Parameter of PID velocity regulator. This PID parameter set is used at lower velocity. (first velocity parameter set)
Adjusts the limit to switch between first velocity PID parameter set and second velocity PID paramete...
Acceleration parameter for velocity control and position control.
JointCurrentSetpoint currentSetpoint
Definition: DataTrace.hpp:140
Adjust in standstill to lowest possible value at which the motor keeps its position. A too high value causes overshooting at positioning mode. (second position parameter set)
I-Parameter of PID current regulator.
the firmware version of the joint
time_duration timeDuration
Definition: DataTrace.hpp:154
the resolution of the encoders, it is needed for the calculations of the youBot Driver ...
D-Parameter of PID velocity regulator (second position parameter set)
JointTorqueSetpoint torqueSetpoint
Definition: DataTrace.hpp:142
virtual void getConfigurationParameter(JointParameter &parameter)
Definition: YouBotJoint.cpp:83
the resolution of the encoders, it is needed for the calculations of the youBot Driver ...
Thermal winding time constant for the used motor. Used for I2t monitoring.
quantity< angular_velocity > angularVelocity
Definition: JointData.hpp:184
P-Parameter of PID velocity regulator. This PID parameter set is used at lower velocity. (first velocity parameter set)
DataTrace(YouBotJoint &youBotJoint, const std::string Name, const bool overwriteFiles=false)
Definition: DataTrace.cpp:54
I-Parameter of PID velocity regulator (second position parameter set)
unsigned long getTimeDurationMilliSec()
Definition: DataTrace.cpp:471
JointRoundsPerMinuteSetpoint roundsPerMinuteSetpoint
Definition: DataTrace.hpp:138
Switching threshold for position control between the first and second set of parameters. If the velocity threshold is set to zero, the parameter set 2 is used all the time.
DataTraceCntrollerMode controllerMode
Definition: DataTrace.hpp:158
Encoder direction Set this flag in a way, that turn right increases position counter.
I-Parameter of PID position regulator (first position parameter set)
JointPWMSetpoint PWMSetpoint
Definition: DataTrace.hpp:144
Set-point velocity of the joint.
Definition: JointData.hpp:182
The torque set-point of the joint will be set by setting the computed current set-point.
Definition: JointData.hpp:218
JointVelocitySetpoint targetVelocity
Definition: DataTrace.hpp:174
Maximum distance at which the position end flag is set.
JointSensedRoundsPerMinute sensedRoundsPerMinute
Definition: DataTrace.hpp:126
joint position limits in encoder ticks
JointSensedCurrent sensedCurrent
Definition: DataTrace.hpp:128
JointAngleSetpoint angleSetpoint
Definition: DataTrace.hpp:134
the name of the joint
The actual speed of the velocity ramp used for positioning and velocity mode.
std::fstream parametersBeginTraceFile
Definition: DataTrace.hpp:148
Velocity to switch from controlled to hallFX mode. Set this value to a realistic velocity which the m...
JointSensedEncoderTicks sensedEncoderTicks
Definition: DataTrace.hpp:122
Switches the ramp generator for speed and position control on and off.
P-Parameter of PID position regulator (second position parameter set)
JointSensedVelocity sensedVelocity
Definition: DataTrace.hpp:124
Adjust in standstill to lowest possible value at which the motor keeps its position. A too high value causes overshooting at positioning mode. (first position parameter set)
quantity< plane_angle > angle
Definition: JointData.hpp:90
D-Parameter of PID current regulator.
Sums of errors of PID position regulator.
Counts the module operational time.
quantity< si::torque > torque
Definition: JointData.hpp:150
Duration for sine initialization sequence. This parameter should be set in a way, that the motor has ...
std::fstream parametersEndTraceFile
Definition: DataTrace.hpp:150
void toString(std::string &value)
PID calculation delay: Set operational frequency PID.
D-Parameter of PID position regulator (first position parameter set)
void toString(std::string &value)
P-Parameter of PID velocity regulator (second position parameter set)
Set Encoder counter to zero at next N channel event.
If the actual speed is below this value the motor halted flag will be set. [rpm]. ...
the gear ratio which is needed for the calculations in the youBot driver
JointRampGeneratorVelocity rampGenSetpoint
Definition: DataTrace.hpp:170
Set encoder counter to zero at next switch event.
Mass inertia constant for position regulation. Compensates mass moment of inertia of rotor...
JointSensedAngle sensedAngle
Definition: DataTrace.hpp:120
encoder ticks setpoint of the joint
Definition: JointData.hpp:242
std::string path
Definition: DataTrace.hpp:166
Actual error of PID velocity regulator.
std::fstream file
Definition: DataTrace.hpp:132
JointVelocitySetpoint velocitySetpoint
Definition: DataTrace.hpp:136
inverse the joint movement direction
D-Parameter of PID velocity regulator. This PID parameter set is used at lower velocity. (first velocity parameter set)
quantity< si::angular_velocity > angularVelocity
Definition: JointData.hpp:114
The maximum velocity used for move to position command when executing a ramp to a position...
This PID parameter set is used at lower velocity. (first velocity parameter set)
std::vector< YouBotJointParameterReadOnly * > parameterVector
Definition: DataTrace.hpp:162
Actual temperature of the motor driver.
I-Parameter of PID position regulator (second position parameter set)
This value represents the internal commutation offset. (0 ... max. Encoder steps per rotation) ...
JointCurrentSetpoint targetCurrent
Definition: DataTrace.hpp:172
Actual error of PID position regulator.
Sums of Errors of PID velocity regulator.
Motor current for controlled commutation. This parameter is used in commutation mode 1...
JointAngleSetpoint targetAngle
Definition: DataTrace.hpp:176
void toString(std::string &value)
JointEncoderSetpoint encoderSetpoint
Definition: DataTrace.hpp:146
virtual void getStatus(std::vector< std::string > &statusMessages)
Returns the status messages for the motor controller.
YouBotJoint & joint
Definition: DataTrace.hpp:118
Maximum velocity at which end position can be set. Prevents issuing of end position when the target i...
I-Clipping Parameter of PID current regulator.
std::string name
Definition: DataTrace.hpp:164
quantity< si::torque > torque
Definition: JointData.hpp:220
P-Parameter of PID current regulator.
SlaveMessageOutput stctOutput
Delay of current limitation algorithm / PID current regulator.
unsigned long timeDurationMicroSec
Definition: DataTrace.hpp:156
void toString(std::string &value)
JointSensedTorque sensedTorque
Definition: DataTrace.hpp:130
Set-point current of the joint.
Definition: JointData.hpp:206
Hall sensor invert. Sets one of the motors invert with inverted hall scheme, e.g. some Maxon motors...
quantity< si::current > current
Definition: JointData.hpp:208
virtual ~DataTrace()
Definition: DataTrace.cpp:101
virtual void getData(JointData &data)
Resistance of motor coil. Used for current resistance regulation, position regulation and velocity re...
quantity< si::current > current
Definition: JointData.hpp:138
EtherCat message of the youBot EtherCat slaves.
Actual sum of the I2t monitor.
Set/Get Timeout to determine an interrupted communication with the EtherCAT master. (automatically stored in EEProm)
void getParameter(bool &parameter) const
I-Clipping Parameter of PID current regulator. This PID parameter set is used at lower velocity...
quantity< plane_angle > angle
Definition: JointData.hpp:172
P-Parameter of PID position regulator (first position parameter set)
BEMF constant of motor. Used for current regulation, position regulation and velocity regulation...
Set-point angle / position of the joint.
Definition: JointData.hpp:170
quantity< si::angular_velocity > angularVelocity
Definition: JointData.hpp:261
void toString(std::string &value)
Rounds per minute set-point of the joint.
Definition: JointData.hpp:194
Counts how often an I2t sum was higher than the I2t limit.
void toString(std::string &value)
D-Parameter of PID position regulator (second position parameter set)


youbot_driver
Author(s): Jan Paulus
autogenerated on Mon Jun 10 2019 15:46:24