Skip to content

Commit c3a124e

Browse files
committed
added openVR lib, enhanced visualization settings, renderState, initial accelerations, graphics data, Python3.11; for details see theDoc.pdf section issues
1 parent 6b61b7a commit c3a124e

File tree

125 files changed

+5158
-2927
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+5158
-2927
lines changed

INSTALL.txt

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
for installation use:
22
pip install exudyn
3+
34
pre-compiled binaries are available via pypi.org
4-
For building instructions and detailed information on installation see docs/theDoc/theDoc.pdf
5+
6+
for installation of pre-release versions, use:
7+
pip install exudyn --pre
8+
9+
For Examples see:
10+
https://github.com/jgerstmayr/EXUDYN/tree/master/main/pythonDev/Examples
11+
https://github.com/jgerstmayr/EXUDYN/tree/master/main/pythonDev/TestModels
12+
13+
For building instructions and detailed information on installation see:
14+
https://github.com/jgerstmayr/EXUDYN/tree/master/docs/theDoc/theDoc.pdf
515

LICENSE.txt

+31
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,37 @@ other computer software, distribute, and sublicense such enhancements or
654654
derivative works thereof, in binary and source code form.
655655

656656

657+
======================================
658+
OpenVR: Exudyn includes a link to OpenVR, using basic interfacing libraries from Valve:
659+
660+
Copyright (c) 2015, Valve Corporation
661+
All rights reserved.
662+
663+
Redistribution and use in source and binary forms, with or without modification,
664+
are permitted provided that the following conditions are met:
665+
666+
1. Redistributions of source code must retain the above copyright notice, this
667+
list of conditions and the following disclaimer.
668+
669+
2. Redistributions in binary form must reproduce the above copyright notice,
670+
this list of conditions and the following disclaimer in the documentation and/or
671+
other materials provided with the distribution.
672+
673+
3. Neither the name of the copyright holder nor the names of its contributors
674+
may be used to endorse or promote products derived from this software without
675+
specific prior written permission.
676+
677+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
678+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
679+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
680+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
681+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
682+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
683+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
684+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
685+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
686+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
687+
657688
======================================
658689
LEST - Copyright 2013-2018 by Martin Moene
659690
Boost Software License - Version 1.0 - August 17th, 2003

README.rst

+104-58
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Exudyn
44

55
**A flexible multibody dynamics systems simulation code with Python and C++**
66

7-
+ Exudyn version = 1.5.65.dev1 (Fitzgerald)
8-
+ build date and time=2023-01-12 22:42
7+
+ Exudyn version = 1.5.75.dev1 (Fitzgerald)
8+
+ build date and time=2023-01-19 08:08
99
+ **University of Innsbruck**, Austria, Department of Mechatronics
1010

1111
Exudyn 1.5 is out! It includes now Python 3.7/8 - 3.10 wheels for MacOS (since 1.5.11.dev1 also showing tkinter dialogs!), improved compatibility for AVX2, simple reeving system, improved Lie group integration, improved RollingDisc, DistanceSensor, and many fixes; further features are multi-threading support; minimum coordinate formulation (KinematicTree); machine learning and artificial intelligence interface (openAI gym); improved explicit and implicit solvers; sparse matrix support; basic hydraulic actuator; creation of beams along curves; extended robotics modules; contact module; **PlotSensor** for simple post processing, and some improved 3D visualization, ... See theDoc.pdf chapter **Issues and Bugs** for changes!
@@ -116,15 +116,17 @@ The cooperation and funding within the EU H2020-MSCA-ITN project 'Joint Training
116116
The following people have contributed to Python and C++ library implementations (as well as to testing, examples, theory, ...):
117117

