Skip to content
Permalink
Browse files

rename folders examples/matlab_mex -> examples/acados_matlab_octave, …

…interfaces/matlab_mex -> interfaces/acados_matlab_octave
  • Loading branch information...
FreyJo committed Sep 10, 2019
1 parent 287688b commit 2af1c0ed1cdeae546f492263d6663a3f44578f26
Showing with 102 additions and 102 deletions.
  1. +3 −3 ci/linux/dispatch.sh
  2. +1 −1 docs/interfaces/index.md
  3. 0 examples/{matlab_mex → acados_matlab_octave}/.gitignore
  4. +1 −1 examples/{matlab_mex → acados_matlab_octave}/README.md
  5. +1 −1 examples/{matlab_mex → acados_matlab_octave}/acados_examples_env.m
  6. 0 examples/{matlab_mex → acados_matlab_octave}/linear_mass_spring_model/Makefile
  7. +2 −2 examples/{matlab_mex → acados_matlab_octave}/linear_mass_spring_model/env.sh
  8. 0 examples/{matlab_mex → acados_matlab_octave}/linear_mass_spring_model/example_closed_loop.m
  9. 0 examples/{matlab_mex → acados_matlab_octave}/linear_mass_spring_model/example_ocp.m
  10. 0 examples/{matlab_mex → acados_matlab_octave}/linear_mass_spring_model/example_sim.m
  11. 0 examples/{matlab_mex → acados_matlab_octave}/linear_mass_spring_model/linear_mass_spring_model.m
  12. 0 examples/{matlab_mex → acados_matlab_octave}/masses_chain_model/Makefile
  13. 0 examples/{matlab_mex → acados_matlab_octave}/masses_chain_model/casadi_struct.m
  14. 0 examples/{matlab_mex → acados_matlab_octave}/masses_chain_model/casadi_struct2vec.m
  15. 0 examples/{matlab_mex → acados_matlab_octave}/masses_chain_model/casadi_vec.m
  16. 0 examples/{matlab_mex → acados_matlab_octave}/masses_chain_model/casadi_vec2struct.m
  17. +2 −2 examples/{matlab_mex/pendulum_dae → acados_matlab_octave/masses_chain_model}/env.sh
  18. 0 examples/{matlab_mex → acados_matlab_octave}/masses_chain_model/example_closed_loop.m
  19. 0 examples/{matlab_mex → acados_matlab_octave}/masses_chain_model/example_ocp.m
  20. 0 examples/{matlab_mex → acados_matlab_octave}/masses_chain_model/masses_chain_model.m
  21. 0 examples/{matlab_mex → acados_matlab_octave}/masses_chain_model/visualize.m
  22. 0 examples/{matlab_mex → acados_matlab_octave}/pendulum_dae/Makefile
  23. +2 −2 examples/{matlab_mex/masses_chain_model → acados_matlab_octave/pendulum_dae}/env.sh
  24. 0 examples/{matlab_mex → acados_matlab_octave}/pendulum_dae/example_closed_loop.m
  25. 0 examples/{matlab_mex → acados_matlab_octave}/pendulum_dae/example_sim.m
  26. 0 examples/{matlab_mex → acados_matlab_octave}/pendulum_dae/pendulum_dae_model.m
  27. 0 examples/{matlab_mex → acados_matlab_octave}/pendulum_on_cart_model/Makefile
  28. +2 −2 examples/{matlab_mex → acados_matlab_octave}/pendulum_on_cart_model/env.sh
  29. 0 examples/{matlab_mex → acados_matlab_octave}/pendulum_on_cart_model/example_closed_loop.m
  30. 0 examples/{matlab_mex → acados_matlab_octave}/pendulum_on_cart_model/example_ocp.m
  31. 0 examples/{matlab_mex → acados_matlab_octave}/pendulum_on_cart_model/example_sim.m
  32. 0 examples/{matlab_mex → acados_matlab_octave}/pendulum_on_cart_model/pendulum_on_cart_model.m
  33. 0 examples/{matlab_mex → acados_matlab_octave}/pendulum_on_cart_model/visualize.m
  34. 0 examples/{matlab_mex → acados_matlab_octave}/test/Makefile
  35. +2 −2 examples/{matlab_mex → acados_matlab_octave}/test/env.sh
  36. 0 examples/{matlab_mex → acados_matlab_octave}/test/exit_with_error.m
  37. 0 examples/{matlab_mex → acados_matlab_octave}/test/require_env_variable.m
  38. 0 examples/{matlab_mex → acados_matlab_octave}/test/run_tests_ocp.m
  39. 0 examples/{matlab_mex → acados_matlab_octave}/test/run_tests_sim.m
  40. 0 examples/{matlab_mex → acados_matlab_octave}/test/test_checks.m
  41. 0 examples/{matlab_mex → acados_matlab_octave}/test/test_ocp_pendulum_dae.m
  42. 0 examples/{matlab_mex → acados_matlab_octave}/test/test_ocp_pendulum_on_cart.m
  43. 0 examples/{matlab_mex → acados_matlab_octave}/test/test_ocp_wtnx6.m
  44. 0 examples/{matlab_mex → acados_matlab_octave}/test/test_sens_adj.m
  45. 0 examples/{matlab_mex → acados_matlab_octave}/test/test_sens_forw.m
  46. 0 examples/{matlab_mex → acados_matlab_octave}/test/test_sens_hess.m
  47. 0 examples/{matlab_mex → acados_matlab_octave}/test/test_sim_dae.m
  48. BIN examples/{matlab_mex → acados_matlab_octave}/wind_turbine_nx6/CmDataSpline.mat
  49. 0 examples/{matlab_mex → acados_matlab_octave}/wind_turbine_nx6/Makefile
  50. BIN examples/{matlab_mex → acados_matlab_octave}/wind_turbine_nx6/Sim_FAST__11mps_001_BC_FullSim.mat
  51. 0 examples/{matlab_mex → acados_matlab_octave}/wind_turbine_nx6/compute_setup.m
  52. +72 −0 examples/acados_matlab_octave/wind_turbine_nx6/env.sh
  53. 0 examples/{matlab_mex → acados_matlab_octave}/wind_turbine_nx6/example_closed_loop.m
  54. 0 examples/{matlab_mex → acados_matlab_octave}/wind_turbine_nx6/example_ocp.m
  55. 0 examples/{matlab_mex → acados_matlab_octave}/wind_turbine_nx6/example_sim.m
  56. 0 examples/{matlab_mex → acados_matlab_octave}/wind_turbine_nx6/ocp_S02_DefACADOSVarSpace.m
  57. 0 examples/{matlab_mex → acados_matlab_octave}/wind_turbine_nx6/ocp_S03_SetupSysParameters.m
  58. 0 ...s/{matlab_mex → acados_matlab_octave}/wind_turbine_nx6/ocp_S04_SetupNonlinearStateSpaceDynamics.m
  59. 0 examples/{matlab_mex → acados_matlab_octave}/wind_turbine_nx6/ocp_model_wind_turbine_nx6.m
  60. 0 examples/{matlab_mex → acados_matlab_octave}/wind_turbine_nx6/sim_S02_DefACADOSVarSpace.m
  61. 0 examples/{matlab_mex → acados_matlab_octave}/wind_turbine_nx6/sim_S03_SetupSysParameters.m
  62. 0 ...s/{matlab_mex → acados_matlab_octave}/wind_turbine_nx6/sim_S04_SetupNonlinearStateSpaceDynamics.m
  63. 0 examples/{matlab_mex → acados_matlab_octave}/wind_turbine_nx6/sim_model_wind_turbine_nx6.m
  64. BIN examples/{matlab_mex → acados_matlab_octave}/wind_turbine_nx6/ssOptimalTrackingRef.mat
  65. BIN examples/{matlab_mex → acados_matlab_octave}/wind_turbine_nx6/testSim.mat
  66. +1 −1 examples/c/pendulum_dae_model/generate_casadi_functions.m
  67. +0 −72 examples/matlab_mex/wind_turbine_nx6/env.sh
  68. +3 −3 interfaces/CMakeLists.txt
  69. 0 interfaces/{acados_matlab → acados_matlab_octave}/.gitignore
  70. 0 interfaces/{acados_matlab → acados_matlab_octave}/acados_ocp.m
  71. 0 interfaces/{acados_matlab → acados_matlab_octave}/acados_ocp_model.m
  72. 0 interfaces/{acados_matlab → acados_matlab_octave}/acados_ocp_opts.m
  73. 0 interfaces/{acados_matlab → acados_matlab_octave}/acados_sim.m
  74. 0 interfaces/{acados_matlab → acados_matlab_octave}/acados_sim_model.m
  75. 0 interfaces/{acados_matlab → acados_matlab_octave}/acados_sim_opts.m
  76. 0 interfaces/{acados_matlab → acados_matlab_octave}/archive/crane_model.m
  77. 0 interfaces/{acados_matlab → acados_matlab_octave}/archive/example_closed_loop.m
  78. 0 interfaces/{acados_matlab → acados_matlab_octave}/archive/linear_mass_spring_model.m
  79. 0 interfaces/{acados_matlab → acados_matlab_octave}/archive/linear_model.m
  80. 0 interfaces/{acados_matlab → acados_matlab_octave}/archive/mex_example.c
  81. 0 interfaces/{acados_matlab → acados_matlab_octave}/archive/ocp_test.m
  82. 0 interfaces/{acados_matlab → acados_matlab_octave}/archive/sim_test.m
  83. 0 interfaces/{acados_matlab → acados_matlab_octave}/check_reformulation.m
  84. 0 interfaces/{acados_matlab → acados_matlab_octave}/detect_affine_terms_reduce_nonlinearity.m
  85. 0 interfaces/{acados_matlab → acados_matlab_octave}/detect_gnsf_structure.m
  86. 0 interfaces/{acados_matlab → acados_matlab_octave}/determine_input_nonlinearity_function.m
  87. 0 interfaces/{acados_matlab → acados_matlab_octave}/determine_trivial_gnsf_transcription.m
  88. 0 interfaces/{acados_matlab → acados_matlab_octave}/generate_c_code_disc_dyn.m
  89. 0 interfaces/{acados_matlab → acados_matlab_octave}/generate_c_code_explicit_ode.m
  90. 0 interfaces/{acados_matlab → acados_matlab_octave}/generate_c_code_ext_cost.m
  91. 0 interfaces/{acados_matlab → acados_matlab_octave}/generate_c_code_gnsf.m
  92. 0 interfaces/{acados_matlab → acados_matlab_octave}/generate_c_code_implicit_ode.m
  93. 0 interfaces/{acados_matlab → acados_matlab_octave}/generate_c_code_nonlinear_constr.m
  94. 0 interfaces/{acados_matlab → acados_matlab_octave}/generate_c_code_nonlinear_least_squares.m
  95. 0 interfaces/{acados_matlab → acados_matlab_octave}/generate_get_gnsf_structure.m
  96. 0 interfaces/{acados_matlab → acados_matlab_octave}/idx_perm_to_ipiv.m
  97. 0 interfaces/{acados_matlab → acados_matlab_octave}/is_octave.m
  98. 0 interfaces/{acados_matlab → acados_matlab_octave}/mex_macros.h
  99. +1 −1 interfaces/{acados_matlab → acados_matlab_octave}/ocp_compile_mex.m
  100. 0 interfaces/{acados_matlab → acados_matlab_octave}/ocp_create.c
  101. 0 interfaces/{acados_matlab → acados_matlab_octave}/ocp_create_ext_fun.c
  102. 0 interfaces/{acados_matlab → acados_matlab_octave}/ocp_destroy.c
  103. 0 interfaces/{acados_matlab → acados_matlab_octave}/ocp_destroy_ext_fun.c
  104. 0 interfaces/{acados_matlab → acados_matlab_octave}/ocp_eval_param_sens.c
  105. 0 interfaces/{acados_matlab → acados_matlab_octave}/ocp_generate_casadi_ext_fun.m
  106. 0 interfaces/{acados_matlab → acados_matlab_octave}/ocp_get.c
  107. 0 interfaces/{acados_matlab → acados_matlab_octave}/ocp_precompute.c
  108. 0 interfaces/{acados_matlab → acados_matlab_octave}/ocp_set.c
  109. +4 −4 interfaces/{acados_matlab → acados_matlab_octave}/ocp_set_ext_fun.m
  110. 0 interfaces/{acados_matlab → acados_matlab_octave}/ocp_set_ext_fun_gen.c
  111. 0 interfaces/{acados_matlab → acados_matlab_octave}/ocp_solve.c
  112. 0 interfaces/{acados_matlab → acados_matlab_octave}/print_casadi_expression.m
  113. 0 interfaces/{acados_matlab → acados_matlab_octave}/reformulate_with_LOS.m
  114. 0 interfaces/{acados_matlab → acados_matlab_octave}/reformulate_with_invertible_E_mat.m
  115. 0 interfaces/{acados_matlab → acados_matlab_octave}/sim_check_dims.m
  116. +1 −1 interfaces/{acados_matlab → acados_matlab_octave}/sim_compile_mex.m
  117. 0 interfaces/{acados_matlab → acados_matlab_octave}/sim_create.c
  118. 0 interfaces/{acados_matlab → acados_matlab_octave}/sim_create_ext_fun.c
  119. 0 interfaces/{acados_matlab → acados_matlab_octave}/sim_destroy.c
  120. 0 interfaces/{acados_matlab → acados_matlab_octave}/sim_destroy_ext_fun.c
  121. 0 interfaces/{acados_matlab → acados_matlab_octave}/sim_generate_casadi_ext_fun.m
  122. 0 interfaces/{acados_matlab → acados_matlab_octave}/sim_get.c
  123. 0 interfaces/{acados_matlab → acados_matlab_octave}/sim_precompute.c
  124. 0 interfaces/{acados_matlab → acados_matlab_octave}/sim_set.c
  125. +4 −4 interfaces/{acados_matlab → acados_matlab_octave}/sim_set_ext_fun.m
  126. 0 interfaces/{acados_matlab → acados_matlab_octave}/sim_set_ext_fun_gen.c
  127. 0 interfaces/{acados_matlab → acados_matlab_octave}/sim_solve.c
  128. 0 interfaces/{acados_matlab → acados_matlab_octave}/structure_detection_print_summary.m
