claraty::Trapezoidal_Trajectory Class Reference
[Algorithms]
#include <trapezoidal_trajectory.h>
Inheritance diagram for claraty::Trapezoidal_Trajectory:


Retrieving Setpoints | |
| double | _v_0 |
| double | _v_f |
| double | _p_0 |
| double | _p_f |
| double | _v_m |
| double | _a |
| double | _d |
| double | _t1 |
| double | _t2 |
| double | _tf |
| double | _p_at_t1 |
| double | _p_at_t2 |
| double | _k1 |
| void | _compute_profile (double final_position, double max_velocity, double accel, double decel, double init_position=0, double init_velocity=0, double final_velocity=0) |
| void | _compute_setpoint (double time, double &position, double &velocity, double &accel) |
| void | _stop () |
Initialization Functionss | |
| bool | _started |
| bool | _compute_position |
| bool | _compute_velocity |
| bool | _compute_accel |
| bool | is_started () const |
| void | start () |
| void | stop () |
| void | reset () |
| void | advance_timer_by (double delta_time) |
Public Types | |
| enum | trajectory_type { TRIANGULAR, TRAPEZOIDAL } |
Public Member Functions | |
| Trapezoidal_Trajectory () | |
| virtual void | set (double final_position, double max_velocity, double accel) |
| virtual void | set (double final_position, double max_velocity, double accel, double decel) |
| virtual void | set (Vector< double > &final_position, Vector< double > &max_velocity, Vector< double > &accel) |
| virtual void | set (Vector< double > &final_position, double max_velocity, double accel) |
Retrieving Setpoints | |
| double | get_position () |
| double | get_position (double time) |
| double | get_velocity () |
| double | get_velocity (double time) |
| double | get_acceleration () |
| double | get_acceleration (double time) |
| void | get_setpoint (double &position, double &velocity, double &accel) |
| void | get_setpoint (double time, double &position, double &velocity, double &accel) |
Protected Attributes | |
| trajectory_type | _trajectory_type |
| Vector< double > | _final_positions |
| Vector< double > | _max_velocities |
| Vector< double > | _accels |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Trapezoidal_Trajectory &t) |
Detailed Description
Specialized class that generates a trapezoidal trajectory profile given position, maximum velocity, accelaration and deceleration. This class allows the user to change the profile in the middle of a trajectory
Definition at line 49 of file trapezoidal_trajectory.h.
Member Enumeration Documentation
The trapezoidal profile can degenerate into a triangular profile if the acceleration or the maximum velocity are not large enough. This enumeration keeps track of this distinction with this class
Definition at line 66 of file trapezoidal_trajectory.h.
00066 {TRIANGULAR, TRAPEZOIDAL};
Constructor & Destructor Documentation
| claraty::Trapezoidal_Trajectory::Trapezoidal_Trajectory | ( | ) | [inline] |
Member Function Documentation
| void claraty::Trapezoidal_Trajectory::_compute_profile | ( | double | final_position, | |
| double | max_velocity, | |||
| double | accel, | |||
| double | decel, | |||
| double | init_position = 0, |
|||
| double | init_velocity = 0, |
|||
| double | final_velocity = 0 | |||
| ) | [protected, virtual] |
This function computes the trajectory critical times (rise time (i.e. duration of the acceleration phase), fall time (duration of the deceleration phase), duration of the constant velocity time (if any). The duration of the acceleration phase is the time it takes the trajectory to change velocity from the initial velocity v_0 to the maximum desired velocity v_m. The function also computes the corresponding positions at these critical times. This function is called whenever the trajectory parameters need to be changed. This function can be called at any time even when the trajectory is active. If the final_position is set to be the same as the initial position this signals a stop command. The profile moves the current velocity v_0 to zero using the defined deceleration. The final_position will be reset to indicate the correct final position
- Parameters:
-
[in] final_position The final desired position for the trajectory. This value is relative to the initial position which is always zero for trajectory. This is a signed value. [in] max_velocity The maximum velocity magnitude to achieve for this trajectory. Max_velocity is an absolute velocity value (not relative) and must be a positive value. If a negative value is used this function will consider its absolute value. [in] accel The desired acceleration magnitude used to change velocities. Acceleration is an absoulte value (not relative) and must be a positive value. If a negative value is used this function will consider its absolute value. [in] decel The desired deceleration magnitude used to change velocities at end of the trajectory (single trapezoid). Deceleration is an absoulte value (not relative) and must be a positive value. If a negative value is used this function will consider its absolute value. [in] init_position [in] init_velocity [in] final_velocity v_m | ___________________________________ v(t) |a /| |\ | / \ v_0 |/ | | \ d | \ | | | + v_f |__________________________________________|_______ +<------------ tc --------------->+ | t1 Time (t) t2 tf
Implements claraty::Trajectory.
Definition at line 95 of file trapezoidal_trajectory.cc.
References _a, _d, _k1, _p_0, _p_at_t1, _p_at_t2, _p_f, _t1, _t2, _tf, _trajectory_type, _v_0, _v_f, _v_m, EPSILON, TRAPEZOIDAL, and TRIANGULAR.
00102 { 00103 // Since this trajectory can be updated during a motion, the 00104 // inital_velocity is computed first to correctly merge the two profiles 00105 _p_f = final_position; // input: signed value 00106 _v_m = fabs(max_velocity); // input: magnitude value 00107 _a = fabs(accel); // input: magnitude value 00108 _d = fabs(decel); // input: magnitude value 00109 00110 _p_0 = init_position; // initial condition: signed value 00111 _v_0 = init_velocity; // initial condition: signed value 00112 _v_f = final_velocity; // boundary condition: signed value 00113 00114 // Check for zero accelerations and velocities 00115 // 00116 if (_a < EPSILON) { 00117 std::cerr << "Trapezoidal_Trajectory warning: acceleration of " << _a << "too small. Resetting " 00118 << "acceleration to " << EPSILON << std::endl; 00119 _a = EPSILON; 00120 } 00121 if (_d < EPSILON) { 00122 std::cerr << "Trapezoidal_Trajectory warning: deceleration of " << _d << " too small. Resetting " 00123 << "deceleration to " << EPSILON << std::endl; 00124 _d = EPSILON; 00125 } 00126 if (_v_m < EPSILON) { 00127 std::cerr << "Trapezoidal_Trajectory warning: maximum velocity of " << _v_m << " too small. Resetting " 00128 << "maximum velocity to " << EPSILON << std::endl; 00129 _v_m = EPSILON; 00130 } 00131 00132 // Let q0 denote the relative position (distance) to travel 00133 // from initial velocity v_0 to zero given the absolute acceleration 00134 // value (a) and qm denote the relative position from max velocity to zero 00135 // Let q_t2_tf denote the relative position to travel from v_m to v_f. 00136 // Because this can be called every time we change our trajectory, we try 00137 // to make this algorithm efficient 00138 // 00139 double q0, q0_abs; 00140 double qm, qm_abs; 00141 double q_t2_tf; // position covered from t2 to tf 00142 00143 double sq_v_0 = cl_sqr(_v_0); // for efficency 00144 double sq_v_m = cl_sqr(_v_m); // for efficency 00145 double sq_v_f = cl_sqr(_v_f); // for efficency 00146 00147 q0_abs = 0.5 * sq_v_0 / _a; 00148 qm_abs = 0.5 * sq_v_m / _d; 00149 00150 q0 = cl_sgn(_v_0) * q0_abs; 00151 qm = cl_sgn(_v_m) * qm_abs; 00152 00153 // Compute the proper signs for the maximum velocity, acceleration 00154 // and deceleration depending on the initial velocity and final 00155 // position 00156 _v_m = cl_sgn(_p_f - q0) * fabs(_v_m); 00157 _a = cl_sgn(_v_m - _v_0) * _a; 00158 _d =-cl_sgn(_v_m - _v_f) * _d; 00159 00160 // Check if the final_oosition is the same as the initial position and the initial 00161 // velocity not equal to zero 00162 00163 if (fabs(_p_f - _p_0) < EPSILON) 00164 { 00165 _p_f += q0; 00166 _tf = fabs(_v_0/_d); 00167 _t1 = 0; 00168 _t2 = 0; 00169 _p_at_t1 = 0; 00170 _p_at_t2 = 0; 00171 } 00172 else 00173 { 00174 _t1 = (_v_m - _v_0) / _a; 00175 00176 q_t2_tf = 0.5*(sq_v_f - sq_v_m) / _d; 00177 _p_at_t1 = 0.5*(sq_v_m - sq_v_0) / _a + _p_0; 00178 _p_at_t2 = _p_f - q_t2_tf; 00179 00180 double tc = (_p_f - q_t2_tf - _p_at_t1) / _v_m; 00181 00182 // Check if constant velocity duration tc< 0 then the profile is triangular 00183 // 00184 if (tc <= 0) { 00185 _trajectory_type = TRIANGULAR; 00186 00187 // Recompute t1 to be the time when we switch acceleration to deceleration 00188 double t1a, t1b; // Two solutions to the quadratic 00189 double c = (0.5*(sq_v_f - sq_v_0) +_d*(_p_0-_p_f))/(_d - _a); 00190 double sqrt_b2_4ac = sqrt(sq_v_0 - 2*_a*c)/_a; 00191 t1a = -_v_0/_a + sqrt_b2_4ac; 00192 t1b = -_v_0/_a - sqrt_b2_4ac; 00193 00194 if (t1a < 0 && t1b > 0) 00195 _t1=t1b; 00196 else if (t1b < 0 && t1a > 0) 00197 _t1=t1a; 00198 else { 00199 std::cerr << "Trapezoidal_Trajectory error: failed to compute proper time for switching from " 00200 << "acceleration phase to deceleration phase" << std::endl; 00201 std::cerr << " p_0 = " << _p_0 << " p_f = " << _p_f << std::endl 00202 << " v_0 = " << _v_0 << " v_f = " << _v_f << std::endl 00203 << " t1a = " << t1a << " t1b = " << t1b << std::endl; 00204 } 00205 _v_m = _t1*_a + _v_0; 00206 _p_at_t1 = 0.5*(cl_sqr(_v_m) - sq_v_0) / _a + _p_0; 00207 _p_at_t2 = _p_at_t1; 00208 tc = 0; 00209 } 00210 else { 00211 _trajectory_type = TRAPEZOIDAL; 00212 } // tc <=0 00213 _t2 = _t1 + tc; 00214 _tf = _t2 - (_v_m - _v_f)/_d; 00215 _k1 = _p_at_t1 - _v_m*_t1; 00216 } // if not a stop 00217 // std::cout << *this; 00218 }
| void claraty::Trapezoidal_Trajectory::_compute_setpoint | ( | double | t, | |
| double & | position, | |||
| double & | velocity, | |||
| double & | accel | |||
| ) | [protected, virtual] |
------------------------------------------------------------------------- This function computes all the trajectory parameters (position, velocity, acceleration/deceleration for any given instance of time
- Parameters:
-
[in] t The time in seconds relative to the beginning of the trajectory for which at which you want to get the corresponding trajectory values. [out] position The position relative to the beginning of the trajectory. [out] velocity The absolute value of the velocity. [out] accel The value of the acceleration or deceleration that at the given point.
Implements claraty::Trajectory.
Definition at line 253 of file trapezoidal_trajectory.cc.
References _a, claraty::Trajectory::_compute_accel, claraty::Trajectory::_compute_position, claraty::Trajectory::_compute_velocity, _d, _k1, _p_0, _p_f, claraty::Trajectory::_started, _t1, _t2, _tf, _v_0, _v_f, and _v_m.
00257 { 00258 if (t < 0.0) 00259 { 00260 position = 0.0; 00261 velocity = 0.0; 00262 accel = 0.0; 00263 } 00264 else if (t <= _t1) 00265 { 00266 if (_compute_position) 00267 position = 0.5 * _a * cl_sqr(t) + _v_0 * t + _p_0; 00268 if (_compute_velocity) 00269 velocity = _a * t + _v_0; 00270 if (_compute_accel) 00271 accel = _a; 00272 } 00273 else if (t <= _t2) 00274 { 00275 if (_compute_position) 00276 position = _v_m * t + _k1; 00277 if (_compute_velocity) 00278 velocity = _v_m; 00279 if (_compute_accel) 00280 accel = 0.0; 00281 } 00282 else if (t <= _tf) 00283 { 00284 if (_compute_position) 00285 position = 0.5*_d*cl_sqr(t-_tf) + _v_f*(t-_tf) + _p_f; 00286 if (_compute_velocity) 00287 velocity = _d*(t-_tf) + _v_f; 00288 if (_compute_accel) 00289 accel = _d; 00290 } 00291 else 00292 { 00293 // if (n=multiple) n++; compute_profile(n); 00294 position = _p_f; 00295 velocity = 0.0; 00296 accel = 0.0; 00297 _started = false; 00298 } 00299 }
| void claraty::Trapezoidal_Trajectory::_stop | ( | ) | [protected] |
| void claraty::Trajectory::set | ( | double | final_position, | |
| double | max_velocity, | |||
| double | accel | |||
| ) | [inline, virtual, inherited] |
Various methods to input the trajectory parameters. Note that beyond the setpoint(s) velocity, and acceleration are optional
Definition at line 153 of file trajectory.h.
Referenced by claraty::Trajectory::set().
00154 { 00155 set(final_position, max_velocity, accel, accel); 00156 }
| void claraty::Trajectory::set | ( | double | final_position, | |
| double | max_velocity, | |||
| double | accel, | |||
| double | decel | |||
| ) | [inline, virtual, inherited] |
-------------------------------------------------------------------------- This function calls the trajectory compute profile using different values for acceleration and deceleration. Currently the specification of a different deceleration capability is not exported.
Definition at line 165 of file trajectory.h.
References claraty::Trajectory::_accel, claraty::Trajectory::_decel, claraty::Trajectory::_final_position, and claraty::Trajectory::_max_velocity.
00167 { 00168 // Since this trajectory can be updated during a motion, the 00169 // inital_velocity is computed first to correctly merge the two profiles 00170 00171 _final_position = final_position; // input: signed value 00172 _max_velocity = max_velocity; // input: magnitude value 00173 _accel = fabs(accel); // input: magnitude value 00174 _decel = fabs(decel); // input: magnitude value 00175 }
| void claraty::Trajectory::set | ( | Vector< double > & | positions, | |
| double | velocity, | |||
| double | acceleration | |||
| ) | [inline, virtual, inherited] |
------------------------------------------------------------------------- This function sets a multi-waypoint trajectory using the same velocity and acceleration for all the segments of the trajectory
- Parameters:
-
[in] positions A vector of positions relative to the start of the trajectory. [in] velocity The magnitude of the velocity used for each segment of the trajectory. This is an absolute value. [in] acceleration The magnitude of the acceleration used for each segment of the trajectory. This is an absolute value. [out] positions The position at the current time relative to the beginning of the trajectory.
Definition at line 192 of file trajectory.h.
References claraty::Vector< T >::get_size(), and claraty::Trajectory::set().
00193 { 00194 int size = positions.get_size(); 00195 00196 Vector<double> v(size), a(size); 00197 v = velocity; 00198 a = acceleration; 00199 00200 return set(positions, v, a); 00201 }
Here is the call graph for this function:

| double claraty::Trajectory::get_position | ( | ) | [inline, inherited] |
Various methods to get setpoint information from the trajectory functions. One can get position, velocity, acceleration, or all the above. Trajectory information can be retrieved for the current time (when no time is specified in the function arguments or it can be queried for any future time
Definition at line 210 of file trajectory.h.
References claraty::Trajectory::_timer, and claraty::Timer::get_time_elapsed().
00211 { 00212 return get_position(_timer.get_time_elapsed()); 00213 }
Here is the call graph for this function:

| double claraty::Trajectory::get_position | ( | double | time | ) | [inline, inherited] |
------------------------------------------------------------------------- This function can be used to predict the position value at current or any time in the future.
- Parameters:
-
time the time at which you want to get the corresponding position value relative to the beginning of the trajectory
- Returns:
- position the position at the given time
Definition at line 223 of file trajectory.h.
References claraty::Trajectory::_compute_accel, claraty::Trajectory::_compute_position, claraty::Trajectory::_compute_setpoint(), and claraty::Trajectory::_compute_velocity.
00224 { 00225 _compute_position = true; 00226 _compute_velocity = false; 00227 _compute_accel = false; 00228 double p, v, a; 00229 00230 _compute_setpoint(time, p, v, a); 00231 return p; 00232 }
Here is the call graph for this function:

| double claraty::Trajectory::get_velocity | ( | ) | [inline, inherited] |
------------------------------------------------------------------------- This function returns the velocity of the trajectory at the current time. This current time is measured relative to the beginning of the trajectory
- Returns:
- velocity the signed velocity at the current time relative to the beginning of the trajectory
Definition at line 243 of file trajectory.h.
References claraty::Trajectory::_timer, and claraty::Timer::get_time_elapsed().
00244 { 00245 return get_velocity(_timer.get_time_elapsed()); 00246 }
Here is the call graph for this function:

| double claraty::Trajectory::get_velocity | ( | double | time | ) | [inline, inherited] |
------------------------------------------------------------------------- This function is used to predict the velocity of the trajectory at the any given instance of time
- Parameters:
-
time the time at which you want to get the corresponding velocity value relative to the beginning of the trajectory
- Returns:
- velocity the signed velocity at the given time.
Definition at line 256 of file trajectory.h.
References claraty::Trajectory::_compute_accel, claraty::Trajectory::_compute_position, claraty::Trajectory::_compute_setpoint(), and claraty::Trajectory::_compute_velocity.
00257 { 00258 _compute_position = false; 00259 _compute_velocity = true; 00260 _compute_accel = false; 00261 double p, v, a; 00262 00263 _compute_setpoint(time, p, v, a); 00264 return v; 00265 }
Here is the call graph for this function:

| double claraty::Trajectory::get_acceleration | ( | ) | [inline, inherited] |
------------------------------------------------------------------------- This function returns the acceleration of the trajectory at the current time. This current time is measured relative to the beginning of the trajectory
- Returns:
- acceleraiton the acceleration at the current time relative to the beginning of the trajectory
Definition at line 276 of file trajectory.h.
References claraty::Trajectory::_timer, and claraty::Timer::get_time_elapsed().
00277 { 00278 return get_acceleration(_timer.get_time_elapsed()); 00279 }
Here is the call graph for this function:

| double claraty::Trajectory::get_acceleration | ( | double | time | ) | [inline, inherited] |
------------------------------------------------------------------------- This function is used to predict the acceleration of the trajectory at the any given instance of time
- Parameters:
-
time the time at which you want to get the corresponding velocity value relative to the beginning of the trajectory
- Returns:
- acceleration the signed acceleration at the given time.
Definition at line 289 of file trajectory.h.
References claraty::Trajectory::_compute_accel, claraty::Trajectory::_compute_position, claraty::Trajectory::_compute_setpoint(), and claraty::Trajectory::_compute_velocity.
00290 { 00291 _compute_position = false; 00292 _compute_velocity = false; 00293 _compute_accel = true; 00294 double p, v, a; 00295 00296 _compute_setpoint(time, p, v, a); 00297 return a; 00298 }
Here is the call graph for this function:

| void claraty::Trajectory::get_setpoint | ( | double & | position, | |
| double & | velocity, | |||
| double & | accel | |||
| ) | [inline, inherited] |
------------------------------------------------------------------------- This function returns the trajectory parameters at the current instant of time specified through the timer.
- Returns:
- position relative to the beginning of the trajectory for the current time
Definition at line 307 of file trajectory.h.
References claraty::Trajectory::_timer, and claraty::Timer::get_time_elapsed().
Referenced by claraty::Trajectory::start(), and claraty::Trajectory::stop().
00309 { 00310 return get_setpoint(_timer.get_time_elapsed(), position, velocity, accel); 00311 }
Here is the call graph for this function:

| void claraty::Trajectory::get_setpoint | ( | double | time, | |
| double & | position, | |||
| double & | velocity, | |||
| double & | accel | |||
| ) | [inline, inherited] |
------------------------------------------------------------------------- This function returns all the trajectory parameters (position, velocity, acceleration/deceleration for any given instance of time
- Parameters:
-
[in] time The time in seconds relative to the beginning of the trajectory for which at which you want to get the corresponding trajectory values. [out] position The position relative to the beginning of the trajectory. [out] velocity The absolute value of the velocity. [out] accel The value of the acceleration or deceleration that at the given point
Definition at line 330 of file trajectory.h.
References claraty::Trajectory::_compute_accel, claraty::Trajectory::_compute_position, claraty::Trajectory::_compute_setpoint(), and claraty::Trajectory::_compute_velocity.
00332 { 00333 _compute_position = true; 00334 _compute_velocity = true; 00335 _compute_accel = true; 00336 00337 _compute_setpoint(time, position, velocity, accel); 00338 return; 00339 }
Here is the call graph for this function:

| bool claraty::Trajectory::is_started | ( | ) | const [inline, inherited] |
Various methods start, stop and check whether a given trajectory is labeled as started (or active).
Definition at line 111 of file trajectory.h.
References claraty::Trajectory::_started.
Referenced by claraty::operator<<().
00111 {return _started;} // Check is trajectory is started
| void claraty::Trajectory::start | ( | ) | [inline, inherited] |
------------------------------------------------------------------------- The trajectory will start its timer only when the start command is issued. If a set command is issued while the trajectory is active, then a second start command needs to be issued for the new trajectory to override/cascade the existing trajectory
Definition at line 348 of file trajectory.h.
References claraty::Trajectory::_accel, claraty::Trajectory::_compute_profile(), claraty::Trajectory::_decel, claraty::Trajectory::_final_position, claraty::Trajectory::_max_velocity, claraty::Trajectory::_started, claraty::Trajectory::_timer, claraty::Trajectory::get_setpoint(), and claraty::Timer::reset().
00349 { 00350 if (_started) { 00351 // p_0 - initial condition: signed value 00352 // v_0 - initial condition: signed value 00353 double p_0, v_0, a_0; 00354 get_setpoint(p_0, v_0, a_0); 00355 _compute_profile(_final_position, _max_velocity, _accel, _decel, p_0, v_0); 00356 } 00357 else { 00358 // Issuing a start when the trajectory is stopped 00359 _compute_profile(_final_position, _max_velocity, _accel, _decel); 00360 } 00361 _started = true; 00362 _timer.reset(); 00363 }
Here is the call graph for this function:

| void claraty::Trajectory::stop | ( | ) | [inline, inherited] |
------------------------------------------------------------------------- This function compute a profile that will cause the trajectory to take the current velocity (v_0) and move it to 0 using the deceleration specified in the profile
Definition at line 371 of file trajectory.h.
References claraty::Trajectory::_accel, claraty::Trajectory::_compute_profile(), claraty::Trajectory::_decel, claraty::Trajectory::_started, claraty::Trajectory::_timer, claraty::Trajectory::get_setpoint(), and claraty::Timer::reset().
00372 { 00373 if (_started) { 00374 // p - initial condition: signed value 00375 // v - initial condition: signed value 00376 double p, v, a; 00377 get_setpoint(p, v, a); 00378 // To generate a deceleration profile, make the final_position be the same 00379 // as the initial_position. This will force the profile compute function 00380 // to decelerate the current trajectory to zero 00381 _compute_profile(p, v, _accel, _decel, p, v, 0.0); 00382 _started = true; 00383 } 00384 else { 00385 _started = false; 00386 } 00387 _timer.reset(); 00388 }
Here is the call graph for this function:

| void claraty::Trajectory::reset | ( | ) | [inline, inherited] |
------------------------------------------------------------------------- This function resets the timer and the _started flag
Definition at line 393 of file trajectory.h.
References claraty::Trajectory::_started, claraty::Trajectory::_timer, and claraty::Timer::reset().
Here is the call graph for this function:

| void claraty::Trajectory::advance_timer_by | ( | double | delta_time | ) | [inline, inherited] |
For testing purposes only - this will enable the generation of trajectories much faster
Definition at line 117 of file trajectory.h.
References claraty::Trajectory::_timer, and claraty::Timer::advance_time_by().
00117 {_timer.advance_time_by(delta_time);}
Here is the call graph for this function:

Friends And Related Function Documentation
| std::ostream& operator<< | ( | std::ostream & | os, | |
| const Trapezoidal_Trajectory & | t | |||
| ) | [friend] |
Member Data Documentation
double claraty::Trapezoidal_Trajectory::_v_0 [protected] |
Definition at line 74 of file trapezoidal_trajectory.h.
Referenced by _compute_profile(), and _compute_setpoint().
double claraty::Trapezoidal_Trajectory::_v_f [protected] |
initial and final velocities of a segment
Definition at line 74 of file trapezoidal_trajectory.h.
Referenced by _compute_profile(), and _compute_setpoint().
double claraty::Trapezoidal_Trajectory::_p_0 [protected] |
Definition at line 75 of file trapezoidal_trajectory.h.
Referenced by _compute_profile(), and _compute_setpoint().
double claraty::Trapezoidal_Trajectory::_p_f [protected] |
initial and final positions of a segment
Definition at line 75 of file trapezoidal_trajectory.h.
Referenced by _compute_profile(), _compute_setpoint(), and claraty::operator<<().
double claraty::Trapezoidal_Trajectory::_v_m [protected] |
maximum velocity during constant vel phase
Definition at line 76 of file trapezoidal_trajectory.h.
Referenced by _compute_profile(), _compute_setpoint(), and claraty::operator<<().
double claraty::Trapezoidal_Trajectory::_a [protected] |
Definition at line 77 of file trapezoidal_trajectory.h.
Referenced by _compute_profile(), _compute_setpoint(), and claraty::operator<<().
double claraty::Trapezoidal_Trajectory::_d [protected] |
acceleration and deceleration
Definition at line 77 of file trapezoidal_trajectory.h.
Referenced by _compute_profile(), _compute_setpoint(), and claraty::operator<<().
double claraty::Trapezoidal_Trajectory::_t1 [protected] |
the time relative to the trajectory start when the trajectory enters the constant velocity phase. It is also the time its takes for the velocity to go from its initial value v_0 to its maximum velocity value of v_m
Definition at line 81 of file trapezoidal_trajectory.h.
Referenced by _compute_profile(), _compute_setpoint(), and claraty::operator<<().
double claraty::Trapezoidal_Trajectory::_t2 [protected] |
the time at which the trajectory enters the deceleration phase
Definition at line 88 of file trapezoidal_trajectory.h.
Referenced by _compute_profile(), _compute_setpoint(), and claraty::operator<<().
double claraty::Trapezoidal_Trajectory::_tf [protected] |
the time at which the trajectory reaches its final position, which is also the duration of the segment the positions corresponding to the rise and fall times
Definition at line 91 of file trapezoidal_trajectory.h.
Referenced by _compute_profile(), _compute_setpoint(), and claraty::operator<<().
double claraty::Trapezoidal_Trajectory::_p_at_t1 [protected] |
Definition at line 98 of file trapezoidal_trajectory.h.
Referenced by _compute_profile(), and claraty::operator<<().
double claraty::Trapezoidal_Trajectory::_p_at_t2 [protected] |
Definition at line 99 of file trapezoidal_trajectory.h.
Referenced by _compute_profile(), and claraty::operator<<().
double claraty::Trapezoidal_Trajectory::_k1 [protected] |
constant used in computing position at T1 Function that computes internal profile parameters which include rise_time, fall_time, constant duration time, and the corresponding positions at these times
Definition at line 101 of file trapezoidal_trajectory.h.
Referenced by _compute_profile(), and _compute_setpoint().
For multi-segment trajectories
Definition at line 124 of file trapezoidal_trajectory.h.
Referenced by _compute_profile(), and claraty::operator<<().
Vector<double> claraty::Trapezoidal_Trajectory::_final_positions [protected] |
Definition at line 126 of file trapezoidal_trajectory.h.
Vector<double> claraty::Trapezoidal_Trajectory::_max_velocities [protected] |
Definition at line 127 of file trapezoidal_trajectory.h.
Vector<double> claraty::Trapezoidal_Trajectory::_accels [protected] |
Definition at line 128 of file trapezoidal_trajectory.h.
bool claraty::Trajectory::_started [protected, inherited] |
Definition at line 121 of file trajectory.h.
Referenced by _compute_setpoint(), claraty::Multi_Segment_Trajectory::_compute_setpoint(), claraty::Trajectory::is_started(), claraty::Trajectory::reset(), claraty::Trajectory::start(), and claraty::Trajectory::stop().
bool claraty::Trajectory::_compute_position [protected, inherited] |
Definition at line 122 of file trajectory.h.
Referenced by _compute_setpoint(), claraty::Trajectory::get_acceleration(), claraty::Trajectory::get_position(), claraty::Trajectory::get_setpoint(), and claraty::Trajectory::get_velocity().
bool claraty::Trajectory::_compute_velocity [protected, inherited] |
Definition at line 122 of file trajectory.h.
Referenced by _compute_setpoint(), claraty::Trajectory::get_acceleration(), claraty::Trajectory::get_position(), claraty::Trajectory::get_setpoint(), and claraty::Trajectory::get_velocity().
bool claraty::Trajectory::_compute_accel [protected, inherited] |
Definition at line 122 of file trajectory.h.
Referenced by _compute_setpoint(), claraty::Trajectory::get_acceleration(), claraty::Trajectory::get_position(), claraty::Trajectory::get_setpoint(), and claraty::Trajectory::get_velocity().
The documentation for this class was generated from the following files: