16 Logger::logginLevel =
trace;
18 ethercatMaster = &EthercatMaster::getInstance(
"youbot-ethercat.cfg", CONFIG_FOLDER_PATH,
false);
21 EthercatMaster::destroy();
22 ethercatMaster = &EthercatMaster::getInstance(
"youbot-ethercat.cfg", CONFIG_FOLDER_PATH,
false);
28 EthercatMaster::destroy();
38 std::stringstream jointNameStream;
39 boost::ptr_vector<DataTrace> myTrace;
40 std::vector<JointAngleSetpoint> upstretchedpose;
41 std::vector<JointAngleSetpoint> foldedpose;
44 desiredJointAngle.
angle = 2.56244 * radian;
45 upstretchedpose.push_back(desiredJointAngle);
46 desiredJointAngle.
angle = 1.04883 * radian;
47 upstretchedpose.push_back(desiredJointAngle);
48 desiredJointAngle.
angle = -2.43523 * radian;
49 upstretchedpose.push_back(desiredJointAngle);
50 desiredJointAngle.
angle = 1.73184 * radian;
51 upstretchedpose.push_back(desiredJointAngle);
52 desiredJointAngle.
angle = 1.5 * radian;
53 upstretchedpose.push_back(desiredJointAngle);
55 desiredJointAngle.
angle = 0.11 * radian;
56 foldedpose.push_back(desiredJointAngle);
57 desiredJointAngle.
angle = 0.11 * radian;
58 foldedpose.push_back(desiredJointAngle);
59 desiredJointAngle.
angle = -0.11 * radian;
60 foldedpose.push_back(desiredJointAngle);
61 desiredJointAngle.
angle = 0.11 * radian;
62 foldedpose.push_back(desiredJointAngle);
63 desiredJointAngle.
angle = 0.2 * radian;
64 foldedpose.push_back(desiredJointAngle);
67 for (
int i = 1; i <=
dof; i++) {
68 jointNameStream <<
"Joint_" << i <<
"_" << __func__;
70 jointNameStream.str(
"");
74 for (
int i = 0; i <
dof; i++) {
75 myTrace[i].startTrace();
93 startTime = myTrace[0].getTimeDurationMilliSec();
95 while (myTrace[0].getTimeDurationMilliSec() <
overallTime) {
100 for (
int i = 0; i <
dof; i++) {
101 myTrace[i].updateTrace();
107 startTime = myTrace[0].getTimeDurationMilliSec();
110 while (myTrace[0].getTimeDurationMilliSec() <
overallTime) {
115 for (
int i = 0; i <
dof; i++) {
116 myTrace[i].updateTrace();
122 startTime = myTrace[0].getTimeDurationMilliSec();
125 while (myTrace[0].getTimeDurationMilliSec() <
overallTime) {
130 for (
int i = 0; i <
dof; i++) {
131 myTrace[i].updateTrace();
137 startTime = myTrace[0].getTimeDurationMilliSec();
139 while (myTrace[0].getTimeDurationMilliSec() <
overallTime) {
144 for (
int i = 0; i <
dof; i++) {
145 myTrace[i].updateTrace();
150 for (
int i = 0; i <
dof; i++) {
151 myTrace[i].stopTrace();
152 myTrace[i].plotTrace();
void doJointCommutation()
does the sine commutation of the arm joints
It groups the manipulator joints and the gripper together.
virtual void setConfigurationParameter(const JointParameter ¶meter)
void calibrateManipulator(const bool forceCalibration=false)
calibrate the reference position of the arm joints
Clear the flag that indicates a communication timeout between the EtherCAT master and the controller...
virtual bool sendProcessData()=0
#define SLEEP_MICROSEC(microsec)
YouBotArmTestWithoutThread()
virtual bool receiveProcessData()=0
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)
virtual bool isThreadActive()=0
virtual ~YouBotArmTestWithoutThread()
EthercatMasterInterface * ethercatMaster
quantity< plane_angle > angle
Set-point angle / position of the joint.