Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gazebo_plugins/src/gazebo_ros_diff_drive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ void GazeboRosDiffDrivePrivate::UpdateOdometryEncoder(const gazebo::common::Time
pose_encoder_.theta += dtheta;

double w = dtheta / seconds_since_last_update;
double v = sqrt(dx * dx + dy * dy) / seconds_since_last_update;
double v = sqrt(dx * dx + dy * dy) / seconds_since_last_update * ((ssum > 0) ? +1.0 : -1.0);

tf2::Quaternion qt;
tf2::Vector3 vt;
Expand Down