Skip to content

Commit e7a29a6

Browse files
authored
Merge pull request #172 from ethz-adrl/fix/use_cmake_to_install_hpipm
Forward to hpipm version 0.1.3, use cmake to install blasfeo and hpipm.
2 parents b4684fe + 7116c8a commit e7a29a6

File tree

2 files changed

+49
-39
lines changed

2 files changed

+49
-39
lines changed

ct/install_hpipm.sh

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,30 @@
11
#!/bin/bash
2+
set -x #echo on
3+
4+
## remove existing installation of blasfeo/hpipm
5+
rm -rf /opt/blasfeo
6+
rm -rf /opt/hpipm
27

38
## get blasfeo
49
echo "Now installing blasfeo, using a specific commit/tag (!)"
510
cd /tmp
11+
rm -rf blasfeo/
612
git clone https://github.com/giaf/blasfeo.git
713
cd /tmp/blasfeo
8-
git checkout cc90e14 # we currently are on this commit.
9-
make static_library
10-
sudo make install_static
14+
git checkout 0.1.2
15+
mkdir -p build && cd build
16+
cmake ..
17+
make
18+
sudo make install
1119

1220
## get hpipm
1321
echo "Now installing hpipm, using a specific commit/tag (!)"
1422
cd /tmp
23+
rm -rf hpipm/
1524
git clone https://github.com/giaf/hpipm.git
1625
cd /tmp/hpipm
17-
git checkout 5d9909f # we currently are on this commit.
18-
make static_library
19-
make examples
20-
sudo make install_static
26+
git checkout 0.1.3
27+
mkdir -p build && cd build
28+
cmake ..
29+
make
30+
sudo make install

ct_optcon/examples/CMakeLists.txt

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
set(CT_OPTCON_EXAMPLE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
22
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/exampleDir.h.in ${CMAKE_CURRENT_SOURCE_DIR}/exampleDir.h)
33

4-
add_executable(ex_ConstraintOutput ConstraintExampleOutput.cpp)
5-
target_link_libraries(ex_ConstraintOutput ct_optcon)
6-
list(APPEND optcon_ex_TARGETS ex_ConstraintOutput)
4+
# add_executable(ex_ConstraintOutput ConstraintExampleOutput.cpp)
5+
# target_link_libraries(ex_ConstraintOutput ct_optcon)
6+
# list(APPEND optcon_ex_TARGETS ex_ConstraintOutput)
77

8-
add_executable(ex_NLOC NLOC.cpp)
9-
target_link_libraries(ex_NLOC ct_optcon)
10-
list(APPEND optcon_ex_TARGETS ex_NLOC)
8+
# add_executable(ex_NLOC NLOC.cpp)
9+
# target_link_libraries(ex_NLOC ct_optcon)
10+
# list(APPEND optcon_ex_TARGETS ex_NLOC)
1111

12-
add_executable(ex_NLOC_MPC NLOC_MPC.cpp)
13-
target_link_libraries(ex_NLOC_MPC ct_optcon)
14-
list(APPEND optcon_ex_TARGETS ex_NLOC_MPC)
12+
# add_executable(ex_NLOC_MPC NLOC_MPC.cpp)
13+
# target_link_libraries(ex_NLOC_MPC ct_optcon)
14+
# list(APPEND optcon_ex_TARGETS ex_NLOC_MPC)
1515

16-
add_executable(ex_KalmanFiltering KalmanFiltering.cpp)
17-
target_link_libraries(ex_KalmanFiltering ct_optcon)
18-
list(APPEND optcon_ex_TARGETS ex_KalmanFiltering)
16+
# add_executable(ex_KalmanFiltering KalmanFiltering.cpp)
17+
# target_link_libraries(ex_KalmanFiltering ct_optcon)
18+
# list(APPEND optcon_ex_TARGETS ex_KalmanFiltering)
1919

20-
add_executable(ex_KalmanDisturbanceFiltering KalmanDisturbanceFiltering.cpp)
21-
target_link_libraries(ex_KalmanDisturbanceFiltering ct_optcon )
22-
list(APPEND optcon_ex_TARGETS ex_KalmanDisturbanceFiltering)
20+
# add_executable(ex_KalmanDisturbanceFiltering KalmanDisturbanceFiltering.cpp)
21+
# target_link_libraries(ex_KalmanDisturbanceFiltering ct_optcon )
22+
# list(APPEND optcon_ex_TARGETS ex_KalmanDisturbanceFiltering)
2323

24-
add_executable(ex_Nlp_2D nlp/Nlp2D.cpp)
25-
target_link_libraries(ex_Nlp_2D ct_optcon)
26-
list(APPEND optcon_ex_TARGETS ex_Nlp_2D)
24+
# add_executable(ex_Nlp_2D nlp/Nlp2D.cpp)
25+
# target_link_libraries(ex_Nlp_2D ct_optcon)
26+
# list(APPEND optcon_ex_TARGETS ex_Nlp_2D)
2727

28-
add_executable(ex_Nlp_3D nlp/Nlp3D.cpp)
29-
target_link_libraries(ex_Nlp_3D ct_optcon)
30-
list(APPEND optcon_ex_TARGETS ex_Nlp_3D)
28+
# add_executable(ex_Nlp_3D nlp/Nlp3D.cpp)
29+
# target_link_libraries(ex_Nlp_3D ct_optcon)
30+
# list(APPEND optcon_ex_TARGETS ex_Nlp_3D)
3131

32-
add_executable(ex_DMS DMS.cpp)
33-
target_link_libraries(ex_DMS ct_optcon)
34-
list(APPEND optcon_ex_TARGETS ex_DMS)
32+
# add_executable(ex_DMS DMS.cpp)
33+
# target_link_libraries(ex_DMS ct_optcon)
34+
# list(APPEND optcon_ex_TARGETS ex_DMS)
3535

36-
if(CPPADCG)
37-
add_executable(ex_LQR LQR.cpp)
38-
target_link_libraries(ex_LQR ct_optcon)
39-
list(APPEND optcon_ex_TARGETS ex_LQR)
40-
endif()
36+
# if(CPPADCG)
37+
# add_executable(ex_LQR LQR.cpp)
38+
# target_link_libraries(ex_LQR ct_optcon)
39+
# list(APPEND optcon_ex_TARGETS ex_LQR)
40+
# endif()
4141

4242
if(HPIPM)
4343
add_executable(ex_NLOC_boxConstrained NLOC_boxConstrained.cpp)
@@ -49,9 +49,9 @@ if(HPIPM)
4949
target_link_libraries(ex_NLOC_generalConstrained ct_optcon)
5050
list(APPEND optcon_ex_TARGETS ex_NLOC_generalConstrained)
5151

52-
add_executable(switched_continuous_optcon_example switched_systems_optcon/switched_continuous_optcon.cpp)
53-
target_link_libraries(switched_continuous_optcon_example ct_optcon)
54-
list(APPEND optcon_ex_TARGETS switched_continuous_optcon_example)
52+
# add_executable(switched_continuous_optcon_example switched_systems_optcon/switched_continuous_optcon.cpp)
53+
# target_link_libraries(switched_continuous_optcon_example ct_optcon)
54+
# list(APPEND optcon_ex_TARGETS switched_continuous_optcon_example)
5555
endif()
5656
endif(HPIPM)
5757

0 commit comments

Comments
 (0)