# OSQP_test **Repository Path**: wenb11/osqp_test ## Basic Information - **Project Name**: OSQP_test - **Description**: 实现5次多项式平滑路径 - **Primary Language**: C++ - **License**: BSD-3-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 16 - **Created**: 2022-01-29 - **Last Updated**: 2024-04-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # OSQP test 主要是自己看osqp进行约束拟合所用的debug分支 博文解释:[https://www.cnblogs.com/kin-zhang/p/15532655.html](https://www.cnblogs.com/kin-zhang/p/15532655.html) ## 使用方式 ```bash git clone https://gitee.com/kin_zhang/osqp_test.git ``` 然后使用vscode内置的cmake_tool即可,比如gif所示: ![](image/debugdemo.gif) how to use cmake tool to debug, follow the youtube link: https://youtu.be/Rfj40xW9q6w 如果只想看图,可以直接 ```bash mkdir build cd build cmake .. make ``` 编译过程报错,找不到numpy文件: ![image-20230317164736148](images/image-20230317164736148.png) 解决方法,安装第三方库: ```shell sudo apt-get install python-numpy ``` 然后运行 ```bash ./spile2d_test ``` 便能看到这样的图形: ![](image/2dresult.png) 几点说明:红色是直接五次曲线生成的 没有添加限制,蓝色为添加了限制的osqp生成的,从图二可以看出他们的Curvature 曲率还是差距很大的,红色的曲率更小 在实际运行过程中也更好