# sunray-codestyle **Repository Path**: yundrone_sunray2023/sunray-codestyle ## Basic Information - **Project Name**: sunray-codestyle - **Description**: No description available - **Primary Language**: Unknown - **License**: AGPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-02-03 - **Last Updated**: 2026-02-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # sunray_uav_control ![版本](https://img.shields.io/badge/version-0.1.0-blue?style=for-the-badge) ![许可证](https://img.shields.io/badge/license-AGPL--3.0-orange?style=for-the-badge) 版本: 0.1.0 遵循开发规范的 ROS1 无人机控制参考包。仅为风格示例,不保证运行。 ## 目录结构 - `include/` 公有头文件 - `src/` 源码 - `scripts/` 工具脚本 - `config/` 配置 - `launch/` 启动文件 - `test/` 测试 - `docs/` 文档 ## 构建(catkin) ```bash cd /path/to/catkin_ws 省略 ``` ## 运行示例 ```bash roslaunch 省略 ``` ## 参数 见 `config/flight_controller.yaml`。 ## 编译数据库(clangd) `CMakeLists.txt` 已启用 `CMAKE_EXPORT_COMPILE_COMMANDS`。 在 catkin 工作空间构建后,编译数据库位于工作空间的 `build/compile_commands.json`。 如需让 clangd 直接识别,可在工作区设置其路径或手动建立链接。 ## 文档生成(Doxygen) ```bash doxygen docs/Doxyfile ``` 入口文件: `docs/doxygen_output/html/index.html`,使用浏览器打开查看 ## 格式化(CLI) ### C++(CLI) ```bash clang-format -style=file -i src/*.cpp include/sunray_uav_control/*.hpp ``` ### Python(CLI) ```bash ruff format . ruff check . ``` ## 格式化(VSCode) 默认情况下,clangd 会自动读取仓库根目录的 `.clang-format`,Ruff 会读取 `pyproject.toml`,**无需额外配置**。 只有在识别异常时,才建议手动配置。 ### C++(仅识别异常时) ```json { "editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd", "[cpp]": { "editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd" }, "[c]": { "editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd" }, "files.associations": { "*.h": "cpp", "*.hpp": "cpp", "*.hh": "cpp", "*.hxx": "cpp", "*.c": "c", "*.cc": "cpp", "*.cpp": "cpp", "*.cxx": "cpp", "*.ipp": "cpp", "*.inl": "cpp" }, "clangd.arguments": ["--fallback-style=none"] } ``` ### Python(仅识别异常时) ```json { "[python]": { "editor.defaultFormatter": "charliermarsh.ruff", "editor.formatOnSave": true }, "ruff.format.enable": true, "ruff.lint.enable": true } ``` ## 商业许可 本软件提供独立的商业闭源许可。商业条款由 Sunray Dev Team 以书面协议形式提供。 联系邮箱: