Replies: 2 comments 2 replies
-
Hey @speedhawk! From what i understand from your description, the way you are approaching the problem is not ideal if i am not mistaken. Instead of implementing movement through the motors, I would suggest to use the supervisor to move the robot to the required grid position instantly, or rotate it instantly by setting its position and rotation. This would probably require some groundwork for the grid so you would know exactly at which world coordinates each grid square is. I am not sure whether this solution fits your problem, hope it gives you some ideas. Let me know if i can offer any additional help. |
Beta Was this translation helpful? Give feedback.
-
Hi @tsampazk ! Really graceful for your reply with some advice! Do you have any idea for the implementation of grid-world construction groundworks (such as occupancy grid mapping)? Is it able to be achieved by deepbots or requiring other plugins or resources?
Additionally, this is my first time to hear that the robot agent can move like this in Webots without motor LoL. It is really interesting. Could you please give me some enlighting or advice about how to implement it? Many thanks! |
Beta Was this translation helpful? Give feedback.
-
Hi, Sorry for trouble you again and hope you are well. I got a problem in creating the environments of reinforcement learning training.
I just remember that you have proposed me before a thought that with deepbots we can construct a similar world as many cases of gym environments, in which the the agent moves by not continuous driving but actions moving one space in a different direction (such as cliff walking which is a typical grid world). Thanks to your enlightment, I am now trying to create a grid world with arena map with black and white plaid over it.
Now, my main thought is to create a space including actions by which the robot agent can move a constant distance, just like the same distance to one grid step ahead to different direction (forward, back, left, right). However, I got a problem with timestep.
As you know, the timestep is an attribute of
Supervisor
class, which is the super class of even all of relative subclasses. When the iteration starts, the functionstep()
, which is the function ofSupervisor
class, will be called by thestep()
function in subclass and automatically call thetimestep
attribute fromSupervisor
class so that the 3D simulating animation can push forward along the timeline. The trouble is, if I create a space with 'grid moving style' actions (such as moving for a grid distance, or rotate a given angle in one step of iteration), the function also usetimestep
. For example, this is the originalstep
function inSupervisor
class:And based on some resources online, one method to implement 'grid moving style' action can be achieved like this:
Here,
timestep
cannot be called simultanerously by two processes. Therefore, do you have any ideas to solve the problem? Or any better solutions for create grid world in Webots? Many thanks for any help or advice!Beta Was this translation helpful? Give feedback.
All reactions