Skip to content

Frequently Asked Questions

General

  1. Q: Something is wrong with my GUI, I can't see everything there is.
    A: It's likely you're running MiRoCloud on a device with a smaller or low resolution display. You can try fixing this by making the GUI elements smaller — hover your mouse over the panel the size of which you wish to change, hold Ctrl and use either your mouse wheel or +/- keys.

  2. Q: Sometimes the blocks and the rest of the GUI freeze.
    A: This usually indicates a connection problem and normally would resolve by itself, but you can try refreshing the page. In a rare case you might need to reload your MiRoCloud instance from the MiRoCloud Manager page (Close -> Drop -> Open -> Launch). If that still doesn't work please speak to the lab lead and you'll be given temporary access to a stopgap account, while we resolve the issue.

  3. Q: I get an odd error when trying to use (cliff/camera/sonar) sensors.
    A: Sensors need a short time (~ 1s) to properly initialise after the program starts. Either introduce a short Wait block before you access them, or introduce some action before trying to obtain the readings.

  4. Q: MiRo camera(s) are frozen?
    A: Video streams consume a lot of bandwidth and it's not uncommon to see a lag in the feed. Click on the "reconnect" button at the top of the simulator window to reconnect.
    Reconnect cameras

  5. Q: MiRo does not react to environment...
    A: Make sure to poll the sensors periodically, and use the latest readings.

  6. Q: Nothing is happening when I run my code and after some time I get an error timeout waiting for cameras to be ready?
    A: Most likely you've paused the simulation, simply click Play and it should be working again.
    Gazebo paused

Blocks

  1. Q: Blocks in Precise Movement Group (e.g. Move X meters/steps) sometimes cause the program to freeze
    A: Most often the issue is caused when the Position Control algorithm fails to correct MiRo's movement. Try disabling Position Correction and stick to best practices, described below. Turning off Position Correction comes at a price, though, as MiRo will tend to drift even more when moving in a straight line.

Python interface

  1. Q: My program doesn't do anything when I run it.
    A: It's likely you have a syntax error in your Python code, double check your code carefully. Sometimes such errors just fail silently in MiRoCode without giving you a proper error log.

Known bugs/issues

  • MiRo does not always move in a perfectly straight line (both in the real world and in the simulation!)
  • Sometimes when MiRo has been idle for too long in the simulator, it slowly starts to drift (usually ).
  • The settings for the Program Start block sometimes revert back to default when loading a saved file.
  • If you experience a blank display in the Simulator View or other visual artefacts, it might be a conflict with some plugins in your browser. Try disabling the plugins one by one until the issue is resolved.
  • When using the Float output in the Cliff sensor blocks in numerical comparisons, the value needs to be assigned to a variable first:
    floats
  • When implementing your own cliff reflex for MiRo, sometimes the movement blocks get stuck or skipped. Turning off the built-in cliff reflex can help reduce the occurrence of such issues.
  • Cliff Reflex sometimes stays ON, even if previously disabled in the Program Start settings. This happens due to the corresponding flag not being published correctly. A workaround is to publish the flag manually, a code snippet that does that can be found here.

Best practice

  • Save often, in separate files!
  • Do not run or save the code when you have 'hanging' blocks (i.e. unconnected blocks that are not Starters).
  • Do not try to modify blocks when the code is running.
  • It is possible to write a bigger program by combining multiple shorter programs. To do this, save each subprogram into a separate .mirocode file. Then, load a subprogram and put its code in the bin. Load the next subprogram and put its code in the bin, too. Proceed until all of the required pieces of code are in the bin. Finally, restore everything by simply dragging the contents back to the canvas.
  • When combining Discrete and Continuous Action blocks, it's advisable to put a small delay in-between to avoid any desync in your code. For example:
    Delays
  • Avoid using double quotes in the Print String block