Skip to content

Commit

Permalink
mecanum: update current position in main file
Browse files Browse the repository at this point in the history
  • Loading branch information
chfriedrich98 committed Dec 2, 2024
1 parent a1b68fc commit ff55313
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/rover_mecanum/RoverMecanum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ void RoverMecanum::updateSubscriptions()
if (_vehicle_local_position_sub.updated()) {
vehicle_local_position_s vehicle_local_position{};
_vehicle_local_position_sub.copy(&vehicle_local_position);
_curr_pos_ned = Vector2f(vehicle_local_position.x, vehicle_local_position.y);
Vector3f velocity_in_local_frame(vehicle_local_position.vx, vehicle_local_position.vy, vehicle_local_position.vz);
Vector3f velocity_in_body_frame = _vehicle_attitude_quaternion.rotateVectorInverse(velocity_in_local_frame);
// Apply threshold to the velocity measurement to cut off measurement noise when standing still
Expand Down

0 comments on commit ff55313

Please sign in to comment.