Commit 840ef226 authored by Nicolas Van der Noot's avatar Nicolas Van der Noot

readme update

parent 66af7ad3
......@@ -390,7 +390,7 @@ switch (cvs->state) // cvs->state is a state stored in the controller main struc
__Memory allocation in structures__
During the project, you will have to create structures, to allocate memory and to release this memory. This is particularly used with the `CtrlStruct *cvs` structure. Here is a simple example where different sub-structures are allocated (and released) inside the main `CtrlStruct` structure. Examples are also provided for a simple variable and for different tabulars.
During the project, you will have to create structures, to allocate memory and to release this memory. This is particularly used with the `CtrlStruct *cvs` structure. Here is a simple example written in *C* (allocations could also be done using *C++* features) where different sub-structures are allocated (and released) inside the main `CtrlStruct` structure. Examples are also provided for a simple variable and for different tabulars.
```
#include <stdlib.h>
......@@ -559,9 +559,9 @@ gcc main.c -o exe
__Running simulation without real-time__
If you face some difficulties with Java or SDL libraries, it might be worth running the project without the real-time features. In this case, the simulation runs as fast as possible, and you do not see the Java visualization, nor the graphs plotted in real-time. Finally, you cannot interact with the simulation.
If you face some difficulties with Java, OpenGL or SDL libraries, it might be worth running the project without the real-time features. In this case, the simulation runs as fast as possible, and you do not see the 3D visualization, nor the graphs plotted in real-time. Finally, you cannot interact with the simulation.
To do so, open [main.cc](workR/src/main.cc), and set `mbs_dirdyn->options->realtime` to `0` and `mbs_dirdyn->options->save2file` to `1`. You can also reduce the simulation time with the `mbs_dirdyn->options->tf` option. If you have difficulties finding the corresponding libraries (Java and SDL), you can even deactivate them in [CMakeLists.txt](workR/CMakeLists.txt) by setting the line `option (FLAG_REAL_TIME "Real time" ON)` to `option (FLAG_REAL_TIME "Real time" OFF)`.
To do so, open [main.cc](workR/src/main.cc), and set `mbs_dirdyn->options->realtime` to `0` and `mbs_dirdyn->options->save2file` to `1`. You can also reduce the simulation time with the `mbs_dirdyn->options->tf` option. If you have difficulties finding the corresponding libraries (Java, OpenGL and SDL), you can even deactivate them in [CMakeLists.txt](workR/CMakeLists.txt) by setting the line `option (FLAG_REAL_TIME "Real time" ON)` to `option (FLAG_REAL_TIME "Real time" OFF)`.
To still be able to exploit the results, you can first use the `set_output` function presented before. On top of that, the `save2file` option also generates the file *animationR/dirdyn_q.anim* with all the simulation joints evolution. To be able to visualize it, download *MBsysPad* from [this link](http://www.robotran.be/download). Install it, launch it and open [m454_project.mbs](dataR/m454_project.mbs). Then, click on *Animate 3D Model* and open the *dirdyn_q.anim* file. You should now be able to visualize the result as a 3D animation. This is explained in detail in the section *Animate your results* of [this link](http://www.robotran.be/tutorial/modelling/c-code/bodiesJoint.html).
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment