Commit d73cadc4 authored by Nicolas Docquier's avatar Nicolas Docquier
Browse files

Merge branch 'v1.9.7' into 'master'

V1.9.7

See merge request !150
parents 92ed9ef4 a9477b9a
......@@ -4,6 +4,12 @@
*.m
*.anim
*.res
*.vtp
*.pvd
*.vtu
*.ogg
*.ogv
*.ipynb
**/*.m
stderr.txt
stdout.txt
......
......@@ -14,11 +14,11 @@ compilation_monolithic_realtimeOFF:
- ./exe_PendulumSpringC
- ./exe_PendulumSpringC_several_run
compilation_monolithic_realtimeON:
compilation_monolithic_realtimeON_Java:
script:
- mkdir ExampleProjects/PendulumSpringC/workR/build
- cd ExampleProjects/PendulumSpringC/workR/build
- cmake -DFLAG_REAL_TIME=ON ..
- cmake -DFLAG_REAL_TIME=ON -DFLAG_OPEN_GL=OFF -DFLAG_JAVA=ON ..
- make
- ./exe_PendulumSpringC
- ./exe_PendulumSpringC_several_run
......@@ -46,11 +46,11 @@ compilation_separate_realtimeOFF:
- ./exe_PendulumSpringC
- ./exe_PendulumSpringC_several_run
compilation_separate_realtimeON:
compilation_separate_realtimeON_Java:
script:
- mkdir MBsysC/build
- cd MBsysC/build
- cmake -DFLAG_REAL_TIME=ON ../mbs_common/
- cmake -DFLAG_REAL_TIME=ON -DFLAG_OPEN_GL=OFF -DFLAG_JAVA=ON ../mbs_common/
- make
- cd ../..
- mkdir ExampleProjects/PendulumSpringC/workR/build
......@@ -91,11 +91,24 @@ NewCompilation_separate_realtimeOFF:
- make
- ./exe_PendulumSpringC
NewCompilation_separate_realtimeON:
NewCompilation_separate_realtimeON_Java:
script:
- mkdir MBsysC/build
- cd MBsysC/build
- cmake -DFLAG_REAL_TIME=ON ..
- cmake -DFLAG_REAL_TIME=ON -DFLAG_OPEN_GL=OFF -DFLAG_JAVA=ON ..
- make
- cd ../..
- mkdir ExampleProjects/PendulumSpringC/workR/build
- cd ExampleProjects/PendulumSpringC/workR/build
- cmake -DFLAG_SEPARATE_BUILD=ON ..
- make
- ./exe_PendulumSpringC
NewCompilation_separate_realtimeON_OpenGL:
script:
- mkdir MBsysC/build
- cd MBsysC/build
- cmake -DFLAG_REAL_TIME=ON -DFLAG_OPEN_GL=ON -DFLAG_JAVA=OFF ..
- make
- cd ../..
- mkdir ExampleProjects/PendulumSpringC/workR/build
......@@ -441,3 +454,40 @@ Python_interface_realtimeOFF:
- cd ..
- python main.py
# --------------------------------------------------------------------------
# Other Example models: ----
# --------------------------------------------------------------------------
# ---- Coman robot: example project as a submodule ----
coman_mbysC:
before_script:
- git submodule sync --recursive
- git submodule update --init --recursive
script:
- mkdir ExampleProjects/coman_robot/workR/build
- cd ExampleProjects/coman_robot/workR/build
- cmake -DROBOTRAN_SOURCE_DIR=$(pwd)/../../../../MBsysC -DFLAG_RELEASE=OFF ..
- make
- ./exe_projectRobotran
after_script:
- rm -r ExampleProjects/coman_robot/workR/build # need to manually clean folder for gitlab-ci with submodule
only:
- dev
# --------------------------------------------------------------------------
# Generating Doxygen documentation (directly available on Gitlab pages) ----
# --------------------------------------------------------------------------
pages:
image: alpine
script:
- apk update && apk add doxygen
- cd ./MBsysC/mbs_documentation/src
- doxygen Doxyfile
- cd ../../..
- mv ./MBsysC/mbs_documentation/html/ public/
artifacts:
paths:
- public
only:
- dev
[submodule "ExampleProjects/coman_robot"]
path = ExampleProjects/coman_robot
url = ../../nvandernoot/coman_robot.git
\ No newline at end of file
## Changes for next release
## Robotran v1.9.7
* BugFix in equilibrium module (result vector was freed before being printed leading in some case to incoherent value)
* Add an integrator (Rosenbrock) dedicated to stiff problems: simply set the flag to use rosenbrock in dirdyn option to ON: `mbs_dirdyn->options->rosenbrock->flag_use = 1;` (same as for Dopri5)
* Add an application to generate VTK/ParaView output files. This required some adaptation of OpenGL 3D visu of NVdN (see merge request !135 for details). Requirements:
* Ubuntu: `sudo apt-get install libvtk6-dev libproj-dev`
* Remove deprecated headers, MBSdataStructR7.h and MBSfunR7.h. **If some old symbolic routines still use these headers, they can be re-generated from MBsysPad to get the proper headers.**
* Remove nwheel and rnom fieds from the MbsData structure. If necessary, those values should be defined via a user model.
* Add the possibility to load vrml files in the OpenGL 3D view
## Robotran v1.9.6
* Add the possibility to access and modify user_model parameters via the python interface. **This requires to generate again the UserModel.c/.h files (via MBsysPad: menu Tools=>Generate C-specific user files=>User model files)**
* Add the possibility to use user model parameters of type *integer* (those parameters can be defined from MBsysPad)
## Robotran v1.9.5
* All modules (MBsysC, interfaces, add-ons) are compiled from the same CMakeLists. The optionnal modules are activated with corresponding FLAG (`FLAG_INTERFACE_SIMULINK`, `FLAG_INTERFACE_PYTHON`, `FLAG_IPY_WITH_MBS_LMGC` and `FLAG_ADDON_MBSLMGC`).
* All modules (MBsysC, interfaces, add-ons) are compiled from the same CMakeLists. The optional modules are activated with corresponding FLAG (`FLAG_INTERFACE_SIMULINK`, `FLAG_INTERFACE_PYTHON`, `FLAG_IPY_WITH_MBS_LMGC` and `FLAG_ADDON_MBSLMGC`).
* Simulink interface: a (simple) interface between MBsysC is created, involving the following changes
* Definition of new optinal user files:
* user\_equil.c: is required for equilibrium module.
* user\_load.c: enable to execute specific code after loading the project (useful for Simulink since there is no main function to do it in Simulink)
* user\_load.c: enables to execute specific code after loading the project (useful for Simulink since there is no main function to do it in Simulink)
* template files are available in mbs\_workspace\_template and are added automatically if the files are not in the project. **Project update required: Either update userfctR\CMakeLists for backward compatibility (add call to `increment_void_user( ${PROJECT_SOURCE_DIR} )` just after increment_src) or copy/paste the new files from the template.**
* User specific output: the name of the file now have the resfilename as prefix.
* User model generation: the generation of the user_model files for mbs without defined user model is now compatible with Visual studio (structure is no more empty)
......
......@@ -91,7 +91,7 @@ endif()
# MBSysC libraries
if ( FLAG_SEPARATE_BUILD ) # find MBSysC dynamic libraries
find_package( LibRobotranC REQUIRED )
find_package( LibRobotranC 1.9.7 REQUIRED )
add_definitions(${LIB_MBSYSC_DEFINITIONS})
target_link_libraries(Project_symbolic ${LIB_MBSYSC_MODULES})
endif()
......@@ -131,7 +131,7 @@ endif()
# MBSysC libraries
if ( FLAG_SEPARATE_BUILD ) # find MBSysC dynamic libraries
find_package( LibRobotranC REQUIRED )
find_package( LibRobotranC 1.9.7 REQUIRED )
add_definitions(${LIB_MBSYSC_DEFINITIONS})
endif()
......
......@@ -8,7 +8,6 @@
# CMake for compiling a robotran-LMGC project
#
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
# PROJECT MAIN CONFIGURATIONS
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
......@@ -34,7 +33,7 @@ if(NOT DEFINED ROBOTRAN_SOURCE_DIR)
${PROJECT_SOURCE_DIR}/../mbsysCopy
)
find_path(ROBOTRAN_SOURCE_DIR mbs_common ${TRIAL_PATHS_MBSYSC} DOC "Path to the Robotran-MBsysC common files")
endif( )
endif ( )
# message to display the project name
message(STATUS "Processing ${PROJECT_NAME}")
......@@ -53,11 +52,11 @@ endif ( )
if (WIN32)
## --- WIN32 or WIN64 DETECTION --- ##
if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) # 64bit Windows
SET(WIN_LIB_DIRECTORY win64_include_lib)
else( ) # 32bit Windows
SET(WIN_LIB_DIRECTORY win32_include_lib)
endif( )
if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) # 64bit Windows
SET(WIN_LIB_DIRECTORY win64_include_lib)
else( ) # 32bit Windows
SET(WIN_LIB_DIRECTORY win32_include_lib)
endif( )
## ---- WINDOWS DLL FILES ---- ##
......@@ -175,7 +174,7 @@ flags_clean()
if ( FLAG_SEPARATE_BUILD ) # find MBSysC dynamic libraries
find_path(LibRobotranC_DIR LibRobotranCConfig.cmake "${ROBOTRAN_SOURCE_DIR}/build")
find_package( LibRobotranC REQUIRED )
find_package( LibRobotranC 1.9.7 REQUIRED )
target_link_libraries( ${Executable} ${LIB_MBSYSC_MODULES} ${LIB_MBSYSC_LOAD} ${LIB_MBSYSC_UTILITIES} )
add_definitions(${LIB_MBSYSC_DEFINITIONS})
......
""" Example script to demonstrate how to produce the output file
to visualize the 3D animation in paraview
"""
import CyMbsVtk
import os
projDir = "/home/ndocquier/Documents/MBsysC/ExampleProjects/MultiplePendulum"
outputter = CyMbsVtk.CyMbsVtkOutputter(projDir+"/dataR/MultiplePendulum.mbs")
# Create (if necessary) and set the output dir
output_path = os.path.join(projDir+"/animationR/vtp2/")
if not os.path.isdir(output_path):
os.mkdir(output_path)
outputter.SetOutputDirectory(output_path)
# Set the name of the output files
outputter.SetOutputFilename("dirdyn")
# Set the number of timestep between to output files
outputter.SetFrameStep(500)
# Print the files
outputter.PrintFiles(projDir+"/animationR/dirdyn_q.anim")
<?xml version="1.0" encoding="UTF-8"?>
<mbsDescR7>
<mbsname>PendulumSpringC</mbsname>
<mbsyspad_version>1.9.4</mbsyspad_version>
<mbsyspad_version>1.9.6</mbsyspad_version>
<base>
<!--this is the base body-->
<gravity>
......@@ -88,12 +88,11 @@
</base_body>
</x2D>
<x3D>
<x3D_frame />
<x3D_points />
<x3D_lines />
<x3D_shapes>
<inline>
<name>New_Shape</name>
<name>Frame</name>
<position>
<x>-0.15</x>
<y>-0.06</y>
......@@ -110,9 +109,38 @@
<z>0.0</z>
</rotation>
<color R="0" G="0" B="0" />
<specularColor R="255" G="255" B="255" />
<shininess>250.0</shininess>
<transparency>0.0</transparency>
<url>PRJPATH/animationR/vrml/base3.wrl</url>
</inline>
<box>
<name>Wall</name>
<position>
<x>-0.25</x>
<y>-0.3</y>
<z>0.4</z>
</position>
<scale>
<x>1.0</x>
<y>1.0</y>
<z>1.0</z>
</scale>
<rotation>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
</rotation>
<color R="51" G="51" B="51" />
<specularColor R="255" G="255" B="255" />
<shininess>250.0</shininess>
<transparency>0.0</transparency>
<size>
<x>2.0</x>
<y>0.05</y>
<z>2.0</z>
</size>
</box>
</x3D_shapes>
</x3D>
</graphics>
......@@ -245,7 +273,7 @@
<x3D_lines />
<x3D_shapes>
<inline>
<name>New_Shape</name>
<name>Pendulum</name>
<position>
<x>0.0</x>
<y>0.0</y>
......@@ -262,7 +290,9 @@
<z>0.0</z>
</rotation>
<color R="255" G="0" B="51" />
<transparency>0.41999998688697815</transparency>
<specularColor R="255" G="255" B="255" />
<shininess>250.0</shininess>
<transparency>0.0</transparency>
<url>PRJPATH/animationR/vrml/pendulum2.wrl</url>
</inline>
</x3D_shapes>
......@@ -344,7 +374,7 @@
<x3D_lines />
<x3D_shapes>
<inline>
<name>New_Shape</name>
<name>Slider</name>
<position>
<x>0.0</x>
<y>0.0</y>
......@@ -361,6 +391,8 @@
<z>0.0</z>
</rotation>
<color R="0" G="0" B="0" />
<specularColor R="255" G="255" B="255" />
<shininess>250.0</shininess>
<transparency>0.0</transparency>
<url>PRJPATH/animationR/vrml/slider.wrl</url>
</inline>
......@@ -460,7 +492,7 @@
<x3D_lines />
<x3D_shapes>
<inline>
<name>New_Shape</name>
<name>Crank</name>
<position>
<x>0.0</x>
<y>0.0</y>
......@@ -477,6 +509,8 @@
<z>0.0</z>
</rotation>
<color R="0" G="0" B="0" />
<specularColor R="255" G="255" B="255" />
<shininess>250.0</shininess>
<transparency>0.0</transparency>
<url>PRJPATH/animationR/vrml/crank.wrl</url>
</inline>
......@@ -594,7 +628,7 @@
<x3D_lines />
<x3D_shapes>
<inline>
<name>New_Shape</name>
<name>Rod</name>
<position>
<x>0.0</x>
<y>0.03</y>
......@@ -611,6 +645,8 @@
<z>1.5707963267948966</z>
</rotation>
<color R="0" G="0" B="0" />
<specularColor R="255" G="255" B="255" />
<shininess>250.0</shininess>
<transparency>0.0</transparency>
<url>PRJPATH/animationR/vrml/rod.wrl</url>
</inline>
......@@ -755,6 +791,10 @@
<com>0.3</com>
<point>0.3</point>
</shapeScaleFactors>
<opengl>
<lightAndShadowMode>SHADOW_MAPPING_SHADER</lightAndShadowMode>
<glfwSample>4</glfwSample>
</opengl>
<viewpoints>
<!--This is the viewpoint list-->
<viewpoint>
......@@ -785,12 +825,12 @@
<name>New_Viewpoint</name>
<joint>base</joint>
<position>
<x>0.0</x>
<y>3.0</y>
<x>-0.25</x>
<y>1.0</y>
<z>0.5</z>
</position>
<target>
<x>0.0</x>
<x>-0.25</x>
<y>0.0</y>
<z>0.5</z>
</target>
......@@ -799,8 +839,8 @@
<y>0.0</y>
<z>-1.0</z>
</up>
<projection>perspective</projection>
<scale>1.0</scale>
<projection>parallel</projection>
<scale>0.2</scale>
<fieldOfView>0.785</fieldOfView>
<frontClipDst>0.01</frontClipDst>
<backClipDst>50.0</backClipDst>
......@@ -856,47 +896,46 @@
</viewpoints>
<lights>
<!--This is the light list-->
<directionalLight>
<name>DefaultLight01</name>
<spotLight>
<name>New_Light</name>
<joint>base</joint>
<active />
<direction>
<x>2.0</x>
<y>1.0</y>
<color R="255" G="255" B="255" />
<ambient>0.05</ambient>
<depthXWidth>1024.0</depthXWidth>
<depthYWidth>1024.0</depthYWidth>
<depthNear>0.1</depthNear>
<depthFar>100.0</depthFar>
<shadowBias>0.0</shadowBias>
<zUpVector>
<x>0.0</x>
<y>0.0</y>
<z>1.0</z>
</direction>
</directionalLight>
<directionalLight>
<name>DefaultLight02</name>
<joint>base</joint>
</zUpVector>
<active />
<direction>
<x>-1.0</x>
<y>-2.0</y>
<z>-1.0</z>
</direction>
</directionalLight>
<directionalLight>
<name>DefaultLight03</name>
<joint>base</joint>
<active />
<direction>
<x>1.0</x>
<position>
<x>-0.25</x>
<y>1.2000000476837158</y>
<z>0.4000000059604645</z>
</position>
<attenuation>
<cst>1.0</cst>
<lin>0.0</lin>
<quad>0.0</quad>
</attenuation>
<depthFovRad>1.0</depthFovRad>
<shadowDirVector>
<x>0.0</x>
<y>-1.0</y>
<z>-2.0</z>
</direction>
</directionalLight>
<directionalLight>
<name>DefaultLight04</name>
<joint>base</joint>
<active />
<z>0.0</z>
</shadowDirVector>
<direction>
<x>-1.0</x>
<y>2.0</y>
<z>1.0</z>
<x>0.0</x>
<y>-1.0</y>
<z>0.0</z>
</direction>
</directionalLight>
<angle>0.5235988</angle>
<concentration>0.0</concentration>
</spotLight>
</lights>
</x3D>
</mbsDescR7>
<?xml version="1.0" encoding="UTF-8"?>
<mbsDescR7>
<mbsname>PendulumSpringC</mbsname>
<mbsyspad_version>1.9.5</mbsyspad_version>
<mbsyspad_version>1.9.6</mbsyspad_version>
<base>
<!--this is the base body-->
<gravity>
......@@ -88,12 +88,11 @@
</base_body>
</x2D>
<x3D>
<x3D_frame />
<x3D_points />
<x3D_lines />
<x3D_shapes>
<inline>
<name>New_Shape</name>
<name>Frame</name>
<position>
<x>-0.15</x>
<y>-0.06</y>
......@@ -116,7 +115,7 @@
<url>PRJPATH/animationR/obj/base3.obj</url>
</inline>
<box>
<name>New_Shape</name>
<name>Wall</name>
<position>
<x>-0.25</x>
<y>-0.3</y>
......@@ -274,7 +273,7 @@
<x3D_lines />
<x3D_shapes>
<inline>
<name>New_Shape</name>
<name>Pendulum</name>
<position>
<x>0.0</x>
<y>0.0</y>
......@@ -375,7 +374,7 @@
<x3D_lines />
<x3D_shapes>
<inline>
<name>New_Shape</name>
<name>Slider</name>
<position>
<x>0.0</x>
<y>0.0</y>
......@@ -493,7 +492,7 @@
<x3D_lines />
<x3D_shapes>
<inline>
<name>New_Shape</name>
<name>Crank</name>
<position>
<x>0.0</x>
<y>0.0</y>
......@@ -629,7 +628,7 @@
<x3D_lines />
<x3D_shapes>
<inline>
<name>New_Shape</name>
<name>Rod</name>
<position>
<x>0.0</x>
<y>0.03</y>
......@@ -793,7 +792,7 @@
<point>0.3</point>
</shapeScaleFactors>
<opengl>
<lightAndShadowMode>LIGHTS_SHADER</lightAndShadowMode>
<lightAndShadowMode>SHADOW_MAPPING_SHADER</lightAndShadowMode>
<glfwSample>4</glfwSample>
</opengl>
<viewpoints>
......
......@@ -62,7 +62,7 @@ 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)
......@@ -91,7 +91,7 @@ endif()
# MBSysC libraries
if ( FLAG_SEPARATE_BUILD ) # find MBSysC dynamic libraries
find_package( LibRobotranC 1.9.6 REQUIRED )
find_package( LibRobotranC 1.9.7 REQUIRED )
add_definitions(${LIB_MBSYSC_DEFINITIONS})
target_link_libraries(Project_symbolic ${LIB_MBSYSC_MODULES})
endif()
......@@ -11,7 +11,7 @@
// 1348 Louvain-la-Neuve
// http://www.robotran.be//
//
// ==> Generation Date : Fri Jan 23 18:26:26 2015
// ==> Generation Date : Wed Aug 16 17:34:46 2017
//
// ==> Project name : PendulumSpringC
// ==> using XML input file
......@@ -29,8 +29,7 @@
#include <math.h>
#include "MBSdataStructR7.h"
//#include "MBSfunR7.h"
#include "mbs_data.h"
#include "mbs_project_interface.h"
void mbs_cons_hJ(double *h,double **Jac,
......
......@@ -11,7 +11,7 @@
// 1348 Louvain-la-Neuve
// http://www.robotran.be//
//
// ==> Generation Date : Fri Jan 23 18:26:26 2015
// ==> Generation Date : Wed Aug 16 17:34:46 2017
//
// ==> Project name : PendulumSpringC
// ==> using XML input file
......@@ -29,8 +29,7 @@
#include <math.h>
#include "MBSdataStructR7.h"
//#include "MBSfunR7.h"
#include "mbs_data.h"
#include "mbs_project_interface.h"
void mbs_cons_jdqd(double *Jdqd,
......
......@@ -11,7 +11,7 @@
// 1348 Louvain-la-Neuve
// http://www.robotran.be//
//
// ==> Generation Date : Fri Jan 23 18:26:26 2015
// ==> Generation Date : Wed Aug 16 17:34:46 2017
//
// ==> Project name : PendulumSpringC