Thu, Mar 03, 22, using raspi as fc to control small drone
This is a draft, the content is not complete and of poor quality!
environments
ssh pi@172.30.1.37 on raspi
sudo apt install -y build-essential file git sudo ruby curl
sudo apt install libavutil-dev tmux
sudo apt install rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> .bashrc
echo 'eval "$(rbenv init -)"' >> .bashrc
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
rbenv install --list
rbenv install 3.0.3
Connecting with another GCS
===========================
You can attach multiple additional ground control stations to SITL from
*MAVProxy*. The simulated vehicle can then be controlled and viewed
through any attached GCS.
First use the ``output`` command on the *MAVProxy command prompt* to
determine where *MAVProxy* is sending packets:
::
GUIDED> output
GUIDED> 2 outputs
0: 127.0.0.1:14550
1: 127.0.0.1:14551
This tells us that we can connect *Mission Planner* to either UDP port
14550 or 14551, as shown on the dialog below.
.. figure:: ../images/MissionPlanner_Connect_UDP.jpg
:target: ../_images/MissionPlanner_Connect_UDP.jpg
Mission Planner: Connecting to a UDPPort
.. tip::
We could connect *APM Planner 2* to the remaining port. If we
needed a third port, we could add it as shown:
::
GUIDED> output add 127.0.0.1:14553
*Mission Planner* can then be used to control the simulated vehicle in
exactly the same way as though it were a real vehicle. We can reproduce
the previous "takeoff-circle-land" example as shown below:
#. Change to GUIDED mode, arm the throttle, and then takeoff
- Open the *FLIGHT DATA* screen and select the *Actions* tab on the
bottom left. This is where we can change the mode and set
commands.
.. figure:: ../images/MissionPlanner_Actions_GuidedModeArm.png
:target: ../_images/MissionPlanner_Actions_GuidedModeArm.png
Mission Planner: Actions Tab (Set Mode, Arm/Disarm)
- Select **Guided** in the *Mode selection list* and then press the
**Set Mode** button.
- Select the **Arm/Disarm** button
- Right-click on the map and select Takeoff. Then enter the desired
takeoff altitude
.. figure:: ../images/MissionPlanner_Map_takeoff.jpg
:target: ../_images/MissionPlanner_Map_takeoff.jpg
Mission Planner Map: Takeoff Command
.. note::
Takeoff must start within 15 seconds of arming, or the motors
will disarm.
#. Change to CIRCLE mode on the *Action* tab and watch the copter circle
on the map.
#. You can change the circle radius in the *CONFIG/TUNING* screen.
Select *Full Parameters List*, then the **Find** button and search
for ``CIRCLE_MODE``. When you've changed the value press the **Write
Params** button to save them to the vehicle.
#. When you're ready to land you can set the mode to RTL.
Running SITL with a GCS without MAVProxy
========================================
It is also possible to interact with SITL without using *MAVProxy* at
all using **ArduCopter.elf** (in the **ArduCopter** directory).
Run the file in the *Cygwin Terminal*, specifying a home position and
vehicle model as shown below:
::
hamis_000@XPS12ultra ~/ardupilot/ArduCopter
$ ./ArduCopter.elf --home -35,149,584,270 --model quad
Started model quad at -35,149,584,270 at speed 1.0
Starting sketch 'ArduCopter'
Starting SITL input
bind port 5760 for 0
Serial port 0 on TCP port 5760
Waiting for connection ....
The command output shows that you can connect to SITL using TCP/IP at
port 5760.
In *Mission Planner* we first change the link type to TCP and then press
the **Connect** button. Click through the \ *remote host* and *remote
Port* prompts as these default to the correct values.
.. figure:: ../images/MissionPlanner_ConnectTCP.jpg
:target: ../_images/MissionPlanner_ConnectTCP.jpg
Mission Planner: Connecting toSITL using TCP
Mission Planner will then connect and can be used just as before.
.. tip::
**ArduCopter.elf** has other startup options, which you can use
using the -h command line parameter:
::
./ArduCopter.elf -h
Updating ArduPilot
==================
See advice on :ref:`this wiki page <git-rebase>` regarding how to "Rebase" on ArduPilot's master branch.
Updating MAVProxy
=================
.. warning::
The *MAVProxy 1.4.19 *\ installer does not properly remove all
parts of preceding installations. Before installing a new version you
must first delete the old directory: C\ **:\\Program Files
(x86)\\MAVProxy\\**.
`Download and Install MAVProxy for Windows <https://firmware.ardupilot.org/Tools/MAVProxy/MAVProxySetup-latest.exe>`__ (this link always points to the
244
hamis_000@XPS12ultra ~/ardupilot/ArduCopter
245
$ ./ArduCopter.elf --home -35,149,584,270 --model quad
246
Started model quad at -35,149,584,270 at speed 1.0
247
Starting sketch 'ArduCopter'
248
Starting SITL input
249
bind port 5760 for 0
250
Serial port 0 on TCP port 5760
251
Waiting for connection ....
252
253
The command output shows that you can connect to SITL using TCP/IP at
254
port 5760.
255
256
In *Mission Planner* we first change the link type to TCP and then press
257
the **Connect** button. Click through the \ *remote host* and *remote
258
Port* prompts as these default to the correct values.
259
260
.. figure:: ../images/MissionPlanner_ConnectTCP.jpg
261
:target: ../_images/MissionPlanner_ConnectTCP.jpg
262
263
Mission Planner: Connecting toSITL using TCP
264
265
Mission Planner will then connect and can be used just as before.
266
267
.. tip::
268
269
**ArduCopter.elf** has other startup options, which you can use
270
using the -h command line parameter:
271
272
::
273
274
./ArduCopter.elf -h
275
276
Updating ArduPilot
277
==================
278
279
See advice on :ref:`this wiki page <git-rebase>` regarding how to "Rebase" on ArduPilot's master branch.
280
281
Updating MAVProxy
282
=================
283
284
.. warning::
285
286
The *MAVProxy 1.4.19 *\ installer does not properly remove all
287
parts of preceding installations. Before installing a new version you
288
must first delete the old directory: C\ **:\\Program Files
289
(x86)\\MAVProxy\\**.
290
291
`Download and Install MAVProxy for Windows <https://firmware.ardupilot.org/Tools/MAVProxy/MAVProxySetup-latest.exe>`__ (this link always points to the latest version!)
292
293
294
.. _sitl-native-on-windows_next_steps:latest version!)
.. _sitl-native-on-windows_next_steps:
# in case of issues with above, follow this instruction: https://elinux.org/RPi_Ruby_on_Rails
sudo apt install dirmngr
# Install prerequisites
sudo apt-get install -y git curl zlib1g-dev subversion
# this will take hours
curl -L get.rvm.io | bash -s stable --rails
# Additional Ruby dependencies
sudo apt-get install -y openssl libreadline6-dev git-core zlib1g libssl-dev
sudo apt-get install -y libyaml-dev libsqlite3-dev sqlite3
sudo apt-get install -y libxml2-dev libxslt-dev
sudo apt-get install -y autoconf automake libtool bison
# Install prerequisites
sudo apt-get install -y git curl zlib1g-dev subversion
source ~/.rvm/scripts/rvm
sudo apt install tmux
gem install tmuxinator
sudo apt install powerline
sudo apt install fonts-powerline
mkdir .configure/fontcofnig/
tee .configure/fontconfig/conf.d
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<selectfont>
<acceptfont>
<pattern>
<patelt name="family"><string>terminess powerline</string></patelt>
</pattern>
</acceptfont>
</selectfont>
</fontconfig>
fc-cache -vf
$ sudo wiliest wlan0
# Returns list of available Wifi networks
$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
#opens the wpa-supplicant configuration file in nano
#Go to the bottom and add:
network = {
ssid = "wifiname"
psk = "wifipassword"
}
# install mavproxy
sudo apt-get install python3-dev python3-opencv python3-wxgtk4.0 python3-pip python3-matplotlib python3-lxml python3-pygame
pip3 install PyYAML mavproxy --user
echo "export PATH=$PATH:$HOME/.local/bin" >> ~/.bashrc
source
cloning raspi usb stick
installing joystick_remote
The following wiki, pages and posts are tagged with
Title | Type | Excerpt |
---|---|---|
2021-09-26-thesis-indoor-drone.md | post | After launching a file, call the following services to initialize the drone in Gazebo and the Particle Filter algorithm |
Udemy qt5 course by Packt Publishing | post | Tue, Oct 26, 21, Dive into custom model-views, showcasing the power and flexibility of the mvodel view architecture, with extensive www applications |
Pilot handbook + drone resource wiki | post | Tue, Nov 02, 21, pilot's handbook summarized on top of key cocnepts from rapa drone-resource |
Single rotor drone | post | Thu, Nov 04, 21, single rotor air vehilce with rudder and flap to navigate |
Pilot's preflight checklist FAA | post | Tue, Nov 09, 21, preflight checklist with data mining, d3 visualization and google sheet implementation |
final-project | post | Sat, Nov 27, 21, motion planning dashboard with django vue and fcnd |
motion planning dashboard hardware setup | post | Wed, Dec 01, 21, master, raspi, database, video-streaming, api server setup |
px4 mavlink and qgc integration with 4gremoteoperation | post | Tue, Jan 18, 22, powerful 3d simulation environment for autonomous robots suitable for testing object-avoidance and cv |
Airlink by skydrone, youtube | post | Friday, airlink for mission flight, LTE connectivity and dl-ready |
set up with raspi connected to fc | post | Tue, Jan 25, 22, ardupilot documentation |
drone programming primer for software development | post | Mon, Jan 31, 22, flight stack with firmware middleware and api |
runcam with fc connection | post | Tue, Feb 15, 22, runcam split 2 with fc |
my new fixed wing AR Wing Pro, ready for dji HD fpv system | post | Thu, Feb 17, 22, setup guide after opening the package |
realflight 7 setup and console game | post | Thu, Feb 24, 22, flight simulation with real flight 7 |
uavmatrix's cast pro docs | post | Tue, Mar 01, 22, another way to integrate devices to gcs |
firmtech7 of naver cafe raspi drone project | post | Thu, Mar 03, 22, using raspi as fc to control small drone |
Garupner Polaron ex | post | Sun, Mar 06, 22, polaron 2 channels dc charger |
svg visualization messages and parameters | post | Mon, Mar 07, 22, organized structure and tree map of px4 messages and parameters |
lx network, airlink, gcs and data transmission on smart radio, rf mesh and quantum encryption | post | Tue, Apr 26, 22, all about setup and how it operates and managed |
Advanced Features | page | |
Advanced Configuration | page | |
Advanced Flight Controller Orientation Tuning | page | |
rflysim tltr | page | |
Bootloader Update | page | |
Bootloader Flashing onto Betaflight Systems | page | |
Compass Power Compensation | page | |
drones.md | page | my drones I work with and at my disposal. |
ESC Calibration | page | |
Flight Termination Configuration | page | |
my 100 supporters | page | my freelancers I work with since 2018. |
index.md | page | My recent projects are leveraging generative AI across various domains, yielding significant achievements. These encompass Digital Twin, Voice-to-Command, RA... |
Land Detector Configuration | page | |
About this site and its author | portfolio | My portofolio site and its mission statement |
🔭AIOT projects | page | summary. |
contents deploy automation | page | Pilot test on the automation prototype. |
pixhawk apm racing drone | page | summary. |
Challenger Engineering Project | page | summary. |
pixhawk tools | page | rFlyeval project details where Matlab Mathwor Simulink were used for complete process of UAV and UAS. |
Korea drone companies | page | summary. |
Racing drone, attck drone | page | summary. |
Django Django Two scoops | page | summary. |
docker learning curve | page | summary. |
🔭 Ground Control Station web-based approach | page | summary. |
gitlab | page | summary. |
🔭lora monitoring app | page | summary. |
🔭 MQTT pages | page | summary. |
My course list | page | my course list from udemy, udacity, NCS and other sources |
Nextcloud | page | summary. |
Automation pipeline | page | summary. |
Pixhawk 4 | page | summary. |
Pixhawk overview | page | summary. |
🔭raspberry pi project | page | summary. |
🔭yuneec realsense obstacle avoidance | page | summary. |
ROS topic for micro control | page | summary. |
🔭 RQt-based gui | page | summary. |
🔭sensor detection | page | RealSense with Open3D |
🔭Serializer with API | page | summary. |
Rules of thumb | page | Contact me for any support issues. |
web-dev ops pages | page | |
🔭 Webrtc | page | summary. |
Parameter Reference | page | |
Finding/Updating Parameters | page | |
Precision Landing | page | |
pixhawk tools advanced | page | rFlyeval project details where Matlab Mathwork Simulink were used for complete process of UAV and UAS. |
pixhawk tools | page | rFlyeval project details where Matlab Mathwor Simulink were used for complete process of UAV and UAS. |
RTK GPS | page | GNSS/GPS systems |
Iridium/RockBlock Satellite Communication System | page | |
Static Pressure Buildup | page | # Static Pressure Buildup Air flowing over an enclosed vehicle can cause the *static pressure* to change within the canopy/hull. Depending on the location of holes/leaks in the hull, you can end up with under or overpressure (similar to a wing). The change in pressure can affect barometer measurements, leading... |
Air Traffic Avoidance: ADS-B/FLARM | page | |
Air Traffic Avoidance: UAS Traffic Management (UTM) | page | |
Using the ECL EKF | page |