@@ -65,11 +65,11 @@ elif [ "${SECTION}" = 'install' ]; then
# Prepare ctest with Matlab/Octave interface
if [[ "${ACADOS_OCTAVE}" = 'ON' || "${ACADOS_MATLAB}" = 'ON' ]]; then
# Export paths
# MATLAB_TEST_FOLDER=${ACADOS_SOURCE_DIR}/examples/matlab_mex/test/build;
# PENDULUM_FOLDER=${ACADOS_SOURCE_DIR}/examples/matlab_mex/pendulum_on_cart_model/build;
# MATLAB_TEST_FOLDER=${ACADOS_SOURCE_DIR}/examples/acados_matlab_octave/test/build;
# PENDULUM_FOLDER=${ACADOS_SOURCE_DIR}/examples/acados_matlab_octave/pendulum_on_cart_model/build;
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ACADOS_INSTALL_DIR/lib:$MATLAB_TEST_FOLDER:$PENDULUM_FOLDER;

pushd examples/matlab_mex/pendulum_on_cart_model;
pushd examples/acados_matlab_octave/pendulum_on_cart_model;
MODEL_FOLDER=${MODEL_FOLDER:-"./build"}
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ACADOS_INSTALL_DIR/lib:$MODEL_FOLDER
popd;
@@ -17,7 +17,7 @@ exact Hessians, adjoint corrections, regularization, etc. However, for the time
generate a self-contained C library that can be deployed on an embedded system. For this purpose
see the `acados emebedded` high-level interface below.

