python/hitl/run_sim.py
@@ -339,14 +339,27 @@
        self.view.sceneMouseMoved.connect(self._update_mouse_pos)
        left_layout.addWidget(self.view, stretch=1)
        # Bottom bar for map controls
        bottom_bar = QtWidgets.QWidget()
        bottom_layout = QtWidgets.QHBoxLayout(bottom_bar)
        bottom_layout.setContentsMargins(0, 4, 0, 0)
        self.follow_checkbox = QtWidgets.QCheckBox("自动跟随车辆")
        self.follow_checkbox.setChecked(True)
        self.follow_checkbox.toggled.connect(self._on_follow_toggled)
        left_layout.addWidget(self.follow_checkbox, alignment=QtCore.Qt.AlignLeft)
        bottom_layout.addWidget(self.follow_checkbox)
        self.clear_trail_btn = QtWidgets.QPushButton("清除轨迹")
        self.clear_trail_btn.clicked.connect(self._clear_trail)
        bottom_layout.addWidget(self.clear_trail_btn)
        bottom_layout.addStretch(1)
        self.mouse_pos_label = QtWidgets.QLabel("E: 0.00  N: 0.00")
        self.mouse_pos_label.setStyleSheet("color:#222; background:rgba(255,255,255,190); padding:2px 6px; border-radius:4px;")
        left_layout.addWidget(self.mouse_pos_label, alignment=QtCore.Qt.AlignRight)
        bottom_layout.addWidget(self.mouse_pos_label)
        left_layout.addWidget(bottom_bar)
        layout.addWidget(left_panel, stretch=3)
@@ -430,12 +443,13 @@
        status_layout = QtWidgets.QVBoxLayout(status_group)
        self.info_label = QtWidgets.QLabel("等待数据...")
        self.info_label.setAlignment(QtCore.Qt.AlignTop | QtCore.Qt.AlignLeft)
        self.info_label.setStyleSheet("font-family: Consolas, 'Courier New'; font-size: 12px;")
        self.info_label.setStyleSheet("font-family: Consolas, 'Courier New'; font-size: 14px;")
        info_scroll = QtWidgets.QScrollArea()
        info_scroll.setWidgetResizable(True)
        info_scroll.setWidget(self.info_label)
        info_scroll.setMinimumHeight(500)  # 进一步增加最小高度
        status_layout.addWidget(info_scroll)
        right_layout.addWidget(status_group, stretch=1)
        right_layout.addWidget(status_group, stretch=4)  # 进一步增加布局权重,从2增加到4
        # Stack table
        stack_group = QtWidgets.QGroupBox("堆栈监测")
@@ -556,6 +570,12 @@
        if checked and self.pose_status:
            self.view.centerOn(self.pose_status.east, -self.pose_status.north)
    def _clear_trail(self):
        """清除地图上的轨迹点"""
        self.trail_points = []
        # Update scene to remove trail
        self._update_scene()
    def _update_mouse_pos(self, east: float, scene_y: float):
        north = -scene_y
        self.mouse_pos_label.setText(f"E: {east: .2f}  N: {north: .2f}")
@@ -774,6 +794,7 @@
            (height if height > 0 else 1.0) + pad_y * 2.0,
        )
        self.scene.setSceneRect(scene_rect)
        self.view.fitInView(scene_rect, QtCore.Qt.KeepAspectRatio)
    def _append_log(self, text: str):
        self.log_view.appendPlainText(text)