24 setAngle.angle = 0 * radian;
25 setVel.angularVelocity = 0 * radian_per_second;
26 currentSetpoint.current = 0 * ampere;
37 YouBotBase myBase(
"youbot-base", CONFIG_FOLDER_PATH);
43 startTime = myTrace.getTimeDurationMilliSec();
44 overallTime = startTime + durationNull + stepStartTime + durationNull;
46 while (myTrace.getTimeDurationMilliSec() < overallTime) {
47 if (myTrace.getTimeDurationMilliSec() > startTime + durationNull) {
48 setAngle.angle = 0 * radian;
50 if (myTrace.getTimeDurationMilliSec() > startTime + durationNull
51 && myTrace.getTimeDurationMilliSec() < startTime + durationNull + stepStartTime) {
52 setAngle.angle = 1 * radian;
54 if (myTrace.getTimeDurationMilliSec() > startTime + durationNull + stepStartTime) {
55 setAngle.angle = 0 * radian;
59 myTrace.updateTrace(setAngle);
69 YouBotBase myBase(
"youbot-base", CONFIG_FOLDER_PATH);
75 startTime = myTrace.getTimeDurationMilliSec();
76 overallTime = startTime + durationNull + stepStartTime + durationNull;
78 while (myTrace.getTimeDurationMilliSec() < overallTime) {
79 if (myTrace.getTimeDurationMilliSec() > startTime + durationNull) {
80 setVel.angularVelocity = 0 * radian_per_second;
82 if (myTrace.getTimeDurationMilliSec() > startTime + durationNull
83 && myTrace.getTimeDurationMilliSec() < startTime + durationNull + stepStartTime) {
84 setVel.angularVelocity = 1 * radian_per_second;
86 if (myTrace.getTimeDurationMilliSec() > startTime + durationNull + stepStartTime) {
87 setVel.angularVelocity = 0 * radian_per_second;
91 myTrace.updateTrace(setVel);
101 YouBotBase myBase(
"youbot-base", CONFIG_FOLDER_PATH);
105 myTrace.startTrace();
107 startTime = myTrace.getTimeDurationMilliSec();
108 overallTime = startTime + durationNull + stepStartTime + durationNull;
110 while (myTrace.getTimeDurationMilliSec() < overallTime) {
111 if (myTrace.getTimeDurationMilliSec() > startTime + durationNull) {
112 currentSetpoint.current = 0 * ampere;
114 if (myTrace.getTimeDurationMilliSec() > startTime + durationNull
115 && myTrace.getTimeDurationMilliSec() < startTime + durationNull + stepStartTime) {
116 currentSetpoint.current = 0.3 * ampere;
118 if (myTrace.getTimeDurationMilliSec() > startTime + durationNull + stepStartTime) {
119 currentSetpoint.current = 0 * ampere;
123 myTrace.updateTrace(currentSetpoint);
virtual void setData(const JointDataSetpoint &data)
static severity_level logginLevel
void youBotBaseTest_VelocityMode()
YouBotJoint & getBaseJoint(const unsigned int baseJointNumber)
#define SLEEP_MICROSEC(microsec)
Creates a trace of all process data and reads all configuration parameter from one joint...
void youBotBaseTest_PositionMode()
It groups the base joints together.
void doJointCommutation()
does the sine commutation of the base joints
virtual ~YouBotBaseTest()
static EthercatMasterInterface & getInstance(const std::string configFile="youbot-ethercat.cfg", const std::string configFilePath="../config/", const bool ethercatMasterWithThread=true)
void setEncoderToZero()
set the encoder values of the joint to zero. This postion will be the new reference.
void youBotBaseTest_CurrentMode()