Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DLR Visualization library Community Edition problem with Julia 1.0.1 on Ubuntu 18.04 #3

Closed
traversaro opened this issue Oct 3, 2018 · 10 comments

Comments

@traversaro
Copy link

Trying to use the latest version of Modia3D with the DLR Visualization library Community Edition results in the following error:

ERROR: InitError: could not load symbol "SimVis_setTextObject":
/home/straversaro/src/DLR-VIZ-NEW/Visualization 1.5 Community Edition/Visualization/Extras/SimVis/linux/SimVisInterface_CommunityEdition.so: undefined symbol: SimVis_setTextObject
Stacktrace:
 [1] dlsym at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Libdl/src/Libdl.jl:55 [inlined]
 [2] (::getfield(Modia3D.DLR_Visualization, Symbol("##SimVis_Renderer#1#2")))(::String, ::Int64, ::Bool, ::Type, ::Tuple{String,String,Bool,Bool}) at /home/straversaro/.julia/packages/Modia3D/5m7xO/src/renderer/DLR_Visualization/renderer.jl:46
 [3] Type at ./none:0 [inlined]
 [4] #CommunityEdition#5 at /home/straversaro/.julia/packages/Modia3D/5m7xO/src/renderer/DLR_Visualization/renderer.jl:67 [inlined]
 [5] Type at /home/straversaro/.julia/packages/Modia3D/5m7xO/src/renderer/DLR_Visualization/renderer.jl:67 [inlined]
 [6] __init__() at /home/straversaro/.julia/packages/Modia3D/5m7xO/src/Modia3D.jl:99
 [7] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:630
 [8] macro expansion at ./logging.jl:312 [inlined]
 [9] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:701
 [10] _require(::Base.PkgId) at ./loading.jl:934
 [11] require(::Base.PkgId) at ./loading.jl:855
 [12] macro expansion at ./logging.jl:311 [inlined]
 [13] require(::Module, ::Symbol) at ./loading.jl:837
during initialization of module Modia3D

checking with nm, indeed the SimVis_setTextObject symbol is not included in the library of the Community Edition.

@MartinOtter
Copy link
Member

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.

MartinOtter added a commit that referenced this issue Oct 4, 2018
…3D with the CommunityEdition of the DLR Visualization library)
@MartinOtter
Copy link
Member

Fixed with ff0a485
(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).

@traversaro
Copy link
Author

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.

@MartinOtter
Copy link
Member

MartinOtter commented Oct 5, 2018

Please, can you give the exact sequence of commands that lead to the problem.

@MartinOtter MartinOtter reopened this Oct 5, 2018
@traversaro
Copy link
Author

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:

  • Install Julia v1.0.1 on Ubuntu 18.04
  • Install matplotlib with sudo apt install python-matplotlib python3-matplotlib (I was not sure which one julia was going to use)
  • Install PyPlot with ]add PyPlot
  • Install the DLR Visualization (version 1.5 - Community Edition) and add the line
    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)
  • Install Modia3D with ]add https://github.com/ModiaSim/Modia3D.jl
  • Run:
import ModiaMath
using Modia3D

material1 = Modia3D.Material(color="LightBlue", transparency=0.3);
material2 = Modia3D.Material(color="Red");

@assembly Pendulum(;Lx = 1.0, Ly=0.2*Lx, Lz=0.2*Lx) begin
   world       = Object3D(Modia3D.CoordinateSystem(0.5*Lx))
   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.2*Ly; 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):
result = ModiaMath.simulate!(simulationModel);

@traversaro
Copy link
Author

traversaro commented Oct 7, 2018

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 #3 (comment) .
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.

@MartinOtter
Copy link
Member

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?

@traversaro
Copy link
Author

Yes, the animation is now working.

@MartinOtter
Copy link
Member

@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).

@MartinOtter MartinOtter reopened this Oct 11, 2018
@AndreaNeumayr
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants