jsk-ros-pkg / jsk_3rdparty

42 stars 60 forks source link

[OSQP] add a wrapper package for OSQP, which is a library to solve QP #442

Closed tongtybj closed 1 year ago

tongtybj commented 1 year ago

What is this

Catkinize the external library of OSQP.

k-okada commented 1 year ago

something wrong on https://github.com/jsk-ros-pkg/jsk_3rdparty/actions/runs/4365361085/jobs/7635927447

2023-03-08T15:00:16.3160184Z 
2023-03-08T15:00:16.3160295Z                                                                                 
2023-03-08T15:00:16.3160648Z [pgm_learner:make] Scanning dependencies of target _pgm_learner_generate_messages_check_deps_GraphStructure
2023-03-08T15:00:16.3160945Z 
2023-03-08T15:00:16.3160950Z 
2023-03-08T15:00:16.3161063Z                                                                                 
2023-03-08T15:00:16.3161390Z [pgm_learner:make] [  0%] Built target _pgm_learner_generate_messages_check_deps_GraphStructure
2023-03-08T15:00:16.3161596Z 
2023-03-08T15:00:16.3161600Z 
2023-03-08T15:00:16.3161710Z                                                                                 
2023-03-08T15:00:16.3162080Z [pgm_learner:make] Scanning dependencies of target _pgm_learner_generate_messages_check_deps_ConditionalProbability
2023-03-08T15:00:16.3162339Z 
2023-03-08T15:00:16.3162343Z 
2023-03-08T15:00:16.3162457Z                                                                                 
2023-03-08T15:00:16.3162804Z [pgm_learner:make] [  0%] Built target _pgm_learner_generate_messages_check_deps_ConditionalProbability
2023-03-08T15:00:16.3163026Z 
2023-03-08T15:00:16.3163043Z 
2023-03-08T15:00:16.3163142Z                                                                                 
2023-03-08T15:00:16.6452156Z 
2023-03-08T15:00:16.6452164Z 
2023-03-08T15:00:16.6452554Z                                                                                 
2023-03-08T15:00:16.6453398Z [osqp:make] CMake Error at /github/home/ros/ws_jsk_3rdparty/build/osqp/osqp-prefix/tmp/osqp-gitclone.cmake:49 (message):
2023-03-08T15:00:16.6453668Z 
2023-03-08T15:00:16.6453771Z                                                                                 
2023-03-08T15:00:16.6454221Z [osqp:make]   Failed to checkout tag: 'v0.6.0'
2023-03-08T15:00:16.6454384Z 
2023-03-08T15:00:16.6454517Z                                                                                 
2023-03-08T15:00:16.6454743Z [osqp:make] 
2023-03-08T15:00:16.6454850Z 
2023-03-08T15:00:16.6454966Z                                                                                 
2023-03-08T15:00:16.6455185Z [osqp:make] 
2023-03-08T15:00:16.6465048Z 
2023-03-08T15:00:16.6465056Z 
2023-03-08T15:00:16.6465479Z                                                                                 
2023-03-08T15:00:16.6466069Z [osqp:make] make[2]: *** [osqp-prefix/src/osqp-stamp/osqp-download] Error 1
2023-03-08T15:00:16.6469049Z 
2023-03-08T15:00:16.6469081Z 
2023-03-08T15:00:16.6469374Z                                                                                 
2023-03-08T15:00:16.6469694Z [osqp:make] make[1]: *** [CMakeFiles/osqp.dir/all] Error 2
2023-03-08T15:00:16.6490731Z 
2023-03-08T15:00:16.6490741Z 
2023-03-08T15:00:16.6490957Z                                                                                 
2023-03-08T15:00:16.6491252Z [osqp:make] make: *** [all] Error 2
2023-03-08T15:00:16.6495945Z [pgm_learner:make] Scanning dependencies of target _pgm_learner_generate_messages_check_deps_LinearGaussianParameterEstimation
2023-03-08T15:00:16.6496275Z 
2023-03-08T15:00:16.6496280Z 
2023-03-08T15:00:16.6496400Z                                                                                 
2023-03-08T15:00:16.6496797Z [pgm_learner:make] [  0%] Built target _pgm_learner_generate_messages_check_deps_LinearGaussianParameterEstimation
2023-03-08T15:00:16.6497070Z 

you can download source tree from https://github.com/osqp/osqp/archive/refs/tags/v0.6.0.tar.gz. may be this is faster than git clone.

Naoki-Hiraoka commented 1 year ago

indigoではcmakeのバージョンが古いので、osqpがビルドできないようです。(v0.6.0、v0.6.2両方とも)

 [osqp:make]   CMake 3.2 or higher is required.  You are running version 2.8.12.2

https://github.com/osqp/osqp/blob/f9fc23d3436e4b17dd2cb95f70cfa1f37d122c24/CMakeLists.txt#L2

indigoではビルドできなくていい気がします。

tongtybj commented 1 year ago

build failed because of the CMake version:

  [osqp:make] CMake Error at CMakeLists.txt:2 (cmake_minimum_required):
  [osqp:make]   CMake 3.2 or higher is required.  You are running version 2.8.12.2

Any suggertion to solve this kind of problem?

knorth55 commented 1 year ago

there are two solutions.

  1. apply patch during build
  2. skip build indigo in CMakelists

both of them are done in zdepth, so please check it. I think it is better to apply patch first if it is only cmake version problem.

https://github.com/jsk-ros-pkg/jsk_3rdparty/blob/master/3rdparty/zdepth/CMakeLists.txt