This project is about the software providing virtual simulation for CoDrone. Using python API to control the drone.
- Multiple 3D scenes with CoDrone model and animation
- Simple to use Python API for drone controlling inside python drone simulator
- MiniMap, command and coordinate system help for understanding of the python codes
- Multiple obstacles for drone flight training
- Python 3.11 required to run the Drone Commands
- This SDK Contains the Drone Simulator API to control the Drone
Windows
pip install codrone_simulatorMacOS
pip3 install codrone_simulatorJupyterLab is an interactive development environment that allows you to create and run Python code in notebook format. For the Codrone Simulator.
Create your first drone program with the Hello World example.
- Link to Obstacle Editor README: Obstacle Editor README
Link to Original and Custom API: Original and Custom Drone API
- Rotate Camera (left mouse button + left alt)
- Pan Camera (middle mouse button + left alt)
- Zoom Camera (mouse scroll) or (right mouse button + left alt)
- Toggle Camera to Focus on Drone (F)
- Toggle Grid for visualizing the position (G)
- Install "codrone-simulator" package through Windows CMD or MAC Terminal
- Turn on the Python drone simulator
- Enter a Competition Scene or Free Play Scene
- Open JupyterLab and create a new Python notebook
- Run your code cells in the Jupyter notebook
- Note: If you have code written for the Real CoDrone API, change the import command: From codrone_edu.drone import Drone => From codrone_simulator import Drone From codrone_edu.protocol import Note => From codrone_simulator import Note
- If the python code is running but the drone is not moving, what should I do?
- Restart the drone simulator.
- Make sure the python code runs properly without any error.
- Make sure the drone current command inside the info panel is not null
- If the python code keeps running and not going to end, what should I do?
- Check if there are any code related to sensors, those code may be the reason for the problem.
- Restart the drone simulator.
- Make sure the Python API and the Drone Simulator are up to date.
- If the Python API cannot be detected, what should I do?
- Make sure there is no typo in the import command
- Make sure the import path is correct (If you are directly downloading the source file)
- Make sure the pip install environment and the python environment installed are the same as the running environment.
- If JupyterLab cannot connect to the simulator:
- Make sure the simulator is running before executing code cells
- Restart the Jupyter kernel
- Verify that codrone-simulator package is installed in the same Python environment as JupyterLab
