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
Hi @rdeits, thanks for all your work with meshcat!
I'm trying to obtain using Python something similar to what was done in drake for controlling the displayed panel programmatically, i.e. adding (at least) buttons with callbacks and (possibly) sliders.
As inexperienced web developer (read, never developed any web-related application), here below I summarize what I learned from the repos:
To conclude this summary, drake eventually dropped the zmq additional step and started communicating directly with the WebSocket (RobotLocomotion/drake#13038 (comment)). I also found a similar issue you commented few years ago (meshcat-dev/meshcat#44 (comment)) in which you wrote that this is also the approach used in Julia.
This being said, from Python I'm currently missing the connection step between the meshcat.Visualizer (or any inheriting class) and the controls:
Let's assume I can start a custom version of meshcat.servers.zmqserver.ZMQWebSocketBridge and define new commands. Do you have any pointers on how to pass through the zmqserver for interfacing with the controls?
Instead, by creating together with the Visualizer an additional direct connection to the websocket, what would be the approach to access the control panel? I assume that both connections (this new one + the exising one) could co-exist, but I might be wrong.
For future reference, in rdeits/meshcat@test there are static html with experiments that can be opened as follows:
cd meshcat/test
python3 -m http.server
# Browse: http://localhost:8000/<filename>.html
The text was updated successfully, but these errors were encountered:
Hi @diegoferigo, if you are still interested, here is a first idea how to approach this:
In the meshcat-javascript-viewer the set_control-comand is already available (see here). So what is left is to define a command in the commands.py like
Hi @rdeits, thanks for all your work with meshcat!
I'm trying to obtain using Python something similar to what was done in drake for controlling the displayed panel programmatically, i.e. adding (at least) buttons with callbacks and (possibly) sliders.
As inexperienced web developer (read, never developed any web-related application), here below I summarize what I learned from the repos:
meshcat.Visualizer
⇐ zmq ⇒ zmq serverindex.js#L297
To conclude this summary, drake eventually dropped the zmq additional step and started communicating directly with the WebSocket (RobotLocomotion/drake#13038 (comment)). I also found a similar issue you commented few years ago (meshcat-dev/meshcat#44 (comment)) in which you wrote that this is also the approach used in Julia.
This being said, from Python I'm currently missing the connection step between the
meshcat.Visualizer
(or any inheriting class) and the controls:meshcat.servers.zmqserver.ZMQWebSocketBridge
and define new commands. Do you have any pointers on how to pass through the zmqserver for interfacing with the controls?For future reference, in rdeits/meshcat@test there are static html with experiments that can be opened as follows:
The text was updated successfully, but these errors were encountered: