Impossible to do container.grab in the OnHeartBeat-Event

Forum Forums Visual Components 4.1 Python Programming in VC Impossible to do container.grab in the OnHeartBeat-Event

This topic contains 4 replies, has 2 voices, and was last updated by AJ AJ 1 month ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #20979
    Avatar
    CaptainFeature
    Participant

    Hello,

    I tried to do a componentContainer.grab() in the OnHeartBeat-Event of a servoController and get following message from the phyton-script…

    “RuntimeError: Exception occurred during method execution: Attempt to change node hierarchy when the hierarchy is locked”

    What means “hierarchy is locked” and is there a way to solve this? -> Is important for me… 🙁

    Thx & Regards

    Feature

    0
    #21204
    Avatar
    CaptainFeature
    Participant

    Hy,

    some additional information: The componentContainer I would grab into is located in the Link which drives the servo I subscribed the OnHeartbeat!

    Thx & Regards

    Feature

    0
    #21366
    AJ
    AJ
    Participant

    Hi,

    Just for my information, you have a ComponentContainer in the linkbehaviours tab and you control that link by a servo controller?

    What do you want to grab (or what do you want to put in your component creater?

    Can you share a screenshot or can you share the file so it would be better to understand what you want?

    Thanks

    0
    #21377
    Avatar
    CaptainFeature
    Participant

    Hy Aj,

    Just for my information, you have a ComponentContainer in the linkbehaviours tab and you control that link by a servo controller?

    Jes thats what I do!

    The link “Abschieber” is controlled by a servoController and do simple linear movements…

    In Phyton-Script I subscribed to the “OnHeartBeat”-Event of the servoController!

    When the Event is happening (and some other conditions are met) I want to grab a component from another componentContainer to the “ComponentContainer” and thats where I get the mentioned Error!

    Thx & Regards

    Feature

    0
    #21384
    AJ
    AJ
    Participant

    Okay, I made a quick file to show how I grab parts with a container and even transfer from container to container and control it with a link.

    It is an easy example but I hope it will help you.

     

    Attachments:
    You must be logged in to view attached files.
    0
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.