Question about step function and configurations #4762
Replies: 3 comments 2 replies
-
Hi @WilliamHangXu |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Hi all, I've been trying to set up a cable actuated robot finger simulation called
Finger
using SofaGym, following the Cartpole tutorial and the Trunk example. However, the behavior of the environment I set up differs from what I expected:step
function, the action functiondisplace
(like the one in Trunk environment's Toolbox file) is actually called more than once. The number of times the action gets called per step seems to depend on theduration
parameter in thestartCmd_Finger
function, which in turn is determined bydt
andscale_factor
. I read the previous discussion post and tried to change these two values so thatSofa.Simulation.animate
only runs once, but the number of times the action gets called is still no less than 2. Could anyone please explain the design idea behind this? Should I set up the environment such that the action only gets called onece every time I call the step function?runSofa FingerScene.py
and then changing the displacement via keyboard) and then record the final position of a certain dof after the finger gets stable. However, the two positions I recorded were different. What could be the possible reason for this?Thank you!
Beta Was this translation helpful? Give feedback.
All reactions