118118
+ Joachim Schöberl, TU Vienna (Providing specialized NGsolve core library with \ ``taskmanager``\ for \ **multi-threaded parallelization**\ ; NGsolve mesh and FE-matrices import; highly efficient eigenvector computations)
119-
+ Stefan Holzinger, University of Innsbruck (Lie group solvers in Python, Lie group node)
119+
+ Stefan Holzinger, University of Innsbruck (Lie group module and solvers in Python, Lie group node, testing)
120120
+ Andreas Zwölfer, Technical University Munich (FFRF and CMS formulation)
121-
+ Peter Manzl, University of Innsbruck (ConvexRoll Python and C++ implementation / pip install on linux / wsl with graphics)
121+
+ Peter Manzl, University of Innsbruck (ConvexRoll Python and C++ implementation, pip install on linux, wsl with graphics)
122122
+ Martin Sereinig, University of Innsbruck (special robotics functionality)
123+
+ Michael Pieber, University of Innsbruck (helped in several Python libraries)
123124
+ Grzegorz Orzechowski, Lappeenranta University of Technology (coupling with openAI gym and running machine learning algorithms)
125+
+ Aaron Bacher, University of Innsbruck (helped to integrated OpenVR, connection with Franka Emika Panda)
124126

125127
The following people have contributed to examples, testing and theory:
126128

127-
+ Michael Pieber, Konstantina Ntarladima, Manuel Schieferle, Martin Knapp, Lukas March, Dominik Sponring, David Wibmer, Simon Scheiber
129+
+ Konstantina Ntarladima, Manuel Schieferle, Martin Knapp, Lukas March, Dominik Sponring, David Wibmer, Simon Scheiber
128130

129131
-- thanks a lot! --
130132

@@ -1198,8 +1200,58 @@ The visualization settings structure can be accessed in the system container \ `
11981200
11991201
12001202
1203+
Renderer and 3D graphics
1204+
========================
1205+
1206+
A 3D renderer is attached to the simulation. Visualization is started with \ ``exu.StartRenderer()``\ , see the examples and tutorials.
1207+
The renderer uses an OpenGL window of a library called GLFW, which is platform-independent.
1208+
The renderer is set up in a minimalistic way, just to ensure that you can check that the modeling is correct. There is no way to contruct models with the renderer. Try to avoid huge number of triangles in STL files or by creating large number of complex objects, such as spheres or cylinders.
1209+
1210+
There are some main features in the renderer, using keyboard and mouse:
1211+
1212+
+ press key H to show help in renderer
1213+
+ move model by pressing left mouse button and drag
1214+
+ rotate model by pressing right mouse button and drag
1215+
+ change visibility (wire frame, solid, transparent, ...) by pressing T
1216+
+ zoom all: key A
1217+
+ open visualization dialog: key V
1218+
+ show item number: click on graphics element with left mouse button
1219+
+ show item dictionary: click on graphics element with right mouse button
1220+
+ ... (see theDoc.pdfff.)
1221+
1222+
Depending on your model (size, place, ...), you may need to adjust the following \ ``openGL``\ parameters in \ ``visualizationSettings``\ :
1223+
1224+
+ light and light position
1225+
+ shadow (turned off by using 0; turned on by using, e.g., a value of 0.3) and shadow polygon offset; shadow slows down graphics performance by a factor of 2-3, depending on your graphics card
1226+
+ visibility of nodes, markers, etc. in according bodies, nodes, markers, ..., \ ``visualizationSettings``\
1227+
+ move camera with a selected marker: adjust \ ``trackMarker``\ in \ ``visualizationSettings.interactive``\
1228+
+ ... (see theDoc.pdfff.)
1229+
1230+
1231+
1232+
Graphics pipeline
1233+
=================
1234+
1235+
There are basically two loops during simulation, which feed the graphics pipeline.
1236+
The solver runs a loop:
1237+
1238+
+ compute step (or set up initial values)
1239+
+ finish computation step; results are in current state
1240+
+ copy current state to visualization state (thread safe)
1241+
+ signal graphics pipeline that new visualization data is available
1242+
+ the renderer may update the visualization depending on \ ``graphicsUpdateInterval``\ in \ \ ``visualizationSettings.general``\
1243+
1244+
The openGL graphics thread (=separate thread) runs the following loop:
1245+
1246+
+ render openGL scene with a given graphicsData structure (containing lines, faces, text, ...)
1247+
+ go idle for some milliseconds
1248+
+ check if openGL rendering needs an update (e.g. due to user interaction)
1249+
=> if update is needed, the visualization of all items is updated -- stored in a graphicsData structure)
1250+
+ check if new visualization data is available and the time since last update is larger than a presribed value, the graphicsData structure is updated with the new visualization state
1251+
1252+
12011253
Storing the model view
1202-
----------------------
1254+
======================
12031255
12041256
12051257
There is a simple way to store the current view (zoom, centerpoint, orientation, etc.) by using \ ``SC.GetRenderState()``\ and \ ``SC.SetRenderState()``\ ,
@@ -1263,58 +1315,8 @@ Note that in the current version of Exudyn there is more data stored in render s
12631315
see also theDoc.pdf.
12641316
12651317
1266-
Renderer and 3D graphics
1267-
========================
1268-
1269-
A 3D renderer is attached to the simulation. Visualization is started with \ ``exu.StartRenderer()``\ , see the examples and tutorials.
1270-
The renderer uses an OpenGL window of a library called GLFW, which is platform-independent.
1271-
The renderer is set up in a minimalistic way, just to ensure that you can check that the modeling is correct. There is no way to contruct models with the renderer. Try to avoid huge number of triangles in STL files or by creating large number of complex objects, such as spheres or cylinders.
1272-
1273-
There are some main features in the renderer, using keyboard and mouse:
1274-
1275-
+ press key H to show help in renderer
1276-
+ move model by pressing left mouse button and drag
1277-
+ rotate model by pressing right mouse button and drag
1278-
+ change visibility (wire frame, solid, transparent, ...) by pressing T
1279-
+ zoom all: key A
1280-
+ open visualization dialog: key V
1281-
+ show item number: click on graphics element with left mouse button
1282-
+ show item dictionary: click on graphics element with right mouse button
1283-
+ ... (see theDoc.pdfff.)
1284-
1285-
Depending on your model (size, place, ...), you may need to adjust the following \ ``openGL``\ parameters in \ ``visualizationSettings``\ :
1286-
1287-
+ light and light position
1288-
+ shadow (turned off by using 0; turned on by using, e.g., a value of 0.3) and shadow polygon offset; shadow slows down graphics performance by a factor of 2-3, depending on your graphics card
1289-
+ visibility of nodes, markers, etc. in according bodies, nodes, markers, ..., \ ``visualizationSettings``\
1290-
+ move camera with a selected marker: adjust \ ``trackMarker``\ in \ ``visualizationSettings.interactive``\
1291-
+ ... (see theDoc.pdfff.)
1292-
1293-
1294-
1295-
Graphics pipeline
1296-
=================
1297-
1298-
There are basically two loops during simulation, which feed the graphics pipeline.
1299-
The solver runs a loop:
1300-
1301-
+ compute step (or set up initial values)
1302-
+ finish computation step; results are in current state
1303-
+ copy current state to visualization state (thread safe)
1304-
+ signal graphics pipeline that new visualization data is available
1305-
+ the renderer may update the visualization depending on \ ``graphicsUpdateInterval``\ in \ \ ``visualizationSettings.general``\
1306-
1307-
The openGL graphics thread (=separate thread) runs the following loop:
1308-
1309-
+ render openGL scene with a given graphicsData structure (containing lines, faces, text, ...)
1310-
+ go idle for some milliseconds
1311-
+ check if openGL rendering needs an update (e.g. due to user interaction)
1312-
=> if update is needed, the visualization of all items is updated -- stored in a graphicsData structure)
1313-
+ check if new visualization data is available and the time since last update is larger than a presribed value, the graphicsData structure is updated with the new visualization state
1314-
1315-
1316-
Graphics user Python functions
1317-
==============================
1318+
Graphics user functions via Python
1319+
==================================
13181320
13191321
There are some user functions in order to customize drawing:
13201322
@@ -1581,9 +1583,53 @@ However, there are many \ **ways to speed up Exudyn in general**\ :
15811583
15821584
15831585
1586+
---------------
1587+
Advanced topics
1588+
---------------
1589+
1590+
This section covers some advanced topics, which may be only relevant for a smaller group of people.
1591+
Functionality may be extended but also removed in future
1592+
1593+
------
1594+
OpenVR
1595+
------
1596+
1597+
The general open source libraries from Valve, see
1598+
1599+
https://github.com/ValveSoftware/openvr
1600+
1601+
have been linked to Exudyn . In order to get OpenVR fully integrated, you need to run \ ``setup.py``\ Exudyn with the \ ``--openvr``\ flag. For general installation instructions, see theDoc.pdf.
1602+
1603+
Running OpenVR either requires an according head mounted display (HMD) or a virtualization using, e.g., Riftcat 2 to use a mobile phone with an according adapter. Visualization settings are available in \ ``interactive.openVR``\ , but need to be considered with care.
1604+
An example is provided in \ ``engineOpenVR.py``\ , showing some optimal flags like locking the model rotation, zoom or translation.
15841605
1606+
Everything is experimental, but contributions are welcome!
15851607
15861608
1609+
----------------------------
1610+
Interaction with other codes
1611+
----------------------------
1612+
1613+
Interaction with other codes and computers (E.g., MATLAB or other C++ codes, or other Python versions)
1614+
is possible.
1615+
To connect to any other code, it is convenient to use a TCP/IP connection. This is enabled via
1616+
the \ ``exudyn.utilities``\ functions
1617+
1618+
+ \ ``CreateTCPIPconnection``\
1619+
+ \ `` TCPIPsendReceive ``\
1620+
+ \ ``CloseTCPIPconnection ``\
1621+
1622+
Basically, data can be transmitted in both directions, e.g., within a preStepUserFunction. In Examples, you can find
1623+
TCPIPexudynMatlab.py which shows a basic example for such a connectivity.
1624+
1625+
1626+
---
1627+
ROS
1628+
---
1629+
1630+
Basic interaction with ROS has been tested. However, make sure to use Python 3, as there is (and will never be) a Python 2
1631+
support for Exudyn .
1632+
15871633
15881634
15891635

docs/howTo/WSL.txt

+11-3
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,18 @@ wsl --shutdown
7979

8080
=> now conda works!
8181

82+
conda create -n venvP36 python=3.6 scipy matplotlib -y
83+
conda create -n venvP37 python=3.7 scipy matplotlib -y
8284
conda create -n venvP38 python=3.8 scipy matplotlib -y
83-
conda create -n venvP39 python=3.9 scipy matplotlib -y
84-
conda create -n venvP310 python=3.10 scipy matplotlib -y
85-
85+
conda create -n venvP39 python=3.9 scipy matplotlib tqdm -y
86+
conda create -n venvP310 python=3.10 scipy matplotlib tqdm -y
87+
#not yet available: conda create -n venvP311 python=3.11 scipy matplotlib tqdm -y
88+
python 3.11 workaround (graphics does not work with wsl - even if it works with venvP39 !):
89+
conda create -n venvP311
90+
conda install -c conda-forge python=3.11 -y
91+
conda install tqdm -y
92+
conda install -c conda-forge numpy -y
93+
conda install -c conda-forge matplotlib -y
8694
#install windows terminal
8795
https://docs.microsoft.com/en-us/windows/terminal/get-started
8896
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

docs/theDoc/buildDate.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
build date and time=2023-01-12 22:42
1+
build date and time=2023-01-19 08:08

docs/theDoc/gettingStarted.tex

+5-3
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,17 @@
113113
The following people have contributed to Python and C++ library implementations (as well as to testing, examples, theory, ...):
114114
\bi
115115
\item Joachim Sch{\"o}berl, TU Vienna (Providing specialized NGsolve \cite{Schoeberl1997,NGsolve2014,NGsolve2022} core library with \texttt{taskmanager} for \mybold{multi-threaded parallelization}; NGsolve mesh and FE-matrices import; highly efficient eigenvector computations)
116-
\item Stefan Holzinger, University of Innsbruck (Lie group solvers in Python, Lie group node)
116+
\item Stefan Holzinger, University of Innsbruck (Lie group module and solvers in Python, Lie group node, testing)
117117
\item Andreas Zw{\"o}lfer, Technical University Munich (FFRF and CMS formulation)
118-
\item Peter Manzl, University of Innsbruck (ConvexRoll Python and C++ implementation / pip install on linux / wsl with graphics)
118+
\item Peter Manzl, University of Innsbruck (ConvexRoll Python and C++ implementation, pip install on linux, wsl with graphics)
119119
\item Martin Sereinig, University of Innsbruck (special robotics functionality)
120+
\item Michael Pieber, University of Innsbruck (helped in several Python libraries)
120121
\item Grzegorz Orzechowski, Lappeenranta University of Technology (coupling with openAI gym and running machine learning algorithms)
122+
\item Aaron Bacher, University of Innsbruck (helped to integrated OpenVR, connection with Franka Emika Panda)
121123
\ei
122124
The following people have contributed to examples, testing and theory:
123125
\bi
124-
\item Michael Pieber, Konstantina Ntarladima, Manuel Schieferle, Martin Knapp, Lukas March, Dominik Sponring, David Wibmer, Simon Scheiber
126+
\item Konstantina Ntarladima, Manuel Schieferle, Martin Knapp, Lukas March, Dominik Sponring, David Wibmer, Simon Scheiber
125127
\ei
126128
-- thanks a lot! --
127129
%

docs/theDoc/interfaces.tex

+3
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,9 @@
736736
\begin{longtable}{| p{4.2cm} | p{2.5cm} | p{0.3cm} | p{3.0cm} | p{6cm} |}
737737
\hline
738738
\bf Name & \bf type / function return type & \bf size & \bf default value / function args & \bf description \\ \hline
739+
actionManifestFileName & FileName & & 'C:/openVRactionsManifest.json' & \tabnewline This string must contain a string representing a valid absolute path to a vr\_actions.json manifest, which describes all HMD, tracker, etc. devices as given by openVR\\ \hline
739740
enable & bool & & False & True: openVR enabled (if compiled with according flag and installed openVR)\\ \hline
741+
logLevel & Int & & 1 & integer value setting log level of openVR: -1 (no output), 0 (error), 1 (warning), 2 (info), 3 (debug); increase log level to get more output\\ \hline
740742
showCompanionWindow & bool & & True & True: openVR will show companion window containing left and right eye view\\ \hline
741743
\end{longtable}
742744
\end{center}
@@ -762,6 +764,7 @@
762764
joystickScaleTranslation & float & & 6. & translation scaling factor for joystick input\\ \hline
763765
keypressRotationStep & float & & 5. & rotation increment per keypress in degree (full rotation = 360 degree)\\ \hline
764766
keypressTranslationStep & float & & 0.1 & translation increment per keypress relative to window size\\ \hline
767+
lockModelView & bool & & False & True: all movements (with mouse/keys), rotations, zoom are disabled; initial values are considered\\ \hline
765768
mouseMoveRotationFactor & float & & 1. & rotation increment per 1 pixel mouse movement in degree\\ \hline
766769
selectionHighlights & bool & & True & True: mouse click highlights item (default: red)\\ \hline
767770
selectionLeftMouse & bool & & True & True: left mouse click on items and show basic information\\ \hline

0 commit comments

Comments
 (0)