Commit e4ec6f31 authored by alexbuset's avatar alexbuset

Test

parent 3dd3a8a8
Pipeline #5448 failed with stages
<?xml version="1.0" encoding="UTF-8"?>
<mbsDescR7>
<mbsname>CartPendulum</mbsname>
<mbsyspad_version>1.11.0</mbsyspad_version>
<base>
<!--this is the base body-->
<gravity>
<coordinates>
<x>0.0</x>
<y>0.0</y>
<z>-9.81</z>
</coordinates>
</gravity>
<baseBodyName>Body_0</baseBodyName>
<graphics>
<x2D>
<position>
<x>482.0</x>
<y>394.0</y>
</position>
<base_body>
<position>
<x>-157.0</x>
<y>-18.0</y>
</position>
<name_pos>
<x>0.0</x>
<y>0.0</y>
</name_pos>
<shape>rectangle</shape>
<size>
<x>418.0</x>
<y>40.0</y>
</size>
<control_points>
<control_point>
<x>261.0</x>
<y>-18.0</y>
</control_point>
<control_point>
<x>261.0</x>
<y>22.0</y>
</control_point>
<control_point>
<x>-157.0</x>
<y>22.0</y>
</control_point>
<control_point>
<x>-157.0</x>
<y>-18.0</y>
</control_point>
</control_points>
<angle>0.0</angle>
</base_body>
</x2D>
<x3D>
<x3D_points />
<x3D_lines />
<x3D_shapes>
<box>
<name>ground</name>
<position>
<x>0.0</x>
<y>0.0</y>
<z>0.0</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="153" G="153" B="153" />
<specularColor R="255" G="255" B="255" />
<shininess>250.0</shininess>
<transparency>0.0</transparency>
<size>
<x>50.0</x>
<y>0.1</y>
<z>0.001</z>
</size>
</box>
<box>
<name>setpoint_1m</name>
<position>
<x>1.0</x>
<y>-0.1</y>
<z>0.0</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="255" G="0" B="255" />
<specularColor R="255" G="255" B="255" />
<shininess>250.0</shininess>
<transparency>0.0</transparency>
<size>
<x>0.05</x>
<y>0.1</y>
<z>0.1</z>
</size>
</box>
</x3D_shapes>
</x3D>
</graphics>
</base>
<bodytree>
<!--this is the body tree-->
<body>
<bodyname>Cart</bodyname>
<parent>
<bodyname>base</bodyname>
<pointname>origin</pointname>
</parent>
<joint>
<jointname>T1_Cart</jointname>
<type>T1</type>
<nature>independent</nature>
<actuated />
<graphics>
<x2D>
<position>
<x>555.0</x>
<y>306.0</y>
</position>
</x2D>
<x3D>
<x3D_joint />
<x3D_frame />
</x3D>
</graphics>
</joint>
<mass>1.0</mass>
<graphics>
<x2D>
<position>
<x>-124.0</x>
<y>-37.0</y>
</position>
<name_pos>
<x>0.0</x>
<y>0.0</y>
</name_pos>
<shape>rectangle</shape>
<size>
<x>222.0</x>
<y>61.0</y>
</size>
<control_points>
<control_point>
<x>98.0</x>
<y>-37.0</y>
</control_point>
<control_point>
<x>98.0</x>
<y>24.0</y>
</control_point>
<control_point>
<x>-124.0</x>
<y>24.0</y>
</control_point>
<control_point>
<x>-124.0</x>
<y>-37.0</y>
</control_point>
</control_points>
<angle>0.0</angle>
</x2D>
<x3D>
<x3D_com />
<x3D_points />
<x3D_lines />
<x3D_shapes>
<box>
<name>New_Shape</name>
<position>
<x>0.0</x>
<y>0.0</y>
<z>0.0</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="0" G="0" B="0" />
<specularColor R="255" G="255" B="255" />
<shininess>250.0</shininess>
<transparency>0.30000001192092896</transparency>
<size>
<x>0.5</x>
<y>0.1</y>
<z>0.1</z>
</size>
</box>
</x3D_shapes>
</x3D>
</graphics>
</body>
<body>
<bodyname>Pendulum</bodyname>
<parent>
<bodyname>Cart</bodyname>
<pointname>origin</pointname>
</parent>
<joint>
<jointname>R3_Pendulum</jointname>
<type>R3</type>
<nature>driven</nature>
<initialvalue>
<q>3.1416</q>
</initialvalue>
<symbols>
<q />
<qd />
<qdd />
</symbols>
<graphics>
<x2D>
<position>
<x>486.0</x>
<y>222.0</y>
</position>
</x2D>
<x3D>
<x3D_joint />
<x3D_frame />
</x3D>
</graphics>
</joint>
<joint>
<jointname>R2_Pendulum</jointname>
<type>R2</type>
<nature>independent</nature>
<graphics>
<x2D>
<position>
<x>597.0</x>
<y>231.0</y>
</position>
</x2D>
<x3D>
<x3D_joint />
<x3D_frame />
</x3D>
</graphics>
</joint>
<mass>1.0</mass>
<com>
<coordinates>
<x>0.0</x>
<y>0.0</y>
<z>0.5</z>
</coordinates>
</com>
<point>
<pointname>Point_0</pointname>
<coordinates>
<x>0.0</x>
<y>0.0</y>
<z>0.5</z>
</coordinates>
<graphics>
<x2D>
<position>
<x>598.0</x>
<y>35.0</y>
</position>
</x2D>
<x3D />
</graphics>
<extforce name="ExtForce" Pos="true" Rot="true" Vit="true" Om="true" Acc="true" Omp="true" />
</point>
<graphics>
<x2D>
<position>
<x>-18.0</x>
<y>-209.0</y>
</position>
<name_pos>
<x>0.0</x>
<y>0.0</y>
</name_pos>
<shape>rectangle</shape>
<size>
<x>37.0</x>
<y>236.0</y>
</size>
<control_points>
<control_point>
<x>19.0</x>
<y>-209.0</y>
</control_point>
<control_point>
<x>19.0</x>
<y>27.0</y>
</control_point>
<control_point>
<x>-18.0</x>
<y>27.0</y>
</control_point>
<control_point>
<x>-18.0</x>
<y>-209.0</y>
</control_point>
</control_points>
<angle>0.0</angle>
</x2D>
<x3D>
<x3D_com />
<x3D_points />
<x3D_lines />
<x3D_shapes>
<box>
<name>New_Shape</name>
<position>
<x>0.0</x>
<y>0.0</y>
<z>0.5</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="0" G="0" B="0" />
<specularColor R="255" G="255" B="255" />
<shininess>250.0</shininess>
<transparency>0.0</transparency>
<size>
<x>0.01</x>
<y>0.01</y>
<z>1.0</z>
</size>
</box>
</x3D_shapes>
</x3D>
</graphics>
</body>
</bodytree>
<user_models>
<!--this is the userModel list-->
<user_model>
<name>lin_struct</name>
<parameter>
<name>ss</name>
<type>structure</type>
<structure>MbsSS</structure>
<header>mbs_statespace_struct.h</header>
</parameter>
<parameter>
<name>lpk</name>
<type>structure</type>
<structure>MbsLpk</structure>
<header>mbs_linearipk_struct.h</header>
</parameter>
<parameter>
<name>New_Parameter</name>
<type>scalar</type>
<value>0.0</value>
</parameter>
</user_model>
<user_model>
<name>lqr</name>
<parameter>
<name>K</name>
<type>vector</type>
<value>0.0</value>
<value>0.0</value>
<value>0.0</value>
<value>0.0</value>
</parameter>
<parameter>
<name>process</name>
<type>scalar</type>
<value>0.0</value>
</parameter>
</user_model>
</user_models>
<user_variables>
<!--this is the userIO list-->
<user_variable>
<varname>A</varname>
<type>out</type>
<size>16</size>
</user_variable>
<user_variable>
<varname>B</varname>
<type>out</type>
<size>4</size>
</user_variable>
<user_variable>
<varname>dF</varname>
<type>in</type>
<size>1</size>
</user_variable>
</user_variables>
<x3D>
<background>
<!--This is the background properties-->
<color R="51" G="102" B="204" />
</background>
<shapeScaleFactors>
<!--This is the scale factors-->
<frame>0.2</frame>
<joint>0.3</joint>
<com>0.3</com>
<point>0.3</point>
</shapeScaleFactors>
<opengl>
<lightAndShadowMode>LIGHTS_NO_SPEC_SHADER</lightAndShadowMode>
<glfwSample>4</glfwSample>
</opengl>
<viewpoints>
<!--This is the viewpoint list-->
<viewpoint>
<name>cart</name>
<joint>T1_Cart</joint>
<position>
<x>2.0</x>
<y>2.0</y>
<z>2.0</z>
</position>
<target>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
</target>
<up>
<x>0.0</x>
<y>0.0</y>
<z>1.0</z>
</up>
<projection>perspective</projection>
<scale>1.0</scale>
<fieldOfView>0.785</fieldOfView>
<frontClipDst>0.01</frontClipDst>
<backClipDst>50.0</backClipDst>
</viewpoint>
<viewpoint>
<name>Fixed</name>
<joint>base</joint>
<position>
<x>25.0</x>
<y>1.0</y>
<z>1.0</z>
</position>
<target>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
</target>
<up>
<x>0.0</x>
<y>0.0</y>
<z>1.0</z>
</up>
<projection>perspective</projection>
<scale>1.0</scale>
<fieldOfView>0.785</fieldOfView>
<frontClipDst>0.01</frontClipDst>
<backClipDst>50.0</backClipDst>
</viewpoint>
</viewpoints>
<lights>
<!--This is the light list-->
<directionalLight>
<name>DefaultLight01</name>
<joint>base</joint>
<color R="255" G="255" B="255" />
<ambient>0.05</ambient>
<depthXWidth>1024.0</depthXWidth>
<depthYWidth>1024.0</depthYWidth>
<depthNear>-10.0</depthNear>
<depthFar>20.0</depthFar>
<shadowBias>0.0</shadowBias>
<zUpVector>
<x>0.0</x>
<y>0.0</y>
<z>1.0</z>
</zUpVector>
<active />
<direction>
<x>2.0</x>
<y>1.0</y>
<z>1.0</z>
</direction>
<depthScale>0.0015</depthScale>
<relPointVector>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
</relPointVector>
</directionalLight>
<directionalLight>
<name>DefaultLight02</name>
<joint>base</joint>
<color R="255" G="255" B="255" />
<ambient>0.05</ambient>
<depthXWidth>1024.0</depthXWidth>
<depthYWidth>1024.0</depthYWidth>
<depthNear>-10.0</depthNear>
<depthFar>20.0</depthFar>
<shadowBias>0.0</shadowBias>
<zUpVector>
<x>0.0</x>
<y>0.0</y>
<z>1.0</z>
</zUpVector>
<active />
<direction>
<x>-1.0</x>
<y>-2.0</y>
<z>-1.0</z>
</direction>
<depthScale>0.0015</depthScale>
<relPointVector>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
</relPointVector>
</directionalLight>
<directionalLight>
<name>DefaultLight03</name>
<joint>base</joint>
<color R="255" G="255" B="255" />
<ambient>0.05</ambient>
<depthXWidth>1024.0</depthXWidth>
<depthYWidth>1024.0</depthYWidth>
<depthNear>-10.0</depthNear>
<depthFar>20.0</depthFar>
<shadowBias>0.0</shadowBias>
<zUpVector>
<x>0.0</x>
<y>0.0</y>
<z>1.0</z>
</zUpVector>
<active />
<direction>
<x>1.0</x>
<y>-1.0</y>
<z>-2.0</z>
</direction>
<depthScale>0.0015</depthScale>
<relPointVector>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
</relPointVector>
</directionalLight>
<directionalLight>
<name>DefaultLight04</name>
<joint>base</joint>
<color R="255" G="255" B="255" />
<ambient>0.05</ambient>
<depthXWidth>1024.0</depthXWidth>
<depthYWidth>1024.0</depthYWidth>
<depthNear>-10.0</depthNear>
<depthFar>20.0</depthFar>
<shadowBias>0.0</shadowBias>
<zUpVector>
<x>0.0</x>
<y>0.0</y>
<z>1.0</z>
</zUpVector>
<active />
<direction>
<x>-1.0</x>
<y>2.0</y>
<z>1.0</z>
</direction>
<depthScale>0.0015</depthScale>
<relPointVector>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
</relPointVector>
</directionalLight>
</lights>
</x3D>
</mbsDescR7>
the data fits exactly the simulink example from :
https://mathworks.com/help/mpc/examples/control-of-an-inverted-pendulum-on-a-cart.html
if the link is not working, look for "Control of an Inverted Pendulum on a Cart matlab"
\ No newline at end of file
#
# 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 ()
if(NOT DEFINED SYMBOLIC_LIB_NAME)
set (SYMBOLIC_LIB_NAME "Project_symbolic")
endif ( )
project(${SYMBOLIC_LIB_NAME})
# 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(${SYMBOLIC_LIB_NAME} SHARED ${SOURCE_FILES})
# MacOS: Force extension to be .so rather than .dylib
if(APPLE)
set_target_properties(${SYMBOLIC_LIB_NAME} PROPERTIES SUFFIX .so)
endif()