René's URL Explorer Experiment


Title: VisualLoop expected at the root node · Issue #485 · sofa-framework/SofaPython3 · GitHub

Open Graph Title: VisualLoop expected at the root node · Issue #485 · sofa-framework/SofaPython3

X Title: VisualLoop expected at the root node · Issue #485 · sofa-framework/SofaPython3

Description: I tried using SofaPython by following the docs, but the code could not run well. In Sofa Gui there's nothing showed up and the error is: [ERROR] [Simulation] Simulation::initTextures() : VisualLoop expected at the root node Perhaps it's ...

Open Graph Description: I tried using SofaPython by following the docs, but the code could not run well. In Sofa Gui there's nothing showed up and the error is: [ERROR] [Simulation] Simulation::initTextures() : VisualLoop...

X Description: I tried using SofaPython by following the docs, but the code could not run well. In Sofa Gui there's nothing showed up and the error is: [ERROR] [Simulation] Simulation::initTextures() : Visual...

Opengraph URL: https://github.com/sofa-framework/SofaPython3/issues/485

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"VisualLoop expected at the root node","articleBody":"I tried using SofaPython by following the  [docs](https://sofapython3.readthedocs.io/en/v24.12.00-doc-generation/content/FirstSteps.html), but the code could not run well. In Sofa Gui there's nothing showed up and the error is: \n\n\u003e [ERROR]   [Simulation] Simulation::initTextures() : VisualLoop expected at the root node\n Perhaps it's related to the version of Sofa, my version is Sofa  v24.12.00 and python 3.12.9. How to solve this problem? Appreciate your help!\nHere's my code:\n\n\n\n```\nimport Sofa\nimport Sofa.Gui\nimport SofaRuntime\nimport Sofa.Component\n\nSofaRuntime.importPlugin(\"Sofa.Component\")\nSofaRuntime.importPlugin(\"Sofa.Component.Collision.Detection.Algorithm\")\nimport Sofa.Core\n\ndef main():\n    # Call the SOFA function to create the root node\n    root = Sofa.Core.Node(\"root\")\n\n\n    # Call the createScene function, as runSofa does\n    createScene(root)\n\n    # Once defined, initialization of the scene graph\n    Sofa.Simulation.init(root)\n\n    # Launch the GUI (qt or qglviewer)\n    Sofa.Gui.GUIManager.Init(\"myscene\", \"qglviewer\")\n    Sofa.Gui.GUIManager.createGUI(root, __file__)\n    Sofa.Gui.GUIManager.SetDimension(1080, 800)\n\n\n\n    # Initialization of the scene will be done here\n    Sofa.Gui.GUIManager.MainLoop(root)\n\n\n\n    Sofa.Gui.GUIManager.closeGUI()\n\n\ndef createScene(rootNode):\n    plugins = [\n        \"Sofa.Component.Collision.Detection.Algorithm\",\n        \"Sofa.Component.Collision.Detection.Intersection\",\n    ]\n    for plugin in plugins:\n        rootNode.addObject(\"RequiredPlugin\", pluginName=plugin, name=plugin)\n    # Define the root node properties\n    #rootNode.addObject('VisualLoop')\n    rootNode.addObject(\"VisualGrid\", nbSubdiv=10, size=1000)\n\n    rootNode.gravity=[0.0,-9.81,0.0]\n    rootNode.dt=0.01\n\n    # Loading all required SOFA modules\n    confignode = rootNode.addChild(\"Config\")\n    confignode.addObject('RequiredPlugin', name=\"Sofa.Component.AnimationLoop\", printLog=False)\n    confignode.addObject('RequiredPlugin', name=\"Sofa.Component.Collision.Detection.Algorithm\", printLog=False)\n    confignode.addObject('RequiredPlugin', name=\"Sofa.Component.Collision.Detection.Intersection\", printLog=False)\n    confignode.addObject('RequiredPlugin', name=\"Sofa.Component.Collision.Geometry\", printLog=False)\n    confignode.addObject('RequiredPlugin', name=\"Sofa.Component.Collision.Response.Contact\", printLog=False)\n    confignode.addObject('RequiredPlugin', name=\"Sofa.Component.Constraint.Lagrangian.Correction\", printLog=False)\n    confignode.addObject('RequiredPlugin', name=\"Sofa.Component.Constraint.Lagrangian.Solver\", printLog=False)\n    confignode.addObject('RequiredPlugin', name=\"Sofa.Component.IO.Mesh\", printLog=False)\n    confignode.addObject('RequiredPlugin', name=\"Sofa.Component.LinearSolver.Iterative\", printLog=False)\n    confignode.addObject('RequiredPlugin', name=\"Sofa.Component.Mapping.NonLinear\", printLog=False)\n    confignode.addObject('RequiredPlugin', name=\"Sofa.Component.Mass\", printLog=False)\n    confignode.addObject('RequiredPlugin', name=\"Sofa.Component.ODESolver.Backward\", printLog=False)\n    confignode.addObject('RequiredPlugin', name=\"Sofa.Component.StateContainer\", printLog=False)\n    confignode.addObject('RequiredPlugin', name=\"Sofa.Component.Topology.Container.Constant\", printLog=False)\n    confignode.addObject('RequiredPlugin', name=\"Sofa.Component.Visual\", printLog=False)\n    confignode.addObject('RequiredPlugin', name=\"Sofa.GL.Component.Rendering3D\", printLog=False)\n    confignode.addObject('OglSceneFrame', style=\"Arrows\", alignment=\"TopRight\")\n\n\n    # Collision pipeline\n#    rootNode.addObject('VisualLoop')\n    rootNode.addObject('CollisionPipeline')\n    rootNode.addObject('FreeMotionAnimationLoop')\n    rootNode.addObject('GenericConstraintSolver', tolerance=\"1e-6\", maxIterations=\"1000\")\n    rootNode.addObject('BruteForceBroadPhase')\n    rootNode.addObject('BVHNarrowPhase')\n    rootNode.addObject('RuleBasedContactManager', responseParams=\"mu=\"+str(0.0), name='Response', response='FrictionContactConstraint')\n    rootNode.addObject('LocalMinDistance', alarmDistance=10, contactDistance=5, angleCone=0.01)\n\n\n    totalMass = 1.0\n    volume = 1.0\n    inertiaMatrix=[1., 0., 0., 0., 1., 0., 0., 0., 1.]\n\n\n    sphere = rootNode.addChild(\"sphere\")\n    sphere.addObject('EulerImplicitSolver', name='odesolver')\n    sphere.addObject('CGLinearSolver', name='Solver', iterations=25, tolerance=1e-05, threshold=1e-05)\n    sphere.addObject('MechanicalObject', name=\"mstate\", template=\"Rigid3\", translation2=[0., 0., 0.], rotation2=[0., 0., 0.], showObjectScale=50)\n    sphere.addObject('UniformMass', name=\"mass\", vertexMass=[totalMass, volume, inertiaMatrix[:]])\n    sphere.addObject('UncoupledConstraintCorrection')\n\n    #### Collision subnode for the sphere\n    collision = sphere.addChild('collision')\n    collision.addObject('MeshOBJLoader', name=\"loader\", filename=\"mesh/ball.obj\", triangulate=\"true\", scale=45.0)\n    collision.addObject('MeshTopology', src=\"@loader\")\n    collision.addObject('MechanicalObject')\n    collision.addObject('TriangleCollisionModel')\n    collision.addObject('LineCollisionModel')\n    collision.addObject('PointCollisionModel')\n    collision.addObject('RigidMapping')\n\n    #### Visualization subnode for the sphere\n    sphereVisu = sphere.addChild(\"VisualModel\")\n    sphereVisu.loader = sphereVisu.addObject('MeshOBJLoader', name=\"loader\", filename=\"mesh/ball.obj\")\n    sphereVisu.addObject('OglModel', name=\"model\", src=\"@loader\", scale3d=[50]*3, color=[0., 1., 0.], updateNormals=False)\n    sphereVisu.addObject('RigidMapping')\n\n\n    # Creating the floor object\n    floor = rootNode.addChild(\"floor\")\n\n    floor.addObject('MechanicalObject', name=\"mstate\", template=\"Rigid3\", translation2=[0.0,-300.0,0.0], rotation2=[0., 0., 0.], showObjectScale=5.0)\n    floor.addObject('UniformMass', name=\"mass\", vertexMass=[totalMass, volume, inertiaMatrix[:]])\n\n    #### Collision subnode for the floor\n    floorCollis = floor.addChild('collision')\n    floorCollis.addObject('MeshOBJLoader', name=\"loader\", filename=\"mesh/floor.obj\", triangulate=\"true\", scale=5.0)\n    floorCollis.addObject('MeshTopology', src=\"@loader\")\n    floorCollis.addObject('MechanicalObject')\n    floorCollis.addObject('TriangleCollisionModel', moving=False, simulated=False)\n    floorCollis.addObject('LineCollisionModel', moving=False, simulated=False)\n    floorCollis.addObject('PointCollisionModel', moving=False, simulated=False)\n    floorCollis.addObject('RigidMapping')\n\n    #### Visualization subnode for the floor\n    floorVisu = floor.addChild(\"VisualModel\")\n    floorVisu.loader = floorVisu.addObject('MeshOBJLoader', name=\"loader\", filename=\"mesh/floor.obj\")\n    floorVisu.addObject('OglModel', name=\"model\", src=\"@loader\", scale3d=[5.0]*3, color=[1., 1., 0.], updateNormals=False)\n    floorVisu.addObject('RigidMapping')\n\n\n    return rootNode\n\n\n# Function used only if this script is called from a python environment\nif __name__ == '__main__':\n    main()\n```\n\n![Image](https://github.com/user-attachments/assets/19d51686-84e9-4dfa-842d-35130bb3bbd3)","author":{"url":"https://github.com/DarkKnightCyd","@type":"Person","name":"DarkKnightCyd"},"datePublished":"2025-02-21T12:06:21.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/485/SofaPython3/issues/485"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c4cba2cc-45af-4d47-34dc-9de0f2d977ea
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8E2C:1CC34:2C8F5F:3E0895:697CDAC0
html-safe-nonce84376c1b397c0cd67438e017ca822bd403c4adb53a33af664f7c9eaa164a73be
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTJDOjFDQzM0OjJDOEY1RjozRTA4OTU6Njk3Q0RBQzAiLCJ2aXNpdG9yX2lkIjoiNjU3ODE0NjI0NDM0NzA3MTM2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac290c87321dc4f6c2d919ff7766c914ab8b189dbb174a43de42eee5fe86218d1c
hovercard-subject-tagissue:2868855561
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sofa-framework/SofaPython3/485/issue_layout
twitter:imagehttps://opengraph.githubassets.com/34e150c5941a7c2bb1884bc6da6580496f21642f3afabb033b08ff4dc59c35df/sofa-framework/SofaPython3/issues/485
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/34e150c5941a7c2bb1884bc6da6580496f21642f3afabb033b08ff4dc59c35df/sofa-framework/SofaPython3/issues/485
og:image:altI tried using SofaPython by following the docs, but the code could not run well. In Sofa Gui there's nothing showed up and the error is: [ERROR] [Simulation] Simulation::initTextures() : VisualLoop...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameDarkKnightCyd
hostnamegithub.com
expected-hostnamegithub.com
None5f20df5019a7f846ce01350c443b1b5209bcc8b08d1ff80f92fdef440a0c7c89
turbo-cache-controlno-preview
go-importgithub.com/sofa-framework/SofaPython3 git https://github.com/sofa-framework/SofaPython3.git
octolytics-dimension-user_id11028508
octolytics-dimension-user_loginsofa-framework
octolytics-dimension-repository_id260159147
octolytics-dimension-repository_nwosofa-framework/SofaPython3
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id260159147
octolytics-dimension-repository_network_root_nwosofa-framework/SofaPython3
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release0f08fae6208283a46e6e5febf9878b9cdddfaa23
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/sofa-framework/SofaPython3/issues/485#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsofa-framework%2FSofaPython3%2Fissues%2F485
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsofa-framework%2FSofaPython3%2Fissues%2F485
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=sofa-framework%2FSofaPython3
Reloadhttps://patch-diff.githubusercontent.com/sofa-framework/SofaPython3/issues/485
Reloadhttps://patch-diff.githubusercontent.com/sofa-framework/SofaPython3/issues/485
Reloadhttps://patch-diff.githubusercontent.com/sofa-framework/SofaPython3/issues/485
sofa-framework https://patch-diff.githubusercontent.com/sofa-framework
SofaPython3https://patch-diff.githubusercontent.com/sofa-framework/SofaPython3
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fsofa-framework%2FSofaPython3
Fork 53 https://patch-diff.githubusercontent.com/login?return_to=%2Fsofa-framework%2FSofaPython3
Star 60 https://patch-diff.githubusercontent.com/login?return_to=%2Fsofa-framework%2FSofaPython3
Code https://patch-diff.githubusercontent.com/sofa-framework/SofaPython3
Issues 36 https://patch-diff.githubusercontent.com/sofa-framework/SofaPython3/issues
Pull requests 32 https://patch-diff.githubusercontent.com/sofa-framework/SofaPython3/pulls
Actions https://patch-diff.githubusercontent.com/sofa-framework/SofaPython3/actions
Projects 0 https://patch-diff.githubusercontent.com/sofa-framework/SofaPython3/projects
Wiki https://patch-diff.githubusercontent.com/sofa-framework/SofaPython3/wiki
Security 0 https://patch-diff.githubusercontent.com/sofa-framework/SofaPython3/security
Insights https://patch-diff.githubusercontent.com/sofa-framework/SofaPython3/pulse
Code https://patch-diff.githubusercontent.com/sofa-framework/SofaPython3
Issues https://patch-diff.githubusercontent.com/sofa-framework/SofaPython3/issues
Pull requests https://patch-diff.githubusercontent.com/sofa-framework/SofaPython3/pulls
Actions https://patch-diff.githubusercontent.com/sofa-framework/SofaPython3/actions
Projects https://patch-diff.githubusercontent.com/sofa-framework/SofaPython3/projects
Wiki https://patch-diff.githubusercontent.com/sofa-framework/SofaPython3/wiki
Security https://patch-diff.githubusercontent.com/sofa-framework/SofaPython3/security
Insights https://patch-diff.githubusercontent.com/sofa-framework/SofaPython3/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/sofa-framework/SofaPython3/issues/485
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/sofa-framework/SofaPython3/issues/485
VisualLoop expected at the root nodehttps://patch-diff.githubusercontent.com/sofa-framework/SofaPython3/issues/485#top
https://github.com/DarkKnightCyd
https://github.com/DarkKnightCyd
DarkKnightCydhttps://github.com/DarkKnightCyd
on Feb 21, 2025https://github.com/sofa-framework/SofaPython3/issues/485#issue-2868855561
docshttps://sofapython3.readthedocs.io/en/v24.12.00-doc-generation/content/FirstSteps.html
https://private-user-images.githubusercontent.com/106141762/415635260-19d51686-84e9-4dfa-842d-35130bb3bbd3.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk3OTA0NDUsIm5iZiI6MTc2OTc5MDE0NSwicGF0aCI6Ii8xMDYxNDE3NjIvNDE1NjM1MjYwLTE5ZDUxNjg2LTg0ZTktNGRmYS04NDJkLTM1MTMwYmIzYmJkMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMTMwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDEzMFQxNjIyMjVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jYjhjZDc1ZGE1MDhmODE4YzZhNjhlMjFlODI4YTE3NjAwY2JiYmY4MmU3OTE2MDdhMTU3NzYzZjRhZmYwMmIwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.aaAkYMaXYOjA9wGrwxTJsn2DIKqGV9A2xRjFhHGFozI
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.