24 int main(
int argc,
char* argv[]) {
61 ctraject->
Add(traject);
68 std::ofstream of(
"./trajectory.dat");
69 for (
double t=0.0; t <= traject->
Duration(); t+= dt) {
71 current_pose = traject->
Pos(t);
74 of << current_pose(i,j) <<
"\t";
83 for (
int segmentnr=0; segmentnr < path->
GetNrOfSegments(); segmentnr++) {
93 std::cout <<
"segment " << segmentnr <<
" runs from s="<<starts <<
" to s=" <<ends;
96 std::cout <<
" circle";
99 std::cout <<
" line ";
102 std::cout <<
" unknown ";
105 std::cout << std::endl;
107 std::cout <<
" trajectory written to the ./trajectory.dat file " << std::endl;
110 }
catch(
Error& error) {
111 std::cout <<
"I encountered this error : " << error.
Description() << std::endl;
112 std::cout <<
"with the following type " << error.
GetType() << std::endl;
void Add(const Frame &F_base_point)
virtual void Add(Trajectory *elem)
virtual double PathLength()
virtual int GetType() const
virtual int GetNrOfSegments()
A concrete implementation of a 3 dimensional vector class.
static Rotation RPY(double roll, double pitch, double yaw)
virtual Path * GetSegment(int i)
virtual Frame Pos(double time) const =0
virtual const char * Description() const
virtual IdentifierType getIdentifier() const =0
virtual double Duration() const =0
represents a frame transformation in 3D space (rotation + translation)
virtual void SetProfile(double pos1, double pos2)=0
int main(int argc, char *argv[])
virtual double GetLengthToEndOfSegment(int i)