Skip to content

Commit

Permalink
Replaced rear with center curvature
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg-Olegovich committed Apr 11, 2024
1 parent edaf850 commit 08aa94d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/hardware_node/hardware_node/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def _command_callback(self, msg: Control):
self._log.debug(f"Center curvature: {msg.curvature:.2f}")
self._log.debug(f"Rear curvature: {twist.curvature:.2f}")
self._teensy.push(steering.left.radians, steering.right.radians)
self._cache.target_rear_curvature = twist.curvature
self._cache.target_curvature = msg.curvature

def _push_status(self):
armed = self._axis.current_state != odrive.enums.AXIS_STATE_IDLE
Expand Down Expand Up @@ -188,7 +188,7 @@ def _push_telemetry(self):

rps = self._axis.encoder.vel_estimate
vel = self._model.motor_rps_to_linear_velocity(rps)
curv = self._cache.target_rear_curvature
curv = self._cache.target_curvature
twist = pymodel.Twist(vel, curv)
twist = self._model.base_to_rear_twist(twist)
steering = self._model.rear_twist_to_steering(twist)
Expand Down

0 comments on commit 08aa94d

Please sign in to comment.