iCub-main
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010 RobotCub Consortium
3 * Author: Lorenzo Natale
4 * CopyPolicy: Released under the terms of the GNU GPL v2.0.
5 *
6 */
7
92
93#include <yarp/os/Network.h>
94#include <yarp/os/RFModule.h>
95#include <yarp/os/Time.h>
96#include <yarp/os/BufferedPort.h>
97#include <yarp/sig/Vector.h>
98#include <yarp/math/Math.h>
99
100#include <yarp/dev/ControlBoardInterfaces.h>
101#include <yarp/dev/PolyDriver.h>
102#include <yarp/os/PeriodicThread.h>
103#include <yarp/os/Thread.h>
104#include <yarp/os/LogStream.h>
105
107
108#include <mutex>
109#include <condition_variable>
110#include <fstream>
111#include <iostream>
112#include <iomanip>
113#include <string>
114#include <deque>
115#include <vector>
116
117using namespace std;
118using namespace yarp::os;
119using namespace yarp::sig;
120using namespace yarp::dev;
121using namespace yarp::math;
122using namespace iCub::ctrl;
123
124#define VCTP_TIME yarp::os::createVocab32('t','i','m','e')
125#define VCTP_OFFSET yarp::os::createVocab32('o','f','f')
126#define VCTP_CMD_NOW yarp::os::createVocab32('c','t','p','n')
127#define VCTP_CMD_QUEUE yarp::os::createVocab32('c','t','p','q')
128#define VCTP_CMD_FILE yarp::os::createVocab32('c','t','p','f')
129#define VCTP_POSITION yarp::os::createVocab32('p','o','s')
130#define VCTP_WAIT yarp::os::createVocab32('w','a','i','t')
131
132#define VEL_FILT_SIZE 10
133#define VEL_FILT_THRES 1.0
134
135// Class for position control
137{
138private:
139 int off;
140 Vector cmd;
141 double time;
142public:
143 const int &getOffset() const { return off; }
144 int &getOffset() { return off; }
145
146 const double &getTime() const { return time; }
147 double &getTime() {return time; }
148
149 const Vector &getCmd() const { return cmd; }
150
151 Vector &getCmd() { return cmd; }
152};
153
154typedef deque<ActionItem *> ActionList;
155
157{
158 ActionList actions;
159
160public:
163
164 int size()
165 {
166 return actions.size();
167 }
168
169 void clear()
170 {
171 for(unsigned int k=0; k<actions.size();k++)
172 {
173 ActionItem *ret=actions.at(k);
174 delete ret;
175 }
176 actions.clear();
177 }
178
180 {
181 if (actions.empty())
182 return 0;
183
184 ActionItem *ret=actions.at(0);
185 actions.pop_front();
186 return ret;
187 }
188
190 {
191 actions.push_back(v);
192 }
193};
194
196{
197public:
199protected:
202 Property drvOptions;
203 PolyDriver *drv;
204 IControlMode *mode;
205 IPositionControl *pos;
206 IEncoders *enc;
208 mutex mtx;
209
210 void _send(const ActionItem *x)
211 {
212 if (!connected)
213 {
214 cerr<<"Error: not connected to control board skipping"<<endl;
215 return;
216 }
217
218 int size=x->getCmd().size();
219 int offset=x->getOffset();
220 double time=x->getTime();
221 size_t nJoints=0;
222
223 enc->getAxes(nJoints);
224 if ((offset+size)>nJoints)
225 {
226 cerr<<"Error: detected possible overflow, skipping"<<endl;
227 cerr<<"For debug --> joints: "<<nJoints<< " off: "<<offset<<" cmd length: "<<size<<endl;
228 return;
229 }
230
231 Vector disp(size);
232
233 if (time==0)
234 {
235 return;
236 }
237
238 for (size_t i=0; i<disp.length(); i++)
239 {
240 double q;
241
242
243 if (!enc->getEncoder(offset+i,&q))
244 {
245 cerr<<"Error: encoders timed out, cannot rely on encoder feedback, aborted"<<endl;
246 return;
247 }
248
249 disp[i]=x->getCmd()[i]-q;
250
251 if (disp[i]<0.0)
252 disp[i]=-disp[i];
253 }
254
255 // don't blend together the two "for"
256 // since we have to enforce the modes on the whole
257 // prior to commanding the joints
258 std::vector<int> joints;
259 std::vector<yarp::dev::ControlModeEnum> modes;
260 std::vector<double> speeds;
261 std::vector<double> positions;
262
263 for (size_t i=0; i<disp.length(); i++)
264 {
265 joints.push_back(offset+i);
266 speeds.push_back(disp[i]/time);
267 modes.push_back(yarp::dev::ControlModeEnum::VOCAB_CM_POSITION);
268 positions.push_back(x->getCmd()[i]);
269 }
270
272 {
273 std::vector<yarp::dev::SelectableControlModeEnum> setModes(disp.length(), yarp::dev::SelectableControlModeEnum::VOCAB_CM_POSITION);
274 mode->setControlModes(joints, setModes);
275 }
276
277 yarp::os::Time::delay(0.01); // give time to update control modes value
278 mode->getControlModes(joints, modes);
279 for (size_t i=0; i<disp.length(); i++)
280 {
281 if(modes[i] != yarp::dev::ControlModeEnum::VOCAB_CM_POSITION)
282 {
283 yError() << "Joint " << i << " not in position mode";
284 }
285 }
286 pos->setTrajSpeeds(disp.length(), joints.data(), speeds.data());
287 pos->positionMove(disp.length(), joints.data(), positions.data());
288
289 cout << "Script port: " << x->getCmd().toString() << endl;
290 }
291
292public:
294 {
295 drvOptions.clear();
296 drv=0;
297 verbose=1;
298 connected=false;
299 }
300
301 void send(ActionItem *tmp)
302 {
303 lock_guard<mutex> lck(mtx);
304 _send(tmp);
305 }
306
307 bool configure(const Property &options)
308 {
309 bool ret=true;
310 if (options.check("device"))
311 drvOptions.put("device", options.find("device").asString());
312 else
313 drvOptions.put("device","remote_controlboard");
314
315 string name=string(options.find("name").asString());
316
317 string remote=string("/")+string(options.find("robot").asString());
318 remote+=string("/")+string(options.find("part").asString());
319
320 string local=name;
321 local+=string("/local/")+string(options.find("part").asString());
322
323 drvOptions.put("remote",remote);
324 drvOptions.put("local",local);
325
326 if (verbose)
327 {
328 cout << "Driver options:\n" << drvOptions.toString();
329 }
330
331 return ret;
332 }
333
334 void queue(ActionItem *item)
335 {
336 lock_guard<mutex> lck(mtx);
337 actions.push_back(item);
338 }
339
340 void sendNow(ActionItem *item)
341 {
342 lock_guard<mutex> lck(mtx);
343 actions.clear();
344 _send(item);
345 }
346
348 {
349 lock_guard<mutex> lck(mtx);
350 ActionItem *ret=actions.pop();
351 return ret;
352 }
353
354 bool connect()
355 {
356 drv=new PolyDriver(drvOptions);
357
358 if (drv->isValid())
359 connected=drv->view(mode) &&
360 drv->view(pos) &&
361 drv->view(enc);
362 else
363 connected=false;
364
365 if (!connected)
366 {
367 delete drv;
368 drv=0;
369 }
370
371 return connected;
372 }
373
375 {
376 if (drv)
377 delete drv;
378 }
379};
380
381class WorkingThread: public PeriodicThread
382{
383private:
384 scriptPosPort *posPort;
385public:
386 WorkingThread(int period=100): PeriodicThread((double)period/1000.0)
387 {}
388
390 {
391 if (p)
392 posPort=p;
393 }
394
396 {
397 if (!posPort)
398 return false;
399 return true;
400 }
401
402 void run()
403 {
404 ActionItem *tmp=posPort->pop();
405 if (tmp)
406 {
407 posPort->send(tmp);
408 double time=tmp->getTime();
409 delete tmp;
410 Time::delay(time);
411 }
412 }
413};
414
415class VelocityThread: public Thread
416{
417private:
418 mutex mtx;
419 condition_variable cv;
420
421 AWLinEstimator linEst;
422 Port *velPort;
423 Port *velInitPort;
424 ResourceFinder *pRF;
425
426 ifstream fin;
427 char line[1024];
428 bool closing;
429 bool firstRun;
430 bool velInit;
431
432 unsigned int filtElemsCnt;
433
434 bool checkInitConnection(Port *p)
435 {
436
437 if(p->getOutputCount() > 0)
438 {
439 cout << "***** got a connection" << endl;
440 return true;
441 }
442 else
443 {
444 return false;
445 }
446 }
447
448 bool initVelCtrl(Port *p, ResourceFinder *rf)
449 {
450 int i = 0;
451 bool cont = true;
452 char numberId[64];
453 bool ret = true;
454
455 while(cont)
456 {
457 string gainStr = "gain";
458 sprintf(numberId, "%d", i);
459 gainStr = gainStr + numberId;
460
461 Bottle c,r;
462 c.addString("gain");
463 c.addInt32(i);
464 if (rf->check(gainStr))
465 {
466 c.addFloat64(rf->find(gainStr).asFloat64());
467 p->write(c,r);
468 i++;
469 }
470 else
471 cont = false;
472 }
473 if (i==0)
474 {
475 ret = false;
476 cout << " velCtrl: missing 'gain' parameters" << endl;
477 }
478
479 i = 0;
480 cont = true;
481 while(cont)
482 {
483 string svelStr = "svel";
484 sprintf(numberId, "%d", i);
485 svelStr = svelStr + numberId;
486
487 Bottle c,r;
488 c.addString("svel");
489 c.addInt32(i);
490 if (rf->check(svelStr))
491 {
492 c.addFloat64(rf->find(svelStr).asFloat64());
493 p->write(c,r);
494 i++;
495 }
496 else
497 cont = false;
498 }
499 if (i==0)
500 {
501 ret = false;
502 cout << " velCtrl: missing 'svel' parameters" << endl;
503 }
504
505 return ret;
506 }
507
508 bool readLine(Vector &v, double &time)
509 {
510 fin.getline(&line[0],sizeof(line),'\n');
511 string str(line);
512
513 if (str.length()!=0)
514 {
515 Bottle b;
516 b.fromString(str);
517
518 if (b.size()>2)
519 {
520 time=b.get(1).asFloat64();
521 v.resize(b.size()-2);
522
523 for (size_t i=0; i<v.length(); i++)
524 v[i]=b.get(i+2).asFloat64();
525
526 return true;
527 }
528 else
529 return false;
530 }
531 else
532 return false;
533 }
534
535 Vector formCommand(const Vector &p, const double t)
536 {
537 Vector res;
538
539 for (size_t i=0; i<p.length(); i++)
540 {
541 res.push_back(i);
542 res.push_back(p[i]);
543 }
544
545 AWPolyElement el;
546 el.data=p;
547 el.time=t;
548
549 Vector v=linEst.estimate(el);
550
551 if (++filtElemsCnt>VEL_FILT_SIZE)
552 {
553 for (size_t i=0; i<p.length(); i++)
554 {
555 res.push_back(1000.0+i);
556 res.push_back(v[i]);
557 }
558 }
559
560 return res;
561 }
562
563public:
565 {
566 velInit=false;
567 velPort=NULL;
568 velInitPort=NULL;
569 closing=false;
570 firstRun=true;
571 }
572
573 void attachRF(ResourceFinder *attachedRF)
574 {
575 pRF = attachedRF;
576 }
577
578 void attachVelPort(Port *p)
579 {
580 if (p)
581 velPort=p;
582 }
583
585 {
586 if (p)
587 velInitPort=p;
588 }
589
590 bool go(const string &fileName)
591 {
592 if (velPort==NULL)
593 return false;
594
595 if (fin.is_open())
596 fin.close();
597
598 fin.open(fileName.c_str());
599 if (fin.is_open())
600 {
601 fin.seekg(0,ios_base::beg);
602 // skip the first two lines
603 fin.getline(&line[0],sizeof(line),'\n');
604 fin.getline(&line[0],sizeof(line),'\n');
605 firstRun=true;
606 cout<<"File loaded"<<endl;
607 cv.notify_one();
608 return true;
609 }
610 else
611 {
612 cout<<"Unable to load file: "<<fileName<<endl;
613 return false;
614 }
615 }
616
617 void onStop()
618 {
619 closing=true;
620 cv.notify_one();
621 }
622
624 {
625 if (fin.is_open())
626 fin.close();
627 }
628
629 void run()
630 {
631 Vector p1,p2;
632 double time1,time2,t;
633 bool send=false;
634
635 while (!isStopping())
636 {
637 if (!velInit)
638 {
639 if (checkInitConnection(velInitPort))
640 {
641 bool b = initVelCtrl(velInitPort, pRF);
642 if (b)
643 {
644 cout << "velocity control initialized. gain, svel parameters loaded" << endl;
645 }
646 else
647 {
648 cout << "*** velocity control missing init parameters! (gain, svel)" << endl;
649 }
650 velInit = true;
651 }
652 else
653 Time::delay(1.0);
654 }
655 else
656 {
657 if (!closing)
658 {
659 unique_lock<mutex> lck(mtx);
660 cv.wait(lck);
661 }
662
663 if (firstRun)
664 {
665 Bottle c,r;
666 c.addString("run");
667 velInitPort->write(c,r);
668 send=readLine(p1,time1);
669 linEst.reset();
670 t=0.0;
671 filtElemsCnt=0;
672 firstRun=false;
673 }
674
675 if (send)
676 {
677 Vector cmd=formCommand(p1,t);
678 velPort->write(cmd);
679 send=false;
680 }
681
682 if (readLine(p2,time2))
683 {
684 double dt=time2-time1;
685 Time::delay(dt);
686 t+=dt;
687 p1=p2;
688 time1=time2;
689 send=true;
690 cv.notify_one();
691 }
692 else
693 {
694 fin.close();
695 Bottle c,r;
696 c.addString("susp");
697 velInitPort->write(c,r);
698 }
699 }
700 }
701 }
702};
703
704class scriptModule: public RFModule
705{
706protected:
707 ResourceFinder *rf;
709 string name;
716
717public:
719 {
720 verbose=true;
721 }
722
723 bool handlectpm(const Bottle &cmd, Bottle &reply)
724 {
726 bool ret=parsePosCmd(cmd, reply, &action);
727 if (ret)
728 {
729 posPort.sendNow(action);
730 reply.addVocab32("ack");
731 }
732
733 return ret;
734 }
735
736 bool handle_ctp_queue(const Bottle &cmd, Bottle &reply)
737 {
739 bool ret=parsePosCmd(cmd, reply, &action);
740 if (ret)
741 {
742 posPort.queue(action);
743 reply.addVocab32("ack");
744 }
745 return ret;
746 }
747
748 bool handle_ctp_file(const Bottle &cmd, Bottle &reply)
749 {
750 if (cmd.size()<2)
751 return false;
752
753 string fileName=rf->findFile(cmd.get(1).asString());
754 bool ret = velThread.go(fileName);
755 if (ret)
756 {
757 reply.addVocab32("ack");
758 }
759 else
760 {
761 reply.addVocab32("nack");
762 reply.addString("Unable to load file");
763 }
764 return ret;
765 }
766
767 bool handle_wait(const Bottle &cmd, Bottle &reply)
768 {
769 cerr<<"Warning command not implemented yet"<<endl;
770 reply.addVocab32("ack");
771 return true;
772 //ActionItem *action;
773 //bool ret=parseWaitCmd(cmd, reply, &action);
774 //if (ret)
775 // posPort.queue(action);
776 }
777
778 bool parsePosCmd(const Bottle &cmd, Bottle &reply, ActionItem **action)
779 {
780 const int expectedMsgSize=7;
781 bool parsed=false;
782 if (cmd.size()!=expectedMsgSize)
783 {
784 return false;
785 }
786
787 if (cmd.get(1).asVocab32()==VCTP_TIME)
788 {
789 double time=cmd.get(2).asFloat64();
790 int offset=0;
791 Bottle *posCmd=0;
792 if (cmd.get(3).asVocab32()==VCTP_OFFSET)
793 {
794 offset=cmd.get(4).asInt32();
795 if (cmd.get(5).asVocab32()==VCTP_POSITION)
796 {
797 posCmd=cmd.get(6).asList();
798 if (!posCmd)
799 return false;
800
801 //check posCmd!=0
802 parsed=true;
803 if (verbose)
804 {
805 cout<<"Received command:"<<endl;
806 cout<<"Time: " << time << "offset: " << offset <<" Cmd: " << posCmd->toString()<<endl;
807 }
808 *action=new ActionItem;
809 (*action)->getCmd().resize(posCmd->size());
810 for(int k=0;k<posCmd->size();k++)
811 (*action)->getCmd()[k]=posCmd->get(k).asFloat64();
812
813 (*action)->getOffset()=offset;
814 (*action)->getTime()=time;
815 return true;
816 }
817 }
818 }
819 return false;
820 }
821
822 virtual bool configure(ResourceFinder &rf)
823 {
824 this->rf=&rf;
825
826 if (rf.check("name"))
827 name=string("/")+rf.find("name").asString();
828 else
829 name="/ctpservice";
830
831 rpcPort.open(name+string("/")+rf.find("part").asString()+"/rpc");
832 attach(rpcPort);
833
834 Property portProp;
835 portProp.put("name", name);
836 portProp.put("robot", rf.find("robot"));
837 portProp.put("part", rf.find("part"));
838
839 if (!posPort.configure(portProp))
840 {
841 cerr<<"Error configuring position controller, check parameters"<<endl;
842 return false;
843 }
844
845 if (!posPort.connect())
846 {
847 cerr<<"Error cannot connect to remote ports"<<endl;
848 return false;
849 }
850
851 cout << "***** connect to rpc port and type \"help\" for commands list" << endl;
852
853 thread.attachPosPort(&posPort);
854 if (!thread.start())
855 {
856 cerr<<"Thread did not start, queue will not work"<<endl;
857 }
858
859 if (rf.check("autochange_control_mode_enable"))
860 {
861 //This value should be false by default.
862 //Otherwise it can be dangerous to activate idle joints (or in hw fault).
863 //The robot could eventually break something!
864 posPort.autochange_control_mode_enable=true;
865 }
866 velPort.open(name+string("/")+rf.find("part").asString()+"/vc:o");
867 velInitPort.open(name+string("/")+rf.find("part").asString()+"/vcInit:o");
868 velThread.attachVelPort(&velPort);
869 velThread.attachVelInitPort(&velInitPort);
870 cout << "Using parameters:" << endl << rf.toString() << endl;
871 velThread.attachRF(&rf);
872 cout << "***** starting the thread" << endl;
873 velThread.start();
874
875 return true;
876 }
877
878 virtual bool respond(const Bottle &command, Bottle &reply)
879 {
880 bool ret;
881 if (command.size()!=0)
882 {
883 switch (command.get(0).asVocab32())
884 {
885 case yarp::os::createVocab32('h','e','l','p'):
886 {
887 cout << "Available commands:" << endl;
888 cout<<"Queue command:\n";
889 cout<<"[ctpq] [time] seconds [off] j [pos] (list)\n";
890 cout<<"New command, execute now (erase queue):\n";
891 cout<<"[ctpn] [time] seconds [off] j [pos] (list)\n";
892 cout<<"Load sequence from file:\n";
893 cout<<"[ctpf] filename\n";
894 reply.addVocab32("ack");
895 return true;
896 }
897 case VCTP_CMD_NOW:
898 {
899 ret=handlectpm(command, reply);
900 return ret;
901 }
902 case VCTP_CMD_QUEUE:
903 {
904 ret=handle_ctp_queue(command, reply);
905 return ret;
906 }
907 case VCTP_CMD_FILE:
908 {
909 ret=handle_ctp_file(command, reply);
910 return ret;
911 }
912 case VCTP_WAIT:
913 {
914 ret=handle_wait(command, reply);
915 }
916 default:
917 return RFModule::respond(command,reply);
918 }
919 }
920 else
921 {
922 reply.addVocab32("nack");
923 return false;
924 }
925 }
926
927 virtual bool close()
928 {
929 rpcPort.interrupt();
930 rpcPort.close();
931 thread.stop();
932
933 velThread.stop();
934 velPort.interrupt();
935 velPort.close();
936
937 velInitPort.interrupt();
938 velInitPort.close();
939
940 return true;
941 }
942
943 virtual double getPeriod() { return 1.0; }
944 virtual bool updateModule() { return true; }
945};
946
947
948int main(int argc, char *argv[])
949{
950 ResourceFinder rf;
951 rf.setDefaultContext("ctpService");
952 rf.configure(argc,argv);
953
954 if (rf.check("help"))
955 {
956 cout << "Options:" << endl << endl;
957 cout << "\t--name moduleName: set new module name" << endl;
958 cout << "\t--robot robotname: robot name" << endl;
959 cout << "\t--part partname: robot part name" << endl;
960 cout << "\t--from fileName: input configuration file" << endl;
961 cout << "\t--context dirName: resource finder context" << endl;
962 cout << "\t--autochange_control_mode_enable: sets the joints to position mode when trying to execute the command (default off)" << endl;
963
964 return 0;
965 }
966
967 Network yarp;
968 if (!yarp.checkNetwork())
969 return 1;
970
971 scriptModule mod;
972 return mod.runModule(rf);
973}
974
975
976
Vector & getCmd()
Definition main.cpp:151
const double & getTime() const
Definition main.cpp:146
double & getTime()
Definition main.cpp:147
const Vector & getCmd() const
Definition main.cpp:149
const int & getOffset() const
Definition main.cpp:143
int & getOffset()
Definition main.cpp:144
~Actions()
Definition main.cpp:162
ActionItem * pop()
Definition main.cpp:179
void clear()
Definition main.cpp:169
void push_back(ActionItem *v)
Definition main.cpp:189
Actions()
Definition main.cpp:161
int size()
Definition main.cpp:164
bool go(const string &fileName)
Definition main.cpp:590
void attachVelPort(Port *p)
Definition main.cpp:578
void onStop()
Definition main.cpp:617
void attachVelInitPort(Port *p)
Definition main.cpp:584
void run()
Definition main.cpp:629
void attachRF(ResourceFinder *attachedRF)
Definition main.cpp:573
void threadRelease()
Definition main.cpp:623
void attachPosPort(scriptPosPort *p)
Definition main.cpp:389
bool threadInit()
Definition main.cpp:395
WorkingThread(int period=100)
Definition main.cpp:386
void run()
Definition main.cpp:402
Adaptive window linear fitting to estimate the first derivative.
Basic element for adaptive polynomial fitting.
scriptPosPort posPort
Definition main.cpp:711
Port velPort
Definition main.cpp:712
bool parsePosCmd(const Bottle &cmd, Bottle &reply, ActionItem **action)
Definition main.cpp:778
virtual bool updateModule()
Definition main.cpp:944
WorkingThread thread
Definition main.cpp:714
Port rpcPort
Definition main.cpp:708
bool handlectpm(const Bottle &cmd, Bottle &reply)
Definition main.cpp:723
Port velInitPort
Definition main.cpp:713
string name
Definition main.cpp:709
virtual double getPeriod()
Definition main.cpp:943
bool handle_ctp_file(const Bottle &cmd, Bottle &reply)
Definition main.cpp:748
bool handle_wait(const Bottle &cmd, Bottle &reply)
Definition main.cpp:767
virtual bool close()
Definition main.cpp:927
VelocityThread velThread
Definition main.cpp:715
virtual bool respond(const Bottle &command, Bottle &reply)
Definition main.cpp:878
ResourceFinder * rf
Definition main.cpp:707
virtual bool configure(ResourceFinder &rf)
Definition main.cpp:822
bool handle_ctp_queue(const Bottle &cmd, Bottle &reply)
Definition main.cpp:736
bool verbose
Definition main.cpp:710
void _send(const ActionItem *x)
Definition main.cpp:210
bool verbose
Definition main.cpp:200
PolyDriver * drv
Definition main.cpp:203
bool autochange_control_mode_enable
Definition main.cpp:198
IControlMode * mode
Definition main.cpp:204
void queue(ActionItem *item)
Definition main.cpp:334
void send(ActionItem *tmp)
Definition main.cpp:301
mutex mtx
Definition main.cpp:208
ActionItem * pop()
Definition main.cpp:347
Property drvOptions
Definition main.cpp:202
Actions actions
Definition main.cpp:207
IEncoders * enc
Definition main.cpp:206
bool connect()
Definition main.cpp:354
bool configure(const Property &options)
Definition main.cpp:307
void sendNow(ActionItem *item)
Definition main.cpp:340
bool connected
Definition main.cpp:201
IPositionControl * pos
Definition main.cpp:205
cmd
Definition dataTypes.h:30
#define VCTP_CMD_QUEUE
Definition main.cpp:127
#define VCTP_CMD_NOW
Definition main.cpp:126
#define VCTP_WAIT
Definition main.cpp:130
#define VEL_FILT_THRES
Definition main.cpp:133
#define VCTP_OFFSET
Definition main.cpp:125
#define VCTP_TIME
Definition main.cpp:124
deque< ActionItem * > ActionList
Definition main.cpp:154
#define VCTP_POSITION
Definition main.cpp:129
#define VEL_FILT_SIZE
Definition main.cpp:132
#define VCTP_CMD_FILE
Definition main.cpp:128
int main()
Definition main.cpp:67
Copyright (C) 2008 RobotCub Consortium.
degrees offset
Definition sine.m:4
degrees time
Definition sine.m:5