25 int main(
int argc,
char* argv[]) {
62 ctraject->
Add(traject);
67 std::ofstream of(
"./trajectory.dat");
68 for (
double t=0.0; t <= traject->
Duration(); t+= dt) {
70 current_pose = traject->
Pos(t);
73 of << current_pose(i,j) <<
"\t";
82 for (
int segmentnr=0; segmentnr < path->
GetNrOfSegments(); segmentnr++) {
92 std::cout <<
"segment " << segmentnr <<
" runs from s="<<starts <<
" to s=" <<ends;
95 std::cout <<
" circle";
98 std::cout <<
" line ";
101 std::cout <<
" unknown ";
104 std::cout << std::endl;
106 std::cout <<
" trajectory written to the ./trajectory.dat file " << std::endl;
109 }
catch(
Error& error) {
110 std::cout <<
"I encountered this error : " << error.
Description() << std::endl;
111 std::cout <<
"with the following type " << error.
GetType() << std::endl;
void Add(const Frame &F_base_point)
const double PI_2
the value of pi/2
virtual void Add(Trajectory *elem)
const double PI
the value of pi
virtual double PathLength()
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
virtual int GetType() const
int main(int argc, char *argv[])
virtual double GetLengthToEndOfSegment(int i)