Commit 21dd6370 authored by Nicolas Docquier's avatar Nicolas Docquier
Browse files

Merge branch 'release_1.16.0' into 'master'

Release 1.16.0

See merge request robotran/mbsysc!414
parents a6d4f38c c82cba0f
......@@ -76,13 +76,16 @@ coman_mbsysC:
stage: test_Dev
allow_failure: true
before_script:
- apt update
- apt install -y git
- apt-get update
- apt-get install -y git
- git submodule sync --recursive
- git stash
- git submodule update --init --recursive
script:
- mkdir ExampleProjects/coman_robot/workR/build
- cd ExampleProjects/coman_robot/workR/build
- cd /builds/robotran/mbsysc/MBsysC/build/bin
- ./Gen_mds_user "/builds/robotran/mbsysc/ExampleProjects/coman_robot/dataR/coman.mbs" "user_models"
- cd /builds/robotran/mbsysc/ExampleProjects/coman_robot/workR/build
- cmake -DROBOTRAN_SOURCE_DIR=$(pwd)/../../../../MBsysC -DFLAG_RELEASE=OFF ..
- make
- ./exe_projectRobotran
......@@ -90,6 +93,7 @@ coman_mbsysC:
- rm -r ExampleProjects/coman_robot/workR/build # need to manually clean folder for gitlab-ci with submodule
only:
- dev
# --------------------------------------------------------------------------
# Testing PendulumSpringC Example project
# --------------------------------------------------------------------------
......@@ -694,6 +698,11 @@ doc:
image: immc/robotran-cross:v1.11
stage: build
script :
- mkdir MBsysC/build
- cd MBsysC/build
- cmake ..
- make
- cd ../..
- cd MBsysC/mbs_interface/MBsysPy/doc
- sphinx-apidoc -o source/ ../../ -f -e
- sphinx-apidoc -o source/ ../../MBsysPy/templates/user -f -e
......@@ -726,7 +735,7 @@ pages:
paths:
- public
only:
- dev
- master
#before_script:
# - eval $(ssh-agent -s)
......
## Changes for next release
* To be defined
## Robotran v1.16.0
* [C][Python] error handling is enhanced, with new error names and proper closing of the functions for all modules, except Real-time in dirdyn
* [C] All user models are printed with the `mbs_print_data` function
* [C] New function `print_d_vec_0_format` allowing to set the format of the vector values.
* [C] New function to compute matrix product between matrices of specified shape: `doublematrix_product_0`.
* [C] LPK functions new error catched with code `-#16`; Documentation fixed.
* [C] Some functions that my be called by users have return status (<0 in case of error):
* Look Up Table: `mbs_lut_2D_alloc()`, `mbs_lut_res_alloc()`, `mbs_lut_res_load_file()`;
* Useful functions: `read_dmat_0()`
* [Py] User vector outputs are now available in the MbsDirdyn results field.
* [Py] Using C symbolic library and Python user is possible even with external forces.
* [Py] Adding missing fields in MbsData.
* [dirdyn][new option] A new option option called 'oneshot' is added.
-> It allows to compute the derivative function only once (no time derivation) at time = dt0.
-> See the 'flag_oneshot' in dirdyn options.
* [dirdyn][Fix] the function user_dirdyn_loop is now called only at the real time steps, even for multisteps integration methods.
* [dirdyn][Fix] the mbs_data->flag_stop is taken into account in all the integrators now, the simulation stops.
* [integrators][dirdyn] Add a new integrator called 'AlphaM' for alpha method. It is explicit, fixed step-size but with two stages and a bit smarter than Euler explicit :-)
## Robotran v1.14.3
* [Python] Fix in MbsSensor class:
* bad call to `comp_s_sensor` in `comp_f_sensor` raising exception.
## Robotran v1.14.2
* [Python] Fixes in MbsSensor class:
* bad field called in `comp_f_sensor` raising exception.
* bad field called in `assign_to_C` raising exception when assigning an existing Python sensor to an existing C structure.
* with C symbolic libraries computing `force` or `gen` sensor was wrong as the class calls for the Python function.
* `gen_sensor` function is renamed to `comp_gen_sensor` (coherence with other sensors).
## Robotran v1.14.1
* [Python] Correct Python project templates in main.py (plot error) and user_ExtForces (index error)
* **Requires to upate template of existing projects in Python created with v 1.14.0**
......@@ -45,9 +70,11 @@
* [New] Changing user state ids is now forbidden.
* [Template] user_ExtForces documentation improved.
* [DEV] files updated to respect pep8 (except for E116, E126, E127, E402, E501, E722, E743, W503, W504)
* [DOC] files updated to respect numpydoc style (with spyder 4 lining)
* [DOC] files updated to respect numpydoc style (with spyder 4 lining)
* [Simulink] Inverse dynamics module added, basic use.
*
* [ROS] compatibility with ROS in UNIX OS is done. Path to open GL process is put to catkin_ws.
Functions used in main are put as extern cpp to be compiled by ROS environment.
See the ROS tutorial on www.robotran.be for more informations
......
......@@ -13,7 +13,7 @@
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
if (UNIX)
cmake_minimum_required(VERSION 2.8.7)
cmake_minimum_required(VERSION 3.4)
else()
cmake_minimum_required(VERSION 3.4)
endif ()
......@@ -95,7 +95,7 @@ endif()
# MBSysC libraries
if ( FLAG_SEPARATE_BUILD ) # find MBSysC dynamic libraries
find_package( LibRobotranC 1.14.0 REQUIRED )
find_package( LibRobotranC 1.16.0 REQUIRED )
add_definitions(${LIB_MBSYSC_DEFINITIONS})
target_link_libraries(${SYMBOLIC_LIB_NAME} ${LIB_MBSYSC_MODULES})
endif()
......
......@@ -13,7 +13,7 @@
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
if (UNIX)
cmake_minimum_required(VERSION 2.8.7)
cmake_minimum_required(VERSION 3.4)
else()
cmake_minimum_required(VERSION 3.4)
endif ()
......@@ -140,7 +140,7 @@ endif()
# MBSysC libraries
if ( FLAG_SEPARATE_BUILD ) # find MBSysC dynamic libraries
find_package( LibRobotranC 1.14.0 REQUIRED )
find_package( LibRobotranC 1.16.0 REQUIRED )
add_definitions(${LIB_MBSYSC_DEFINITIONS})
endif()
......
......@@ -14,7 +14,7 @@
# CMake minimum version
if (UNIX)
cmake_minimum_required(VERSION 2.8.7)
cmake_minimum_required(VERSION 3.4)
else()
cmake_minimum_required(VERSION 3.4)
endif ()
......@@ -175,7 +175,7 @@ flags_clean()
if ( FLAG_SEPARATE_BUILD ) # find MBSysC dynamic libraries
find_path(LibRobotranC_DIR LibRobotranCConfig.cmake "${ROBOTRAN_SOURCE_DIR}/build")
find_package( LibRobotranC 1.14.0 REQUIRED )
find_package( LibRobotranC 1.16.0 REQUIRED )
target_link_libraries( ${Executable} ${LIB_MBSYSC_MODULES} ${LIB_MBSYSC_LOAD} ${LIB_MBSYSC_UTILITIES} )
add_definitions(${LIB_MBSYSC_DEFINITIONS})
......
#
# Universite catholique de Louvain
# CEREM : Centre for research in mechatronics
# http://www.robotran.be
# Contact : info@robotran.be
#
#
# CMake for compiling the symbolic files of a robotran project in C
#
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# LIBRARY MAIN CONFIGURATIONS
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
if (UNIX)
cmake_minimum_required(VERSION 2.8.7)
else()
cmake_minimum_required(VERSION 3.4)
endif ()
project(Project_symbolic)
# flags
if (UNIX)
set(CMAKE_C_FLAGS "-fPIC")
set(CMAKE_EXE_LINKER_FLAGS "-fPIC")
endif (UNIX)
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# SEPARATE COMPILATION
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
if ( FLAG_SEPARATE_SYMBOLIC )
set(CMAKE_AUX ${ROBOTRAN_SOURCE_DIR}/cmake_aux)
set(CMAKE_AUX_BIN ${PROJECT_BINARY_DIR}/cmake_aux)
add_subdirectory ( ${CMAKE_AUX}/flags/ ${CMAKE_AUX_BIN}/flags/ )
add_subdirectory ( ${CMAKE_AUX}/listing/ ${CMAKE_AUX_BIN}/listing/ )
endif ( )
# release of debug
release_debug()
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# SET LIBRARY
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# list source files to compile
init_src()
increment_src( ${PROJECT_SOURCE_DIR} )
increment_void_symbolic( ${PROJECT_SOURCE_DIR} )
# list include directories (to find headers)
init_include()
increment_include( ${ROBOTRAN_SOURCE_DIR}/mbs_common )
# include these directories
include_directories ( ${INCLUDE_DIR} )
include_directories ( ${CMAKE_CURRENT_BINARY_DIR} )
if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC )
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
add_library(Project_symbolic SHARED ${SOURCE_FILES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_symbolic PROPERTIES SUFFIX .so)
endif()
# Windows, copy dll next to executable
if((NOT UNIX) AND (NOT FLAG_SEPARATE_SYMBOLIC))
add_custom_command(TARGET Project_symbolic POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/Project_symbolic.dll
${CMAKE_CURRENT_BINARY_DIR}/../$<CONFIGURATION>/Project_symbolic.dll
)
endif()
else()
add_library(Project_symbolic STATIC ${SOURCE_FILES})
# some symbolic routines call user functions (ext_forces, accelred, ...)
target_link_libraries(Project_symbolic Project_userfct)
endif()
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# LINK LIBRARIES
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# MBSysC libraries
if ( FLAG_SEPARATE_BUILD ) # find MBSysC dynamic libraries
find_package( LibRobotranC 1.14.0 REQUIRED )
add_definitions(${LIB_MBSYSC_DEFINITIONS})
target_link_libraries(Project_symbolic ${LIB_MBSYSC_MODULES})
endif()
# Windows M_PI definitions
if (WIN32)
add_definitions(-D _USE_MATH_DEFINES)
endif (WIN32)
#
# Universite catholique de Louvain
# CEREM : Centre for research in mechatronics
# http://www.robotran.be
# Contact : info@robotran.be
#
#
# CMake for compiling the symbolic files of a robotran project in C
#
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# LIBRARY MAIN CONFIGURATIONS
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
if (UNIX)
cmake_minimum_required(VERSION 3.4)
else()
cmake_minimum_required(VERSION 3.4)
endif ()
project(Project_symbolic)
# flags
if (UNIX)
set(CMAKE_C_FLAGS "-fPIC")
set(CMAKE_EXE_LINKER_FLAGS "-fPIC")
endif (UNIX)
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# SEPARATE COMPILATION
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
if ( FLAG_SEPARATE_SYMBOLIC )
set(CMAKE_AUX ${ROBOTRAN_SOURCE_DIR}/cmake_aux)
set(CMAKE_AUX_BIN ${PROJECT_BINARY_DIR}/cmake_aux)
add_subdirectory ( ${CMAKE_AUX}/flags/ ${CMAKE_AUX_BIN}/flags/ )
add_subdirectory ( ${CMAKE_AUX}/listing/ ${CMAKE_AUX_BIN}/listing/ )
endif ( )
# release of debug
release_debug()
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# SET LIBRARY
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# list source files to compile
init_src()
increment_src( ${PROJECT_SOURCE_DIR} )
increment_void_symbolic( ${PROJECT_SOURCE_DIR} )
# list include directories (to find headers)
init_include()
increment_include( ${ROBOTRAN_SOURCE_DIR}/mbs_common )
# include these directories
include_directories ( ${INCLUDE_DIR} )
include_directories ( ${CMAKE_CURRENT_BINARY_DIR} )
if( FLAG_SHARED_LIB OR FLAG_SEPARATE_SYMBOLIC )
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
add_library(Project_symbolic SHARED ${SOURCE_FILES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_symbolic PROPERTIES SUFFIX .so)
endif()
# Windows, copy dll next to executable
if((NOT UNIX) AND (NOT FLAG_SEPARATE_SYMBOLIC))
add_custom_command(TARGET Project_symbolic POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/Project_symbolic.dll
${CMAKE_CURRENT_BINARY_DIR}/../$<CONFIGURATION>/Project_symbolic.dll
)
endif()
else()
add_library(Project_symbolic STATIC ${SOURCE_FILES})
# some symbolic routines call user functions (ext_forces, accelred, ...)
target_link_libraries(Project_symbolic Project_userfct)
endif()
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# LINK LIBRARIES
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# MBSysC libraries
if ( FLAG_SEPARATE_BUILD ) # find MBSysC dynamic libraries
find_package( LibRobotranC 1.16.0 REQUIRED )
add_definitions(${LIB_MBSYSC_DEFINITIONS})
target_link_libraries(Project_symbolic ${LIB_MBSYSC_MODULES})
endif()
# Windows M_PI definitions
if (WIN32)
add_definitions(-D _USE_MATH_DEFINES)
endif (WIN32)
#
# Universite catholique de Louvain
# CEREM : Centre for research in mechatronics
# http://www.robotran.be
# Contact : info@robotran.be
#
#
# CMake for compiling the user files of a robotran project in C
#
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# LIBRARY MAIN CONFIGURATIONS
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
if (UNIX)
cmake_minimum_required(VERSION 2.8.7)
else()
cmake_minimum_required(VERSION 3.4)
endif ()
project(Project_userfct)
# flags
if (UNIX)
set(CMAKE_C_FLAGS "-fPIC")
set(CMAKE_EXE_LINKER_FLAGS "-fPIC")
endif (UNIX)
# Windows M_PI definitions
if (WIN32)
add_definitions(-D _USE_MATH_DEFINES)
endif (WIN32)
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# SEPARATE COMPILATION
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
if ( FLAG_SEPARATE_USER_FCT )
# additional CMakeLists.txt
set(CMAKE_AUX ${ROBOTRAN_SOURCE_DIR}/cmake_aux)
set(CMAKE_AUX_BIN ${PROJECT_BINARY_DIR}/cmake_aux)
add_subdirectory ( ${CMAKE_AUX}/flags/ ${CMAKE_AUX_BIN}/flags/ )
add_subdirectory ( ${CMAKE_AUX}/listing/ ${CMAKE_AUX_BIN}/listing/ )
add_subdirectory ( ${CMAKE_AUX}/libraries/ ${CMAKE_AUX_BIN}/libraries/ )
# real-time option
option (FLAG_REAL_TIME "Real time" OFF)
if(FLAG_REAL_TIME)
add_definitions( -DREAL_TIME )
# configure a header file to pass some of the CMake settings to the source code
configure_file (
"${ROBOTRAN_SOURCE_DIR}/conf/cmake_config.h.in"
"${PROJECT_BINARY_DIR}/conf/cmake_config.h"
)
include_directories (${PROJECT_BINARY_DIR}/conf)
# plot-visu options
option (FLAG_PLOT "Real time" OFF)
option (FLAG_VISU "Real time" OFF)
option (FLAG_JAVA "Real time" OFF)
option (FLAG_OPEN_GL "Real time" OFF)
if(FLAG_PLOT)
add_definitions( -DSDL )
endif( )
if(FLAG_VISU)
add_definitions( -DVISU_3D )
endif( )
if(FLAG_JAVA)
add_definitions( -DJAVA )
endif( )
if(FLAG_OPEN_GL)
add_definitions( -DOPEN_GL )
endif( )
endif ( )
endif ( )
# release of debug
release_debug()
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# SET LIBRARY
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# list source files to compile
init_src()
increment_src( ${PROJECT_SOURCE_DIR} )
increment_void_user( ${PROJECT_SOURCE_DIR} )
# list include directories (to find headers)
init_include()
increment_include( ${ROBOTRAN_SOURCE_DIR}/mbs_common )
# include these directories
include_directories ( ${INCLUDE_DIR} )
include_directories ( ${CMAKE_CURRENT_BINARY_DIR} )
if( FLAG_SHARED_LIB OR FLAG_SEPARATE_USER_FCT )
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
add_library(Project_userfct SHARED ${SOURCE_FILES})
target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME})
target_link_libraries (Project_userfct ${LIB_MBSYSC_MODULES})
target_link_libraries (Project_userfct ${LIB_MBSYSC_UTILITIES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(Project_userfct PROPERTIES SUFFIX ".so")
endif()
# Windows, copy dll next to executable
if((NOT UNIX) AND (NOT FLAG_SEPARATE_USER_FCT))
add_custom_command(TARGET Project_userfct POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/Project_userfct.dll
${CMAKE_CURRENT_BINARY_DIR}/../$<CONFIGURATION>/Project_userfct.dll
)
endif()
else()
add_library(Project_userfct STATIC ${SOURCE_FILES})
target_link_libraries (Project_userfct ${LIB_MBSYSC_REALTIME} ${LIB_MBSYSC_UTILITIES})
endif()
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# LINK LIBRARIES
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# MBSysC libraries
if ( FLAG_SEPARATE_BUILD ) # find MBSysC dynamic libraries
find_package( LibRobotranC 1.14.0 REQUIRED )
add_definitions(${LIB_MBSYSC_DEFINITIONS})
endif()
if (FLAG_PLOT)
sdl_header_lib(userfct)
endif ( )
#
# Universite catholique de Louvain
# CEREM : Centre for research in mechatronics
# http://www.robotran.be
# Contact : info@robotran.be
#
#
# CMake for compiling the user files of a robotran project in C
#
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# LIBRARY MAIN CONFIGURATIONS
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
if (UNIX)
cmake_minimum_required(VERSION 3.4)
else()
cmake_minimum_required(VERSION 3.4)
endif ()
project(Project_userfct)
# flags
if (UNIX)
set(CMAKE_C_FLAGS "-fPIC")
set(CMAKE_EXE_LINKER_FLAGS "-fPIC")
endif (UNIX)
# Windows M_PI definitions
if (WIN32)
add_definitions(-D _USE_MATH_DEFINES)
endif (WIN32)
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# SEPARATE COMPILATION
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
if ( FLAG_SEPARATE_USER_FCT )
# additional CMakeLists.txt
set(CMAKE_AUX ${ROBOTRAN_SOURCE_DIR}/cmake_aux)
set(CMAKE_AUX_BIN ${PROJECT_BINARY_DIR}/cmake_aux)
add_subdirectory ( ${CMAKE_AUX}/flags/ ${CMAKE_AUX_BIN}/flags/ )
add_subdirectory ( ${CMAKE_AUX}/listing/ ${CMAKE_AUX_BIN}/listing/ )
add_subdirectory ( ${CMAKE_AUX}/libraries/ ${CMAKE_AUX_BIN}/libraries/ )
# real-time option
option (FLAG_REAL_TIME "Real time" OFF)
if(FLAG_REAL_TIME)
add_definitions( -DREAL_TIME )
# configure a header file to pass some of the CMake settings to the source code
configure_file (
"${ROBOTRAN_SOURCE_DIR}/conf/cmake_config.h.in"
"${PROJECT_BINARY_DIR}/conf/cmake_config.h"
)
include_directories (${PROJECT_BINARY_DIR}/conf)
# plot-visu options
option (FLAG_PLOT "Real time" OFF)
option (FLAG_VISU "Real time" OFF)
option (FLAG_JAVA "Real time" OFF)
option (FLAG_OPEN_GL "Real time" OFF)
if(FLAG_PLOT)
add_definitions( -DSDL )
endif( )
if(FLAG_VISU)
add_definitions( -DVISU_3D )
endif( )
if(FLAG_JAVA)
add_definitions( -DJAVA )
endif( )
if(FLAG_OPEN_GL)
add_definitions( -DOPEN_GL )
endif( )
endif ( )
endif ( )
# release of debug
release_debug()
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# SET LIBRARY
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# list source files to compile
init_src()
increment_src( ${PROJECT_SOURCE_DIR} )
increment_void_user( ${PROJECT_SOURCE_DIR} )
# list include directories (to find headers)
init_include()
increment_include( ${ROBOTRAN_SOURCE_DIR}/mbs_common )
# include these directories