# smart_car_follower **Repository Path**: labgps/smart_car_follower ## Basic Information - **Project Name**: smart_car_follower - **Description**: 光电传感三轮差速小车巡线控制的ROS仿真,created by 许德新,202606.12 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2026-06-12 - **Last Updated**: 2026-06-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # smart_car_follower created by HEU401 许德新 ROS1 Noetic + Gazebo + RViz 三轮小车五路光电巡线仿真项目。 > 完整功能包位于 [`src/three_wheel_line_follower/`](src/three_wheel_line_follower/),详细文档见其 [README](src/three_wheel_line_follower/README.md)。 --- ## 快速开始 ```bash # 克隆项目 git clone https://gitee.com/labgps/smart_car_follower.git cd smart_car_follower # 编译(ROS1 Noetic 环境) catkin_make source devel/setup.bash # 启动仿真(默认启动 Gazebo + RViz + Web 调参面板) roslaunch three_wheel_line_follower demo.launch ``` 启动后终端会提示: ``` HTML-style line follower tuner is running: http://127.0.0.1:8090/ ``` ## Web 调参面板 在浏览器中打开 http://127.0.0.1:8090/ 即可使用。 > 如果浏览器不在机器人那台电脑上,而是在另一台电脑上,就打开 `http://<机器人电脑IP>:8090/` 新版默认**关闭 Tkinter 面板**,改用 **Web 面板**: ```bash roslaunch three_wheel_line_follower demo.launch tuner_gui:=false tuner_web:=true ``` 也可以手动指定端口: ```bash roslaunch three_wheel_line_follower demo.launch tuner_gui:=false tuner_web:=true tuner_port:=8090 ``` ### 可调参数 | 类别 | 参数 | |---|---| | PID | Kp / Ki / Kd / P / PD / PI / PID 模式切换 | | 速度控制 | 基础速度、弯道最低速度、弯道降速 | | 传感器 | 黑线宽度、传感器前移距离、固定阈值、自适应阈值、有效对比度、ADC 噪声 | | 丢线恢复 | 丢线恢复策略、丢线前进/倒车/转向参数 | ### 操作按钮 - 启动巡线 - 暂停停车 - 重置仿真 - 清空 PID - **预设参数**:默认稳态、慢速保守、快速激进、弯道稳定、找线强化、P 过大震荡 ### 仅跑仿真,不启动任何调参面板 ```bash roslaunch three_wheel_line_follower demo.launch tuner_gui:=false tuner_web:=false ``` ## 环境依赖 - Ubuntu 20.04 + ROS Noetic - Gazebo、RViz、xacro 等 ```bash sudo apt update sudo apt install -y \ ros-noetic-desktop-full \ ros-noetic-gazebo-ros-pkgs \ ros-noetic-xacro \ ros-noetic-robot-state-publisher \ ros-noetic-joint-state-publisher \ ros-noetic-rviz ``` 更多详情(话题列表、参数调优、常见问题等)请参见 [功能包 README](src/three_wheel_line_follower/README.md)。