16 if (value < timeOptimalDuration)
18 throw InvalidArgumentException(
19 "User duration must be greater than or equal timeOptimalDuration");
24 getEnd()->setUserTimestamp(
getStart()->getUserTimestamp() + userDuration);
29 throw InvalidArgumentException(
"User duration must be greater than or equal 0");
36 return timeOptimalDuration;
44 timeOptimalDuration = value;
45 getEnd()->setTimeOptimalTimestamp(
getStart()->getTimeOptimalTimestamp() +
47 if (userDuration == 0 || userDuration < timeOptimalDuration)
54 throw InvalidArgumentException(
"TimeOptimal duration must be greater than or equal 0");
61 return interpolationType;
67 interpolationType = value;
97 throw InvalidArgumentException(
"Can not setStart with nullptr");
110 if (value !=
nullptr)
116 throw InvalidArgumentException(
"Can not setEnd with nullptr");
123 if (newStart !=
nullptr)
129 throw InvalidArgumentException(
"Can not construct Transition with newStart = nullptr");
131 if (newEnd !=
nullptr)
137 throw InvalidArgumentException(
"Can not construct Transition with newEnd = nullptr");
139 timeOptimalDuration = 0;
148 timeOptimalDuration(source.timeOptimalDuration),
149 userDuration(source.userDuration),
150 interpolationType(source.interpolationType),
The Trajectory class represents n-dimensional sampled trajectories.
UserWaypointPtr getStart()
Returns the start UserWaypoint of the transition.
void setInterpolationType(const InterpolationType &value)
Set the intpolation type of the transition.
double getTimeOptimalDuration() const
Returns the time optimal duration calculated by TrajectoryCalculation.
Transition(UserWaypointPtr &newStart, UserWaypointPtr &newEnd)
Transition.
void setUserDuration(double value)
Set the user duration of the transition and tests if it is greater than the time optimal duration.
void setEnd(const UserWaypointPtr &value)
set the end userwaypoint of the transition
double getUserDuration() const
Returns the user duration of the transition.
InterpolationType getInterpolationType() const
Returns the interpolation type of the transition.
void setTrajectory(const TrajectoryPtr &value)
set the time optimal trajectory of the transition
TrajectoryPtr getTrajectory()
Returns the armarx::Trajectory of the transition.
UserWaypointPtr getEnd()
Returns the end UserWaypoint of the transition.
void setStart(const UserWaypointPtr &value)
set the start userwaypoint of the transition
void setTimeOptimalDuration(double value)
set the time optimal duration and set the userDuration if its less than time optimal duration
This file is part of ArmarX.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceInternal::Handle< Trajectory > TrajectoryPtr
InterpolationType
The InterpolationType enum lists all available interpolation types eLinearInterpolation: represents l...
std::shared_ptr< UserWaypoint > UserWaypointPtr