1
0
forked from zbw/yiliao2026
Orange 779b32362a Please enter the commit message for your changes. Lines starting
with '#' will be ignored, and an empty message aborts the commit.

On branch master
Your branch is ahead of 'origin/master' by 2 commits.
  (use "git push" to publish your local commits)

Changes to be committed:
	modified:   .gitignore
	modified:   README.md
	new file:   bashes/auto-wifi-connect.service
	new file:   bashes/auto-wifi-connect.sh
	deleted:    keyboard_control.py
	new file:   my_model/image.png
	new file:   path_follower_demo.py
	new file:   scripts/PIDtracking.py
	new file:   scripts/__pycache__/publish_sine_path.cpython-310.pyc
	new file:   scripts/publish_sine_path.py
	modified:   src/gc_navigation2_slamtoolbox/params/gc_navigation_slam.yaml
	modified:   src/gc_navigation2_slamtoolbox/params/gc_navigation_slam.yaml.bak
	new file:   src/gc_navigation2_slamtoolbox/params/gc_navigation_slam.yaml.bak2
	modified:   src/origincar_base/config/ekf.yaml
	new file:   src/origincar_base/config/ekf.yaml.bak
	modified:   src/origincar_base/launch/base_serial.launch.py
	new file:   src/origincar_base/launch/base_serial.launch.py.bak
	modified:   src/origincar_base/launch/origincar_bringup.launch.py
	new file:   src/past_control/CMakeLists.txt
	new file:   src/past_control/config/past_control.yaml
	new file:   src/past_control/include/past_control/tools.h
	new file:   src/past_control/launch/past_control.launch.py
	new file:   src/past_control/msg/Obstacle.msg
	new file:   src/past_control/msg/ObstacleArray.msg
	new file:   src/past_control/package.xml
	new file:   src/past_control/src/lane_follower_node.cpp
	new file:   src/past_control/src/obstacle_detector_node.cpp
	new file:   src/past_control/src/racing_orchestrator.cpp
	new file:   src/planner/CMakeLists.txt
	new file:   src/planner/config/planner.yaml
	new file:   src/planner/launch/planner.launch.py
	new file:   src/planner/package.xml
	new file:   src/planner/src/planner_version.cpp
	modified:   src/qr_detection/src/qr_dete_depth.cpp
	new file:   src/racing_control/CMakeLists.txt
	new file:   src/racing_control/include/racing_control/racing_control.hpp
	new file:   src/racing_control/package.xml
	new file:   src/racing_control/src/racing_control.cpp
	modified:   src/vlm_detect/setup.py
	new file:   src/vlm_detect/vlm_detect/__pycache__/__init__.cpython-310.pyc
	new file:   src/vlm_detect/vlm_detect/__pycache__/tts_node.cpython-310.pyc
	new file:   src/vlm_detect/vlm_detect/test_publisher.py
	new file:   src/vlm_detect/vlm_detect/tts_node.py
	modified:   src/vlm_detect/vlm_detect/vlm_node.py
	new file:   tools/measure_turning_radius.py
	new file:   tools/set_volume.py
	new file:   tools/udp_to_cmdvel.py
	new file:   tools/windows_keyboard_control.py
	new file:   vlm_server.py
	new file:   "\350\260\203\350\257\225\350\256\260\345\275\225.Assets/1.png"
	renamed:    "\350\260\203\350\257\225\350\256\260\345\275\225.log" -> "\350\260\203\350\257\225\350\256\260\345\275\225.md"
2026-06-22 17:16:45 +08:00
2026-06-13 21:57:01 +08:00

智慧医疗2026年代码仓库

一、文件夹说明

dependencies

dependencies.txt存储依赖名称

src

存放源代码

bashes

自动脚本的存放路径




二、关于雷达驱动自动配置脚本的说明

1. 配置说明:在设备上配置开机自启动(仅使用雷达的情况直接看第二点)

  1. 放到固定位置并授权
    sudo cp 你的脚本路径 /usr/local/bin/radar-driver-switch.sh
    sudo chmod +x /usr/local/bin/radar-driver-switch.sh
    sudo chown root:root /usr/local/bin/radar-driver-switch.sh
    
  2. 创建 systemd 服务文件
    sudo vim /etc/systemd/system/radar-driver-switch.service
    
    编辑内容:
    [Unit]
    Description=雷达驱动自动切换程序
    After=sysfs.target udev.target systemd-udevd.service
    Before=multi-user.target
    
    [Service]
    Type=oneshot
    ExecStart=/usr/local/bin/radar-driver-switch.sh
    User=root
    Group=root
    StandardOutput=journal+console
    StandardError=journal+console
    
    [Install]
    WantedBy=multi-user.target
    
  3. 应用开机自启
    sudo systemctl daemon-reload
    sudo systemctl enable radar-driver-switch.service
    
  4. 测试与debug
    • 测试一次
      sudo systemctl start radar-driver-switch.service
      
    • 查看状态 / 日志(排查必用)
      sudo systemctl status radar-driver-switch.service
      
    • 看 dmesg 日志
      dmesg | grep 雷达驱动自动切换程序
      

特别说明

  1. 关于退出码对应的情况详见sh文件开头
  2. 日志输出在/dev/kmsg文件中,使用dmesg | grep 雷达驱动自动切换程序命令即可查看

2. 使用说明:

  1. 设备开机自动启动脚本连接雷达。若开机时雷达与设备没有物理连接,则需要手动启动脚本连接雷达

  2. 查看雷达是否物理连接

    lsusb
    

    返回的数据中,如果有 ID 1a86:55d4 QinHeng Electronics USB Single Serial,则物理连接成功。

  3. 查看是否成功驱动雷达

    ls /dev/tty*
    

    看返回数据,默认串口连接设备为ttyACM*,名为ttyACM0的设备是IMU如果存在ttyACM1,则雷达连接失败;

    如果出现ttyCH340,则说明雷达设备驱动成功




三、指令

启动雷达: ros2 launch lslidar_driver lsn10_launch.py open new terminal

ros2 topic pub -1 /lslidar_order std_msgs/msg/Int8 data:\ 1\ 		# (open radar)
ros2 topic pub -1 /lslidar_order std_msgs/msg/Int8 data:\ 0\ 		# (close radar)

四、其它说明

我设置了一些自定义指令,方便终端调试:

rosbuild <package_name> # 编译指定包
build_debug <package_name> # 以调试模式编译指定包
foxglove # 启动foxbridge

启动键盘控制: ros2 run teleop_twist_keyboard teleop_twist_keyboard

运行二维码检测(无缓存版): ros2 run qr_detection qr_dete_depth_node --ros-args -p use_buffer:=false

五、tools 工具使用

measure_turning_radius.py:功能为测试实际转向角度与输入的关系。启动后,会在/turning_radius_data文件夹下生成测试数据 set_volume.py功能为设置USB声卡的音量修改第七行或直接python3 set_volume.py 80即可更改为80或任何你想要的数字 windows_keyboard_control.py用于Windows端发送Twist控制命令键盘遥控 udp_to_cmdvel.py:用于板端接收键盘遥控命令(与上一个文件联动)

Description
派生
Readme 36 MiB
Languages
Python 45.6%
C++ 45%
Shell 3.4%
CMake 3.3%
HTML 2.3%
Other 0.3%