Some examples for the use of this interface can be found in `<acados_root>/examples/matlab_mex`
Some examples for the use of this interface can be found in `<acados_root>/examples/acados_matlab_octave`

This interface uses the shared libraries created using the make command from the main acados folder

File renamed without changes.
@@ -2,7 +2,7 @@

## Linux

This folder contains some examples to use the mex-based acados_matlab interface from Matlab or Octave.
This folder contains some examples to use the mex-based acados_matlab_octave interface from Matlab or Octave.
This interface uses the shared libraries created using the make command from the main acados folder
```
make shared_library
@@ -36,7 +36,7 @@

acados_dir = fullfile(example_dir, '..', '..');

matlab_interface_dir = fullfile(acados_dir, 'interfaces', 'acados_matlab');
matlab_interface_dir = fullfile(acados_dir, 'interfaces', 'acados_matlab_octave');
addpath(matlab_interface_dir);

casadi_dir = fullfile(acados_dir, 'external', 'casadi-matlab');
@@ -54,11 +54,11 @@ echo "ACADOS_INSTALL_DIR=$ACADOS_INSTALL_DIR"

# export casadi folder and matlab/octave mex folder
# MATLAB case
export MATLABPATH=$MATLABPATH:$ACADOS_INSTALL_DIR/external/casadi-matlab/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab/
export MATLABPATH=$MATLABPATH:$ACADOS_INSTALL_DIR/external/casadi-matlab/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab_octave/
echo
echo "MATLABPATH=$MATLABPATH"
# Octave case
export OCTAVE_PATH=$OCTAVE_PATH:$ACADOS_INSTALL_DIR/external/casadi-octave/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab/
export OCTAVE_PATH=$OCTAVE_PATH:$ACADOS_INSTALL_DIR/external/casadi-octave/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab_octave/
echo
echo "OCTAVE_PATH=$OCTAVE_PATH"

@@ -54,11 +54,11 @@ echo "ACADOS_INSTALL_DIR=$ACADOS_INSTALL_DIR"

# export casadi folder and matlab/octave mex folder
# MATLAB case
export MATLABPATH=$MATLABPATH:$ACADOS_INSTALL_DIR/external/casadi-matlab/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab/
export MATLABPATH=$MATLABPATH:$ACADOS_INSTALL_DIR/external/casadi-matlab/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab_octave/
echo
echo "MATLABPATH=$MATLABPATH"
# Octave case
export OCTAVE_PATH=$OCTAVE_PATH:$ACADOS_INSTALL_DIR/external/casadi-octave/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab/
export OCTAVE_PATH=$OCTAVE_PATH:$ACADOS_INSTALL_DIR/external/casadi-octave/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab_octave/
echo
echo "OCTAVE_PATH=$OCTAVE_PATH"

File renamed without changes.
@@ -54,11 +54,11 @@ echo "ACADOS_INSTALL_DIR=$ACADOS_INSTALL_DIR"

# export casadi folder and matlab/octave mex folder
# MATLAB case
export MATLABPATH=$MATLABPATH:$ACADOS_INSTALL_DIR/external/casadi-matlab/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab/
export MATLABPATH=$MATLABPATH:$ACADOS_INSTALL_DIR/external/casadi-matlab/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab_octave/
echo
echo "MATLABPATH=$MATLABPATH"
# Octave case
export OCTAVE_PATH=$OCTAVE_PATH:$ACADOS_INSTALL_DIR/external/casadi-octave/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab/
export OCTAVE_PATH=$OCTAVE_PATH:$ACADOS_INSTALL_DIR/external/casadi-octave/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab_octave/
echo
echo "OCTAVE_PATH=$OCTAVE_PATH"

@@ -54,11 +54,11 @@ echo "ACADOS_INSTALL_DIR=$ACADOS_INSTALL_DIR"

# export casadi folder and matlab/octave mex folder
# MATLAB case
export MATLABPATH=$MATLABPATH:$ACADOS_INSTALL_DIR/external/casadi-matlab/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab/
export MATLABPATH=$MATLABPATH:$ACADOS_INSTALL_DIR/external/casadi-matlab/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab_octave/
echo
echo "MATLABPATH=$MATLABPATH"
# Octave case
export OCTAVE_PATH=$OCTAVE_PATH:$ACADOS_INSTALL_DIR/external/casadi-octave/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab/
export OCTAVE_PATH=$OCTAVE_PATH:$ACADOS_INSTALL_DIR/external/casadi-octave/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab_octave/
echo
echo "OCTAVE_PATH=$OCTAVE_PATH"

File renamed without changes.
@@ -55,11 +55,11 @@ echo "ACADOS_INSTALL_DIR=$ACADOS_INSTALL_DIR"

# export casadi folder and matlab/octave mex folder
# MATLAB case
export MATLABPATH=$MATLABPATH:$ACADOS_INSTALL_DIR/external/casadi-matlab/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab/
export MATLABPATH=$MATLABPATH:$ACADOS_INSTALL_DIR/external/casadi-matlab/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab_octave/
echo
echo "MATLABPATH=$MATLABPATH"
# Octave case
export OCTAVE_PATH=$OCTAVE_PATH:$ACADOS_INSTALL_DIR/external/casadi-octave/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab/
export OCTAVE_PATH=$OCTAVE_PATH:$ACADOS_INSTALL_DIR/external/casadi-octave/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab_octave/
echo
echo "OCTAVE_PATH=$OCTAVE_PATH"

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,72 @@
#! /usr/bin/bash
#
# Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren,
# Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor,
# Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan,
# Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl
#
# This file is part of acados.
#
# The 2-Clause BSD License
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.;
#


if [[ "${BASH_SOURCE[0]}" != "${0}" ]]
then
echo "Script is being sourced"
else
echo "ERROR: Script is a subshell"
echo "To affect your current shell enviroment source this script with:"
echo "source env.sh"
exit
fi

# check that this file is run
export ENV_RUN=true

# if acados folder not specified assume parent of the folder of the single examples
ACADOS_INSTALL_DIR=${ACADOS_INSTALL_DIR:-"$(pwd)/../../.."}
export ACADOS_INSTALL_DIR
echo
echo "ACADOS_INSTALL_DIR=$ACADOS_INSTALL_DIR"

# export casadi folder and matlab/octave mex folder
# MATLAB case
export MATLABPATH=$MATLABPATH:$ACADOS_INSTALL_DIR/external/casadi-matlab/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab_octave/
echo
echo "MATLABPATH=$MATLABPATH"
# Octave case
export OCTAVE_PATH=$OCTAVE_PATH:$ACADOS_INSTALL_DIR/external/casadi-octave/:$ACADOS_INSTALL_DIR/interfaces/acados_matlab_octave/
echo
echo "OCTAVE_PATH=$OCTAVE_PATH"

# export acados mex flags
#export ACADOS_MEX_FLAGS="GCC=/usr/bin/gcc-4.9"

# if model folder not specified assume this folder
MODEL_FOLDER=${MODEL_FOLDER:-"./build"}
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ACADOS_INSTALL_DIR/lib:$MODEL_FOLDER
echo
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
@@ -36,7 +36,7 @@
clear VARIABLES;
close all;

addpath('../../../interfaces/acados_matlab/')
addpath('../../../interfaces/acados_matlab_octave/')
addpath('../../matlab_mex/pendulum_dae/')

% define model

This file was deleted.

@@ -33,12 +33,12 @@


# add_test(NAME matlab_test_sim_pendulum
# COMMAND "${CMAKE_COMMAND}" -E chdir ${PROJECT_SOURCE_DIR}/examples/matlab_mex/pendulum_on_cart_model ${MATLAB_EXECUTABLE} -nodisplay -nodesktop -r "run('./run_tests.m');")
# COMMAND "${CMAKE_COMMAND}" -E chdir ${PROJECT_SOURCE_DIR}/examples/acados_matlab_octave/pendulum_on_cart_model ${MATLAB_EXECUTABLE} -nodisplay -nodesktop -r "run('./run_tests.m');")

add_test(NAME octave_test_sim
COMMAND "${CMAKE_COMMAND}" -E chdir ${PROJECT_SOURCE_DIR}/examples/matlab_mex/test
COMMAND "${CMAKE_COMMAND}" -E chdir ${PROJECT_SOURCE_DIR}/examples/acados_matlab_octave/test
octave --no-gui --no-window-system ./run_tests_sim.m)

add_test(NAME octave_test_ocp
COMMAND "${CMAKE_COMMAND}" -E chdir ${PROJECT_SOURCE_DIR}/examples/matlab_mex/test
COMMAND "${CMAKE_COMMAND}" -E chdir ${PROJECT_SOURCE_DIR}/examples/acados_matlab_octave/test
octave --no-gui --no-window-system ./run_tests_ocp.m)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -38,7 +38,7 @@ function ocp_compile_mex(opts)
mex_flags = getenv('ACADOS_MEX_FLAGS');

% set paths
acados_mex_folder = fullfile(acados_folder, 'interfaces', 'acados_matlab');
acados_mex_folder = fullfile(acados_folder, 'interfaces', 'acados_matlab_octave');
acados_include = ['-I', acados_folder];
acados_interfaces_include = ['-I', fullfile(acados_folder, 'interfaces')];
external_include = ['-I', fullfile(acados_folder, 'external')];
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -41,14 +41,14 @@
mex_flags = getenv('ACADOS_MEX_FLAGS');

% set paths
acados_mex_folder = fullfile(acados_folder, 'interfaces', 'acados_matlab');
acados_mex_folder = fullfile(acados_folder, 'interfaces', 'acados_matlab_octave');
acados_include = ['-I' acados_folder];
acados_interfaces_include = ['-I' fullfile(acados_folder, 'interfaces')];
external_include = ['-I' fullfile(acados_folder, 'external')];
blasfeo_include = ['-I' fullfile(acados_folder, 'external' , 'blasfeo', 'include')];
hpipm_include = ['-I' fullfile(acados_folder, 'external' , 'hpipm', 'include')];
acados_lib_path = ['-L' fullfile(acados_folder, 'lib')];
acados_matlab_lib_path = ['-L' fullfile(acados_folder, 'interfaces', 'acados_matlab')];
acados_matlab_octave_lib_path = ['-L' fullfile(acados_folder, 'interfaces', 'acados_matlab_octave')];
model_lib_path = ['-L', opts_struct.output_dir];

%% select files to compile
@@ -419,15 +419,15 @@
cflags_tmp = [cflags_tmp, ' -DN1=', num2str(phase_end{ii})];
setenv('CFLAGS', cflags_tmp);
mex(acados_include, acados_interfaces_include, external_include, blasfeo_include,...
hpipm_include, acados_lib_path, acados_matlab_lib_path, model_lib_path, '-lacados',...
hpipm_include, acados_lib_path, acados_matlab_octave_lib_path, model_lib_path, '-lacados',...
'-lhpipm', '-lblasfeo', ['-l', model_name], mex_files{1});
else
mex(mex_flags, 'CFLAGS=$CFLAGS -std=c99 -fopenmp', ['-DSETTER=', setter{ii}],...
['-DSET_FIELD=', set_fields{ii}], ['-DMEX_FIELD=', mex_fields{ii}],...
['-DFUN_NAME=', fun_names{ii}], ['-DPHASE=', num2str(phase{ii})],...
['-DN0=', num2str(phase_start{ii})], ['-DN1=', num2str(phase_end{ii})],...
acados_include, acados_interfaces_include, external_include, blasfeo_include,...
hpipm_include, acados_lib_path, acados_matlab_lib_path, model_lib_path,...
hpipm_include, acados_lib_path, acados_matlab_octave_lib_path, model_lib_path,...
'-lacados', '-lhpipm', '-lblasfeo', ['-l', model_name], mex_files{1});
end

File renamed without changes.