-
Hi, I am using deepbots to construct an environment for my path planning project. I have successfully executed the CartPole game as the tutorial. When I want to construct an action space of my own, however, I always failed. Just as the same sight of CartPole, I set my action in to discrete 3 instead of 2 meaning my robots got three actions totally:
Additionally, I did the same setting in apply_action() method according to the tutorial, in which I mapped the three actions to my robots with detailed behaviors:
Here, The control algorithms may be not correct but the robots should at least stochastically move. During iteration, however, I found that my robot (in my projects, I used an e-punk robot) never moved even one step no matter how many timestep I set. I don't know what happened to my code and hope anyone can help me to fix it. Many thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Hello! You could try setting the positions of the motors to infinite every time you use Other than that, make sure that you get proper action output from the agent (i can see that you are already printing |
Beta Was this translation helpful? Give feedback.
-
I will convert this to a discussion as it is not really an issue with any of the tutorials 😃 |
Beta Was this translation helpful? Give feedback.
-
Hi, thank you for your reply! Based on your answer, I can clarify that my understanding of the data structure of deepbots is correct. 😃 |
Beta Was this translation helpful? Give feedback.
Hello! You could try setting the positions of the motors to infinite every time you use
setVelocity
, you can see an example here.Other than that, make sure that you get proper action output from the agent (i can see that you are already printing
action
) and/or try setting the motor speeds directly to make sure they are properly set on Webots. Let me know if that helps 😄 .