Thursday, December 19, 2024

Dronekit

Copy: Ctrl + C <<<important
Paste: Ctrl + Shift + V <<<important

Step 1. <<<important

1. Download ubuntu 24.04.1 LTS
2. Download Rufus
3. Get 16gb pendrive and flash with ubuntu image.

***********notes*****
Connect a Python Script to a Drone (part 1) :https://www.youtube.com/watch?v=pcVe45DCV8A 
Connect Python Script to Simulated Drone (part 2)  : https://www.youtube.com/watch?v=-91VB6zuK5A




note:
Pi Zero Drone Build:
 
Pi Zero drone 
 
DIY Drone light show
 
Can a 3D Printer Race Plane Withstand 100 MPH? 
 
Tiziano Fiorenzani Channel
 
Code Python with Blocks
 
 How to control a drone with python  <<<important
 
 Control a drone with paper, not rc controller
 
IP Based MAVProxy Control <<<important




https://www.youtube.com/watch?v=CtS17WX40iM  ---install ubuntu <<<important



https://www.youtube.com/@alirezaghaderi/videos  -- Good future for mavlink with complete tutorial
unlimited range pixhawk telemetry <<<important
Mavlink anywhere <<<important

**************
To setup sitl in ubuntu <<<important
 
*1. Follow this link
*2. To use Dronekit, type into terminal:  python -m pip install dronekit mavproxy


To run Simulation <<<important

1. Open Terminal
2. Type:
cd ardupilot/ArduCopter
then
sim_vehicle.py --console --map -w 

Alternatively, if not starting in the ArduCopter directory, but at the base ardupilot directory:

sim_vehicle.py -v copter --console --map -w 
 
 see more
 
 
4. Change to Guided Mode: Mode guided <<<important
5. Arm: arm throttle
6. Takeoff: Takeoff 100
7. Landing:  mode RTL
8. Disarm: Disarm
 

Command

Description

rc N PWM

set RC channel N override to PWM (PMW =0 disables override)

link list

List all links

link set N

Set link N to primary

link add X

Add new link

link remove N

Remove link

wp list

Download and show waypoints

fence list

Download and show geofence

fence enable

Enable geofence

fence disable

Disable geofence

arm throttle

Arm vehicle

disarm

Disarm vehicle

disarm force

Force vehicle disarm (heli)

auto

Engage auto mode

wp set N

Set current auto waypoint to N

setspeed N

Override auto speed to N m/s

param show X

Show current value of parameter X

param set X N

Set parameter X to value N

param download

Download parameter definitions from ArduPilot website

param help X

Display definition of parameter X

mode loiter

Engage loiter mode

mode rtl

Engage rtl mode

mode manual

Engage manual mode

mode guided LAT LON ALT

Engage guided mode and move to specified location

relay set N [0|1]

Set relay N to open or closed

servo set N PWM

Override servo N to PWM value

terrain check LAT LON

Get terrain height at specified location

formatsdcard

Formats SD card

 
 ctrl + C = to end simulation <<<important
 
 type Command / Help for more.
 
 *****
To run sitl with gazebo, follow this link.
 

Start the Simulator with Gazebo <<<important

In a terminal window start Gazebo:

gazebo --verbose worlds/iris_arducopter_runway.world

In another terminal window, enter the ArduCopter directory and start the SITL simulation:

cd ~/ardupilot/ArduCopter
../Tools/autotest/sim_vehicle.py -f gazebo-iris --console --map 
 

Run the simulator with python script <<<important

Copy and paste python script (ex. demo.py) in the ardupilot/arducopter folder.
Open new terminal and type: pyton demo.py
Everything should run.
 
Next....mission planner in ubuntu. 

No comments:

Post a Comment