7 EthercatMaster::getInstance(
"youbot-ethercat.cfg", CONFIG_FOLDER_PATH,
true);
17 Logger::logginLevel =
trace;
33 std::stringstream jointNameStream;
34 boost::ptr_vector<DataTrace> myTrace;
35 std::vector<JointAngleSetpoint> upstretchedpose;
36 std::vector<JointAngleSetpoint> foldedpose;
39 desiredJointAngle.
angle = 2.56244 * radian;
40 upstretchedpose.push_back(desiredJointAngle);
41 desiredJointAngle.
angle = 1.04883 * radian;
42 upstretchedpose.push_back(desiredJointAngle);
43 desiredJointAngle.
angle = -2.43523 * radian;
44 upstretchedpose.push_back(desiredJointAngle);
45 desiredJointAngle.
angle = 1.73184 * radian;
46 upstretchedpose.push_back(desiredJointAngle);
47 desiredJointAngle.
angle = 1.5 * radian;
48 upstretchedpose.push_back(desiredJointAngle);
50 desiredJointAngle.
angle = 0.11 * radian;
51 foldedpose.push_back(desiredJointAngle);
52 desiredJointAngle.
angle = 0.11 * radian;
53 foldedpose.push_back(desiredJointAngle);
54 desiredJointAngle.
angle = -0.11 * radian;
55 foldedpose.push_back(desiredJointAngle);
56 desiredJointAngle.
angle = 0.11 * radian;
57 foldedpose.push_back(desiredJointAngle);
58 desiredJointAngle.
angle = 0.2 * radian;
59 foldedpose.push_back(desiredJointAngle);
62 for (
int i = 1; i <=
dof; i++) {
63 jointNameStream <<
"Joint_" << i <<
"_" << __func__;
65 jointNameStream.str(
"");
69 for (
int i = 0; i <
dof; i++) {
70 myTrace[i].startTrace();
74 startTime = myTrace[0].getTimeDurationMilliSec();
76 while (myTrace[0].getTimeDurationMilliSec() <
overallTime) {
77 for (
int i = 0; i <
dof; i++) {
78 myTrace[i].updateTrace();
84 startTime = myTrace[0].getTimeDurationMilliSec();
87 while (myTrace[0].getTimeDurationMilliSec() <
overallTime) {
88 for (
int i = 0; i <
dof; i++) {
89 myTrace[i].updateTrace();
95 startTime = myTrace[0].getTimeDurationMilliSec();
98 while (myTrace[0].getTimeDurationMilliSec() <
overallTime) {
99 for (
int i = 0; i <
dof; i++) {
100 myTrace[i].updateTrace();
106 startTime = myTrace[0].getTimeDurationMilliSec();
108 while (myTrace[0].getTimeDurationMilliSec() <
overallTime) {
109 for (
int i = 0; i <
dof; i++) {
110 myTrace[i].updateTrace();
115 for (
int i = 0; i <
dof; i++) {
116 myTrace[i].stopTrace();
117 myTrace[i].plotTrace();
void doJointCommutation()
does the sine commutation of the arm joints
It groups the manipulator joints and the gripper together.
void calibrateManipulator(const bool forceCalibration=false)
calibrate the reference position of the arm joints
#define SLEEP_MICROSEC(microsec)
Creates a trace of all process data and reads all configuration parameter from one joint...
virtual void setJointData(const std::vector< JointAngleSetpoint > &JointData)
YouBotJoint & getArmJoint(const unsigned int armJointNumber)
quantity< plane_angle > angle
Set-point angle / position of the joint.