Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix meshcat examples #2503

Merged
merged 3 commits into from
Dec 7, 2024

Conversation

jorisv
Copy link
Contributor

@jorisv jorisv commented Dec 6, 2024

This PR fix meshcat examples.

  • meshcat-viewer-octree.py used deprecated API
  • meshcat-viewer-solo.py used example_robot_data, but this package can't be imported in Pinocchio
    Some meshact examples where broken, but also, some display nothing except
  • I had to add a sleep at the end of the script to display something on my browser. Is it normal @ManifoldFR ?

@jorisv
Copy link
Contributor Author

jorisv commented Dec 6, 2024

Should fix #2487

@ManifoldFR
Copy link
Member

It's totally normal, the meshcat visualizer's startup of its server is non blocking, so your script MAY exit before the server got spun up and your browser tab opens.

You should run your script with python -i

@jorisv
Copy link
Contributor Author

jorisv commented Dec 6, 2024

Ok, thank you for the explanation !

@jorisv
Copy link
Contributor Author

jorisv commented Dec 6, 2024

And there is no a blocking call in the API to wait for the viewer ?

@ManifoldFR
Copy link
Member

I don't think there is, apart from the method which tries to render an image (and I'm not sure the call terminates if the viewer is not already available). We could do a PR for this but nothing is happening upstream...

@jcarpent jcarpent merged commit 93e7c3a into stack-of-tasks:devel Dec 7, 2024
22 checks passed
@jorisv jorisv deleted the topic/fix-meshcat-examples branch December 9, 2024 08:50
nim65s added a commit to nim65s/robotpkg that referenced this pull request Dec 19, 2024
    ## What's Changed

    ### Added
    - Add `pinocchio_python_parser` target (stack-of-tasks/pinocchio#2475)

    ### Fixed
    - Fix mjcf parsing of armature and of the default tag in models (stack-of-tasks/pinocchio#2477)
    - Fix undefined behavior when using the site attribute in mjcf (stack-of-tasks/pinocchio#2477)
    - Fix the type of image paths when loading textures in the meshcat visualizer (stack-of-tasks/pinocchio#2478)
    - Fix meshcat examples (stack-of-tasks/pinocchio#2503)
    - Fix `pinocchio-test-cpp-parallel-geometry` when built with Coal (stack-of-tasks/pinocchio#2502)
    - Fix scaling support for meshcat (stack-of-tasks/pinocchio#2511)

    ### Changed
    - On GNU/Linux and macOS, hide all symbols by default (stack-of-tasks/pinocchio#2469)

    **Full Changelog**: stack-of-tasks/pinocchio@v3.3.0...v3.3.1
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants