Function calc_vel_profile

Function Documentation

vector<float> calc_vel_profile(const vector<vector<double>> &ax_max_machines, const vector<double> &kappa, const vector<double> &el_lengths, double drag_coeff, double m_veh, const vector<vector<double>> &ggv = vector<vector<double>>(), double v_max = numeric_limits<double>::quiet_NaN(), double dyn_model_exp = 1.0, const vector<double> &mu = vector<double>(), double v_start = numeric_limits<double>::quiet_NaN(), double v_end = numeric_limits<double>::quiet_NaN(), int filt_window = 0)

Calculate the speed profile as a vector<float>

Parameters:
  • ax_max_machines – longitudinal acceleration limits by the electrical motors: [vx, ax_max_machines]. Velocity in m/s, accelerations in m/s2. They should be handed in without considering drag resistance, i.e. simply by calculating F_x_drivetrain / m_veh

  • kappa – curvature profile of given trajectory in rad/m (always unclosed).

  • el_lengths – element lengths (distances between coordinates) of given trajectory.

  • closed – flag to set if the velocity profile must be calculated for a closed or unclosed trajectory.

  • drag_coeff – drag coefficient including all constants: drag_coeff = 0.5 * c_w * A_front * rho_air

  • m_veh – vehicle mass in kg.

  • ggv – ggv-diagram to be applied: [vx, ax_max, ay_max]. Velocity in m/s, accelerations in m/s2.

  • v_max – Maximum longitudinal speed in m/s (optional if ggv is supplied, taking the minimum of the fastest velocities covered by the ggv and ax_max_machines arrays then).

  • dyn_model_exp – exponent used in the vehicle dynamics model (usual range [1.0,2.0]).

  • mu – friction coefficients (always unclosed).

  • v_start – start velocity in m/s (used in unclosed case only).

  • v_end – end velocity in m/s (used in unclosed case only).

  • filt_window – filter window size for moving average filter (must be odd).