Skip to content

supervisor.step() returns too early #76

Answered by tsampazk
KelvinYang0320 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @KelvinYang0320, i took a look at the code and the example and - correct me if i am wrong - i think that a robot action takes more than one step to complete. As a consequence the supervisor has to wait for the previous action to complete before getting the new observations and sending back the new action.

Webots motors controlled by setPosition run an internal PID controller to reach the position you asked for. This can take multiple steps. The solution you implemented seems perfectly fine to me. I think you are forced to implement such a scheme (or anything similar really) to wait for the action to complete.

I would suggest that you use the RobotSupervisor scheme, you can see an ex…

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
2 replies
@KelvinYang0320
Comment options

@tsampazk
Comment options

Comment options

You must be logged in to vote
9 replies
@KelvinYang0320
Comment options

@tsampazk
Comment options

@KelvinYang0320
Comment options

@tsampazk
Comment options

@KelvinYang0320
Comment options

Answer selected by KelvinYang0320
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants