KDL 1.5.1
trajectory_segment.hpp
Go to the documentation of this file.
1/***************************************************************************
2 tag: Erwin Aertbelien Mon Jan 10 16:38:39 CET 2005 trajectory_segment.h
3
4 trajectory_segment.h - description
5 -------------------
6 begin : Mon January 10 2005
7 copyright : (C) 2005 Erwin Aertbelien
8 email : erwin.aertbelien@mech.kuleuven.ac.be
9
10 ***************************************************************************
11 * This library is free software; you can redistribute it and/or *
12 * modify it under the terms of the GNU Lesser General Public *
13 * License as published by the Free Software Foundation; either *
14 * version 2.1 of the License, or (at your option) any later version. *
15 * *
16 * This library is distributed in the hope that it will be useful, *
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
19 * Lesser General Public License for more details. *
20 * *
21 * You should have received a copy of the GNU Lesser General Public *
22 * License along with this library; if not, write to the Free Software *
23 * Foundation, Inc., 59 Temple Place, *
24 * Suite 330, Boston, MA 02111-1307 USA *
25 * *
26 ***************************************************************************/
27
28
29/*****************************************************************************
30 * \author
31 * Erwin Aertbelien, Div. PMA, Dep. of Mech. Eng., K.U.Leuven
32 *
33 * \version
34 * ORO_Geometry V0.2
35 *
36 * \par History
37 * - $log$
38 *
39 * \par Release
40 * $Id: trajectory_segment.h,v 1.1.1.1.2.5 2003/07/23 16:44:26 psoetens Exp $
41 * $Name: $
42 ****************************************************************************/
43
44#ifndef KDL_MOTION_TRAJECTORY_SEGMENT_H
45#define KDL_MOTION_TRAJECTORY_SEGMENT_H
46
47#include "frames.hpp"
48#include "frames_io.hpp"
49#include "trajectory.hpp"
50#include "path.hpp"
51#include "velocityprofile.hpp"
52
53
54namespace KDL {
55
56
63 {
67 public:
71 Trajectory_Segment(Path* _geom, VelocityProfile* _motprof, bool _aggregate=true);
72
77 Trajectory_Segment(Path* _geom, VelocityProfile* _motprof, double duration, bool _aggregate=true);
78
79 virtual double Duration() const;
80 // The duration of the trajectory
81
82 virtual Frame Pos(double time) const;
83 // Position of the trajectory at <time>.
84
85 virtual Twist Vel(double time) const;
86 // The velocity of the trajectory at <time>.
87 virtual Twist Acc(double time) const;
88 // The acceleration of the trajectory at <time>.
89
90 virtual Trajectory* Clone() const
91 {
92 if ( aggregate )
93 return new Trajectory_Segment( geom->Clone(), motprof->Clone(), true );
94 return new Trajectory_Segment( geom, motprof, false );
95 }
96
97 virtual void Write(std::ostream& os) const;
98
99 virtual Path* GetPath();
100
101 virtual VelocityProfile* GetProfile();
102
103
104 virtual ~Trajectory_Segment();
105 };
106
107
108
109}
110
111
112#endif
Definition: frames.hpp:570
The specification of the path of a trajectory.
Definition: path.hpp:59
virtual Path * Clone()=0
Virtual constructor, constructing by copying, Returns a deep copy of this Path Object.
Trajectory_Segment combines a VelocityProfile and a Path into a trajectory.
Definition: trajectory_segment.hpp:63
virtual Path * GetPath()
Definition: trajectory_segment.cpp:100
virtual ~Trajectory_Segment()
Definition: trajectory_segment.cpp:92
VelocityProfile * motprof
Definition: trajectory_segment.hpp:64
bool aggregate
Definition: trajectory_segment.hpp:66
Path * geom
Definition: trajectory_segment.hpp:65
virtual VelocityProfile * GetProfile()
Definition: trajectory_segment.cpp:104
virtual Trajectory * Clone() const
Definition: trajectory_segment.hpp:90
virtual double Duration() const
Definition: trajectory_segment.cpp:63
Trajectory_Segment(Path *_geom, VelocityProfile *_motprof, bool _aggregate=true)
This constructor assumes that geom and <_motprof> are initialised correctly.
Definition: trajectory_segment.cpp:49
virtual Frame Pos(double time) const
Definition: trajectory_segment.cpp:68
virtual Twist Vel(double time) const
Definition: trajectory_segment.cpp:73
virtual void Write(std::ostream &os) const
Definition: trajectory_segment.cpp:84
virtual Twist Acc(double time) const
Definition: trajectory_segment.cpp:78
An abstract class that implements a trajectory contains a cartesian space trajectory and an underlyin...
Definition: trajectory.hpp:79
represents both translational and rotational velocities.
Definition: frames.hpp:720
A VelocityProfile stores the velocity profile that is used within a trajectory.
Definition: velocityprofile.hpp:63
virtual VelocityProfile * Clone() const =0
Defines routines for I/O of Frame and related objects.
Definition: articulatedbodyinertia.cpp:26