After opening the Mission Planner software, go to the second tab i.e., plan (flight planner) and on the right hand side set the home coordinates, since in this task we want a geofence around the college, we set the coordinates of the college i.e, 12.97530740069745, 77.5866144525168
The built-in simulator in Mission Planner, also known as SITL (Software In The Loop), allows one to simulate a drone running in ArduPilot firmware directly on the person's computer. It mimics real-world flight behavior, enabling user to test missions, tune parameters, and practice flying without needing physical hardware.
For setting up a simulation , go to the simulation tab and then click on the multi-rotor, download the stable file and connect the mavlink.
Below is the Heads up Display of the Mission Planner;
Gradient (Grad %):
Gives the steepness of climb/descent of the UAV between the two waypoints in %.
Takeoff & Landing:
It makes the drone rise X m above the ground and once this is done, it goes towards waypoint 1. To enable it,
Right click on the screen and click on take-off. Set the takeoff altitude to 60m,
Similarly set a LAND waypoint at the end. Now, set the altitude of each waypoint accordingly, so that the drones takes off to a certain altitude in steps of increasing altitude, then surveys the region, and then gradually decreases the altitude in order to land in a set waypoint.
Prefetching:
Press & hold alt and select all the waypoints, right click and hit on prefetch. [Max Zoom=20]
Note:
Here the top image shows the customization window of the survey (grid), and the bottom image shows the final waypoints.
Note:
On the right hand side of the flight planner interface, there are 5 ways to upload the waypoint missions, they are as follows:
Chat GPT for HUD of Mission Planner
Below is the certificate of completion of my MATLAB Onramp course.
Click here to view the handbook for the course.
Below is the certificate of completion of my Simulink Onramp course.
Click here to view the handbook for the course.
IMAGE
All the resource materials specified in the task, no other resources used.
Pre-requisites learned from 7th task of Level 1.
The below are the notes I made referring the given resource materials:
Practical Demonstration of PID using Self Balancing Car:
The above is the circuit diagram of the self balancing car. The self-balancing robot implements a closed-loop control system using PID (Proportional-Integral-Derivative) to maintain its vertical orientation based on real-time pitch angle feedback from an MPU6050 IMU.
Actual Working of the Self Balancing Robot:
VIDEO
All the resource materials specified in the task, no other resources used.
I reported on the Crash of Air India Express flight 1344, which crashed on the Kozhikode Int'l Airport on 7th of Aug 2020.
Click Here to view my Air Crash Investigation Report.
There are two types of Logs:
Feature | Auto Analysis | Review a Log |
---|---|---|
Purpose | Quick health check | Detailed manual inspection |
Ease of Use | Very easy | Moderate to advanced |
Detail Level | Low to moderate | High |
Format | Text-based summary | Interactive graph viewer |
Ideal For | First-look diagnosis | Debugging, tuning, deep investigation |
Shows Graphs | No | Yes |
Custom Analysis | No | Yes |
AMS Log:
Altitude vs Time:
Basic difference between CTUN.Alt (Control Tuning) & AHR2.Alt (Attitude and Heading Reference System (version 2)
Term | What It Means | Example Values from Graph |
---|---|---|
CTUN.Alt | Commanded altitude relative to home (takeoff point) | 0 to ~60 meters (green line) |
AHR2.Alt | Actual altitude (absolute above sea level) | ~842 to 905 meters (red line) |
Throttle & Battery vs Time consumption:
Volt:
Real-time/inst. battery voltage (in volts).
CurrTot:
Total current consumed over the mission (in mAh or Ah depending on settings).
Throttle Hover ThH:
It represents the actual throttle output required for the drone to maintain a stable hover. It is with respect to the thrust to weight ratio of the drone. It's a normalized value ranging from 0 to 1, where 0 corresponds to 0% throttle and 1 represents 100% throttle. Ideally, a ThH value close to 0.5 indicates that the drone is hovering efficiently, utilizing around 50% of its available throttle capacity. However, if the ThH value exceeds 0.7, it may suggest potential issues such as an overweight airframe, underpowered or inefficient motors, or a significant drop in battery voltage leading to reduced thrust output.
Battery voltage vs Time:
This image shows just the voltage values of the drone, the spikes here show the alterations in battery voltage. The lower spikes are recorded during the transition between 2 waypoints. This shows that the voltage consumed by the drone is least when transitioning between 2 waypoints. Reason being here the velocity of the drone is also the least.
Velocity vs Time:
The above image shows the graph of Velocity vs Time. On analysis of the graph at each location it is evident that the peak velocity of the drone was recorded in the straight path between the two waypoints, and the lower most peaks of the velocity was recorded at the turns between the waypoints.
Simulator Log:
Simulator Auto Log:
Altitude vs Time:
The pink shade shows the drone being in stabilize mode, after that the turquoise color shows the drone in auto mode. Indicating the drone had ~ 0m altitude i.e., on the ground when in stabilize mode, later it was switched to the Auto mode and followed the path which was fed in the FC. Drone reached a peak of 150m altitude this altitude was reached between waypoint 5 & 6.
Throttle vs Time:
Here we can see the peak throttle detected was 0.48, that took place when the drone took off from ground to its maximum altitude, the later peak throttle was detected just after the 3rd waypoint. Unlike before, here I used ThO which stands for throttle output, it shows the real time throttle (%) commanded by the pilot.
Battery Consumption vs Time:
The above image shows the plot of battery current consumption (mAh) with respect to the flight time.
Battery Voltage vs Time:
The above graph shows the battery consumption (v) with respect to the flight time. We can see that the drone consumes constant 12.6 volts of battery throughout the flight time.
Velocity vs Time:
The above graph shows velocity of the drone (m/s) at various time stamps. The peak velocity was found somewhere in the midpoint of 6th and 7th waypoints, and dropped subsequently.
Crash Log:
Crash Auto Log:
Here,
We can see that the compass calibration- Fail, meaning it wasn't done properly
GPS module was physically connected but in the log file it says that No GPS log data that means either the GPS was faulty or the connection was faulty.
Altitude vs Time:
Here as we can see the altitude AGL values are in -ve, which shouldn't be, this makes us conclude the initial calibration done was faulty. Better calibration and placement of the FC would tackle this issue.
Throttle & Battery vs Time:
Because of faulty calibration/chosen log settings , throttle and battery data have not been recorded in the log files.
Velocity vs Time:
Because of faulty calibration/chosen log settings , velocity data has not been recorded in the log files.
3D flight path:
The above images show the 3D view of flight path followed by the drone.
Mission Planner sometimes exports only the path, waypoints, and position markers, but not an animated tour. This typically happens when the log lacks telemetry timing data, which is essential for generating a time-based animation. Without this data, Mission Planner cannot reconstruct the sequence of movements over time, resulting in a static path instead of a dynamic video. Only .tlog
filesβtelemetry logs recorded during flightβcontain the detailed time-stamped information required to build an animated video that shows the drone's motion over time.
All the resource materials specified in the task, no other resources used.
Command | Purpose | What It Does | Effect on Packages | In Short |
---|---|---|---|---|
sudo apt update |
Fetch and refresh package lists | Downloads the latest package lists from repositories, updating systemβs knowledge of available versions | No packages are installed or upgraded | Refresh the package info (like checking for new versions) |
sudo apt upgrade |
Upgrade installed packages | Upgrades all installed packages to their latest versions based on updated package lists; installs available updates for current software | Installed packages get upgraded; no removals or new dependencies installed | Actually download and install the new versions available |
These nodes communicate with each other via means of Topic. A node would send a message to the topic and another node would receive the message from the topic. The node that sends the message is the publisher node and the node that receives the message is called as the publisher node. Topics can be thought as a new broadcast where there is no direct response from the listener. But for specific one time requests the ROS nodes use services, services can be thought like making a phone call and asking for a data and waiting for a response before continuing, For more complicated tasks of navigating to a particular locations, ROS uses actions, it's like sending a package with tracking.
Nodes:
A node is a program that has access to ROS functionalities and communication tools. It is responsible for a specific process that completes a specific task. Nodes communicate with each other and can print logs to the terminal. We can also have nodes that:
Basic Commands in ROS
mkdrir folder_name
Creates a new folderCtrl + C
in a terminal where a ROS node is running kills the node, and stops the running node.rqt_graph
fives us the flowchart of the communication happening between the active/running nodes.clear
clears the terminalros2 run nameofthepackage_cpp/py nameofthenode
is the syntax for running a node in a packages in ROS 2. {it's _cpp for c++ package & _py for python package}code .
this opens the specific folder in VS Codetab
(on keyboard) gives us the auto-complete options.Choose binary package installation
And then click "Debian Packages"
Follow the instructions, i.e., copy-paste the given codes in the ubuntu terminal.
During the installation there are two types of file available, ROS Desktop installer & ROS Base installer:
Setup the environment by sourcing the setup script.
To source the above location, type gedit ~/.bashrc
and paste the above location which is to be sourced, i.e., source /opt/ros/humble/setup.bash
sudo apt install python-is-python3 python3-colcon-common-extensions
cd /usr/share/colcon_argcomplete/hook/
is used to build a workspace in ROS 2. Here "colcon" is the build tool.ls
to view the files within it & then just source the .bash
script into the source using gedit ~/.bashrc
. Add another line after the line having source to installation added, in the newly added line paste the path i.e., usr/share/colcon_argcomplete/hook/Here paste the .bash script
Before we start making custom nodes, we first need to create packages. Generally nodes are written inside packages as they allow us to organize the code in a better way, organize the dependencies more efficiently. Follow the below steps to create a ROS 2 package:
src
ros2 pkg create package_name --build-type ament_python --dependencies rclpy
ament_cmake
ament_python
rclpy
is the Python library for ROS 2import rclpy
In the below image, talker and listener are the two nodes and chatter is the topic via which the communication takes place. Here the talker node publishes to the chatter topic and the listener node subscribes to the chatter topic. The talker doesn't communicate directly to the listener, it communicates via a topic (chatter) in this case. Multiple nodes can publish or subscribe to the same topic.
Few important cmds for dealing with topics are as follows :
ros2 topic list
gives us the list of topicsros2 topic info /actualtopicname
this gives us the type of the topic (what is being sent), number of publishers & number of subscribers.ros2 interface show typeoftopic/obtainedfrom/abovecmd
this gives us the datatype of the values stored in the topicros2 topic echo /actualtopicname
after running this node, this would give us the data that is being exchanged via the topicssrc
folder of the workspace & create a package, within this package you create nodes.
src
of the workspace by, cd ~/ros2_ws/src
(Ex: ros2_ws
is the name of the workspace)ros2 pkg create drone_data --build-type ament_python --dependencies rclpy std_msgs
src
of the workspace which is created and then right click, open in terminal. After opening in terminal type code .
to open the same location in VSC..py
code name it as a publisher code
& type the respective publisher code inside it. Once done create another .py
code this time for subscriber and type the subscriber node code within it.setup.py
code, modify this code also accordingly.cd ~/workspace_namehere
colcon build
source install/setup.bash
ros2 run packagename nodename
ros2 run packagename publishernode
[In terminal 1]ros2 run packagename subscribernode
[In terminal 2]rqt_graph
to see the graphical representation of the nodes & terminals.The below is the video of me executing, running and performing the tasks:
All the resource materials specified in the task, no other resources used.