| | |
| | | gps_time_s=_ascii_timestamp_to_seconds(ctrl.timestamp_ms), |
| | | source_rank=1, |
| | | ) |
| | | self._apply_ascii_control(ctrl) |
| | | handled = True |
| | | pose = decode_pose_status(msg) |
| | | if pose and self.on_pose_status: |
| | |
| | | # ------------------------------------------------------------------ # |
| | | # 日志工具 |
| | | # ------------------------------------------------------------------ # |
| | | def _apply_ascii_control(self, ctrl: ControlStatus): |
| | | with self._state_lock: |
| | | self._target_linear = ctrl.forward_mps |
| | | self._target_angular = ctrl.turn_rate |
| | | if self.on_control: |
| | | self.on_control(ctrl.forward_mps, ctrl.turn_rate) |
| | | |
| | | def _log_ascii( |
| | | self, |
| | | prefix: str, |