webots: Rover is getting stuck repeatedly or the quadcopter flips

Describe the Bug I have been working on Webots to get my object tracking drone up and running. Link: https://github.com/PrasadNR/Webots-Quadcopter-Python-SITL . However, when the simulation time step in WorldInfo is small, the rover gets stuck. If it is large, the quadcopter flips. If I simulate quadcopter and rover separately, they both work properly in independent simulations. However, I am not able to get both of them running.

Steps to Reproduce

  1. Clone the repo.
  2. Just double click on (or run) Webots-Quadcopter-Python-SITL/blob/master/worlds/empty.wbt
  3. Change WorldInfo -> basicTimeStep to 8
  4. See error

Expected behavior Rover should not get stuck and the quadcopter should not flip. The behaviour has to be graceful.

System

  • Operating System: Windows 8.1
  • Graphics Card: NVIDIA GeForce GTX 860M

Additional context I have attached the video. roverStuck.zip

P.S.: I have discussed this with @omichel .

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 16 (6 by maintainers)

Most upvoted comments

Thank you for the feedback, and sorry to read this. I think that these issues could be fixed as we have a working C program doing this released in production.

I hope you’ve not done with Webots 😉

I allow myself to follow up this topic, as @omichel is off this week.

I looked quickly at your issue, I can run your simulation in my environment.

  • I can indeed reproduce the issue about the Mavic2 which changes its behavior depending on the WorldInfo.basicTimeStep field. However, I think this is a quite normal behavior: this simulation is very sensitive on inputs, constants have been empirically found and optimized for the mavic_2_pro.wbt simulation only. If you use other physics parameters (including WorldInfo.basicTimeStep), these constants should be adjusted. Moreover, the example is more a proof of concept than an example to follow. If you would like to go further in drone control, I would recommend you to use an existing drone control library, and wrap it with our simulation.
  • About the Pioneer3at behavior which depends on the WorldInfo.basicTimeStep field, this is more surprising. I cannot reproduce this issue. Are you sure it does not comes from your controller which seems to stop the robot in case of some OpenCV event, and try to display some OpenCV window (which may block the controller)?

Let me also answer your misc questions:

In Webots, Gazebo is being run with some additional GUI. At least, they are more or less similar internally.

Webots and Gazebo are not linked at all in any way 😃 Webots uses Qt for this GUI, ODE for its physics engine, and WREN (home made rendering engine9 for its rendering.

The wheel slip plugin is not working correctly (especially when the time step is small) as there may be some sort of synchronisation issue.

The wheel slip is managed by ODE.

The internal code within Webots is running GUI asynchronously with mutex/semaphore locks or something similar and that is causing issues.

Maybe. But I would suspect first your Pioneer controller. Could you simplify it? (removing the cv2 code for example)

But, how can I start digging into the Webots source code?

You can build Webots from sources using these instructions: https://github.com/cyberbotics/webots/wiki#installation-of-the-webots-development-environment


I would recommend you to open more issues, but to reduce their focus and simplify them at best first 😉