Ubicoders - Robotics and AI, Coding, and Software Development!

A Virtual Drone On Web

I Made a Virtual Drone on a Web Browser: Control It Using Python.

Picture of the author
Elliot Lee - Nov.16, 2023

Ubicoders now have a virtual drone on web. You can interact with it in Python. A simulation can play important roles when developing a drone. Simulation does not physically break. It is easy to restart after chaning the code. However, as a beginner using a professional simulation like AirSim can be challenging as it requires other software dependancies. Therefore, let me guide tell you how you can use ubicoders' free simulation for multirotor.

Let's go to it.

  1. Clone Python repo
  2. Install a pip package
  3. Run Ubicoders' bridge
  4. Run a demo script

Virtual Drone On Web

A virtual drone on the ubicoders' web is simply a game that is rendered on a web, and the game can communiate with your local Python environment. That is, you just need a Python enviornment and web browser.

Step 1. Clone Ubicoder's Multirotor Repo

Git url: https://github.com/ubicoders/vrobots_multirotor

Step 2. Install Ubicoders pip package

bash

Line #:

pip install ubicoders-vrobots

Step 3. Run Ubicodres' Virtual Robots Bridge

bash

Line #:

python -c "import ubicoders_vrobots.vrobots_bridge.vrobots_bridge_gui as gui; gui.gui_app_run()"

The above code should open a window as below.

Step 3.a Connect to The Bridge

Click the green button "Connect" above.

Then, the "multirotor" tab should show "active". If so, this virtual robot (multirotor) has connected to the bridge.

Step 4. Execute the code

bash

Line #:

python my_vrobot.py

That's it. You have all the necessary Python environment and tempalte scripts to interact with the virtual robot environment from Ubicoders. Enjoy!

Loading...