Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Question about Animation #60

Open
WilliamHangXu opened this issue May 23, 2024 · 0 comments
Open

Question about Animation #60

WilliamHangXu opened this issue May 23, 2024 · 0 comments

Comments

@WilliamHangXu
Copy link

WilliamHangXu commented May 23, 2024

Hi! I built a environment and noticed that when the step(action) function of my environment is called, it actually executes the action twice. I suspect that the problem is with the following code in the function startCmd_EnvName in the toolbox file:
rootNode.AnimationManager.addAnimation( Animation( onUpdate=executeAnimation, params={"cable": cable, "displacement": displacement}, duration=duration, mode="once"))
I noticed that increasing the value of the variable duration increases the number of times the action gets executed, and that the number of times the action gets executed depends on environments (For instance, in the Trunk environment, its displace function gets called 5 times everytime the function startCmd_Trunk gets called, but in CartPole, the function apply_action gets called 10 times). Could anyone please explain the design idea behind this? Should I setup my environment such that the action is only executed once everytime I call the step function? If so, how? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant