Closed traversaro closed 3 years ago
Sorry, this should not have occured (if the community edition is used, not supported elements should just be ignored for the animation). This will be fixed in the next days.
Fixed with ff0a48593315a3b2ad012d7a6ed1f9a94894ea4e (its strange, but on Windows no error was raised when using the CommunityEdition; unfortunately, it could not be detected by Travis CL as well, because Travis CL is performed without the DLR visualization library).
Thanks a lot. Even with this fix for some reason the README examples works fine when using NoRenderer
, but instead the call to result = ModiaMath.simulate!(simulationModel);
hangs indefinitely when using the DLR_Visualizer Community Edition, but it is possible that it is a problem of my setup.
Please, can you give the exact sequence of commands that lead to the problem.
I will try to replicate it on a clean VM to make sure that is not due to my setup over the weekend. However, the overall steps were the following, if I remember correctly:
sudo apt install python-matplotlib python3-matplotlib
(I was not sure which one julia was going to use)]add PyPlot
ENV["DLR_VISUALIZATION"] = "/home/straversaro/src/DLR-VIZ-NEW/Visualization 1.5 Community Edition/Visualization/Extras/SimVis"
in .julia/config/startup.jl
(I wonder if the space in the path could be a problem) ]add https://github.com/ModiaSim/Modia3D.jl
import ModiaMath
using Modia3D
material1 = Modia3D.Material(color="LightBlue", transparency=0.3); material2 = Modia3D.Material(color="Red");
@assembly Pendulum(;Lx = 1.0, Ly=0.2Lx, Lz=0.2Lx) begin world = Object3D(Modia3D.CoordinateSystem(0.5Lx)) beam_frame0 = Object3D(Modia3D.Solid(Modia3D.SolidBeam(Lx,Ly,Lz), "Aluminium", material1)) beam_frame1 = Object3D(beam_frame0; r=[-Lx/2, 0.0, 0.0]) cylinder = Object3D(beam_frame1,Modia3D.Cylinder(Ly/2,1.2Ly; material=material2)) revolute = Modia3D.Revolute(world, beam_frame1) end; simulationModel = Modia3D.SimulationModel(Pendulum(Lx=0.8),stopTime=5.0);
* After defining the model, trying to launch the following command hangs with the Julia process taking 100% of one cpu (everything works fine if the `ENV["DLR_VISUALIZATION"] ` line is removed from the `startup.jl`):
~~~julia
result = ModiaMath.simulate!(simulationModel);
I found the problem. The SimVis
executable had no executable permissions.
chmod +x <path-to-library>/Visualization/Extras/SimVis
fixed the issue that I was describing in https://github.com/ModiaSim/Modia3D.jl/issues/3#issuecomment-427105984 . I do not know if this is something that is affecting all Linux users. In that case, I do not know if there is something that can be fixed at the compressed archive level (see https://unix.stackexchange.com/questions/313656/preserving-permissions-while-zipping/313685) or if it is something that should be mentioned in the Modia3D's docs.
Thanks for your findings. I have added your suggestion about execution rights to the README.md file.
Just to make sure: Is the animation of Modia3D now working for you?
Yes, the animation is now working.
@Thantalos, @GallLeo: Please, check that the distribution of the DLR Visualization library has "executable permissions" for the SimVis executable on Ubuntu. If not, please correct (this might explain the issue above).
Under Linux only the Community Edition of the DLR Visualization library is working. A limited number of shapes is displayed, further not all shapes are displayed supported by the Community Edition, like Text. For further information see https://visualization.ltx.de/
Due a complete redesign of Modia3D this issue is closed.
Trying to use the latest version of
Modia3D
with the DLR Visualization library Community Edition results in the following error:checking with
nm
, indeed theSimVis_setTextObject
symbol is not included in the library of the Community Edition.