Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzheqie committed Apr 23, 2021
1 parent 2a3559c commit cbcee14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions ranger_base/include/ranger_base/ranger_params.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ struct RangerParams {
static constexpr double max_linear_speed = 1.5; // in m/s
static constexpr double max_angular_speed = 0.7853; // in rad/s
static constexpr double max_speed_cmd = 10.0; // in rad/s
static constexpr double max_steer_angle =
0.698; // in rad, inner wheel
static constexpr double max_steer_angle_central = 0.698; // max central angle
// max central angle: pi/2
static constexpr double max_steer_angle_central = 1.5708;
};
} // namespace westonrobot
#endif // RANGER_PARAMS_HPP
2 changes: 1 addition & 1 deletion ranger_base/src/ranger_messenger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void RangerROSMessenger::PublishStateToROS() {
phi = ConvertInnerAngleToCentral(phi_i);
a_v = state.motion_state.linear_velocity / r;
x_v = l_v * std::cos(phi);
if (l_v >= 0.0001) {
if (l_v >= 0.0) {
y_v = l_v * std::sin(phi);
} else {
y_v = l_v * std::sin(-phi);
Expand Down

0 comments on commit cbcee14

Please sign in to comment.