Skip to content

Commit

Permalink
Rename convert method
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich committed May 24, 2024
1 parent 2d76c44 commit 4b7647d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,11 @@ class SteeringOdometry
void integrate_fk(const double v_bx, const double omega_bz, const double dt);

/**
* \brief Calculates steering angle from the desired translational and rotational velocity
* \brief Calculates steering angle from the desired twist
* \param v_bx Linear velocity of the robot in x_b-axis direction
* \param omega_bz Angular velocity of the robot around x_z-axis
*/
double convert_trans_rot_vel_to_steering_angle(const double v_bx, const double omega_bz);
double convert_twist_to_steering_angle(const double v_bx, const double omega_bz);

/**
* \brief Reset linear and angular accumulators
Expand Down
4 changes: 2 additions & 2 deletions steering_controllers_library/src/steering_odometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void SteeringOdometry::set_velocity_rolling_window_size(size_t velocity_rolling_

void SteeringOdometry::set_odometry_type(const unsigned int type) { config_type_ = type; }

double SteeringOdometry::convert_trans_rot_vel_to_steering_angle(double v_bx, double omega_bz)
double SteeringOdometry::convert_twist_to_steering_angle(double v_bx, double omega_bz)
{
if (omega_bz == 0 || v_bx == 0)
{
Expand All @@ -223,7 +223,7 @@ std::tuple<std::vector<double>, std::vector<double>> SteeringOdometry::get_comma
}
else
{
phi = SteeringOdometry::convert_trans_rot_vel_to_steering_angle(v_bx, omega_bz);
phi = SteeringOdometry::convert_twist_to_steering_angle(v_bx, omega_bz);
Ws = v_bx / (wheel_radius_ * std::cos(steer_pos_));
}

Expand Down

0 comments on commit 4b7647d

Please sign in to comment.