Skip to content

Commit

Permalink
add twist.linear.z calculation to align frame controller
Browse files Browse the repository at this point in the history
  • Loading branch information
eminmeydanoglu committed Jan 29, 2025
1 parent f7cfad7 commit e491685
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion auv_control/auv_control/scripts/align_frame_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def compute_cmd_vel(self, trans, rot):
# Set linear velocities based on translation differences
twist.linear.x = self.constrain(trans[0] * kp, self.max_linear_velocity)
twist.linear.y = self.constrain(trans[1] * kp, self.max_linear_velocity)

twist.linear.z = self.constrain(trans[2] * kp, self.max_linear_velocity)
# Convert quaternion to Euler angles and set angular velocity
_, _, yaw = euler_from_quaternion(rot)
twist.angular.z = self.constrain(yaw * angle_kp, self.max_angular_velocity)
Expand Down

0 comments on commit e491685

Please sign in to comment.