You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to load some complex model like this, below is code:
using LyceumBase, LyceumMuJoCo, LyceumMuJoCoViz
struct Husky{ S <:MJSim } <:AbstractMuJoCoEnvironment
sim::Send
LyceumMuJoCo.getsim(env::Husky) = env.sim
Husky() =first(tconstruct(Husky, 1))
function LyceumBase.tconstruct(::Type{Husky}, N::Integer)
modelpath =joinpath(@__DIR__, "dual_ur5_husky/mobile_pick_and_place.xml")
Tuple(Husky(s) for s intconstruct(MJSim, N, modelpath, skip=1))
end
LyceumMuJoCo.getreward(state, action, obs, env::Husky) =1.0
LyceumMuJoCo.geteval(state, action, obs, env::Husky) =1.0functionhusky_controller(env)
setaction!(env, rand(actionspace(env)))
endfunctionhusky_sim()
env =Husky()
visualize(env,
controller = husky_controller
)
return env
end
Running like:
JULIA_NUM_THREADS=4 julia --project=. -e 'include("husky.jl")' -e "husky_sim()"
I'm using a Dell G15 (Intel i7-11800H with RTX 3060, Debian bullseye distribution)
When I run husky_sim(), most of time, after showing help message 'Press "F1" to show the help message.', then the visualize window will stuck, some time showed no scene some time showed right scene but still stuck, and I have to use many ctrl-c in julia to kill the process. and the julia process will use CPU 100% in one single thread.
I have no idea how it is happening
updated:
I run husky_sim(), it will start / show Visualization UI, and fresh rate is being updated, but except using ESC to quit, any other Key Stroke will stuck the UI, and have to use Ctrl-C in julia REPL kill julia process. But after using ESC to quit, then re-run husky_sim, it will run normally.
Updated: the LyceumMuJoCoViz.jl has version: "0.2.5"
And I tried to use pkg> dev ./LyceumMuJoCoViz.jl/ to use latest master (ee007ab) also has same behavior ( stuck )
Updated:
I added multiple printlns, and I find when stuck, it stuck at GLFW.PollEvents() here
Updated:
I don't know whether I find is correct: I found it is blocked during send event, it stuck inside on(h, obs) ( in glfw.jl ), I tried
if i println("event key: ", ev.key) or println("event action: ", ev.action), it will print the key value and action, and stuck during println("event: ", ev). But if I println("event time: ", ev.time), the program is not only blocked, even all other println I added for debug purpose will not be shown after shown "Press "F1" to show the help message. "
The text was updated successfully, but these errors were encountered:
I tried to load some complex model like this, below is code:
Running like:
I'm using a Dell G15 (Intel i7-11800H with RTX 3060, Debian bullseye distribution)
When I run husky_sim(), most of time, after showing help message 'Press "F1" to show the help message.', then the
visualize
window will stuck, some time showed no scene some time showed right scene but still stuck, and I have to use many ctrl-c in julia to kill the process. and the julia process will use CPU 100% in one single thread.I have no idea how it is happening
updated:
I run
husky_sim()
, it will start / show Visualization UI, and fresh rate is being updated, but except using ESC to quit, any other Key Stroke will stuck the UI, and have to use Ctrl-C in julia REPL kill julia process. But after using ESC to quit, then re-runhusky_sim
, it will run normally.Updated: the
LyceumMuJoCoViz.jl
has version: "0.2.5"And I tried to use
pkg> dev ./LyceumMuJoCoViz.jl/
to use latest master (ee007ab) also has same behavior ( stuck )Updated:
I added multiple
println
s, and I find when stuck, it stuck atGLFW.PollEvents()
hereUpdated:
I don't know whether I find is correct: I found it is blocked during send event, it stuck inside
on(h, obs)
( in glfw.jl ), I triedIt seems whenever I access val, it is blocked.
Updated:
When I access here
LyceumMuJoCoViz.jl/src/glfw.jl
Line 340 in ee007ab
if i
println("event key: ", ev.key)
orprintln("event action: ", ev.action)
, it will print the key value and action, and stuck duringprintln("event: ", ev)
. But if Iprintln("event time: ", ev.time)
, the program is not only blocked, even all otherprintln
I added for debug purpose will not be shown after shown "Press "F1" to show the help message. "The text was updated successfully, but these errors were encountered: