Skip to content

Commit 8036d38

Browse files
committed
examples: add copyright headers
1 parent caa078b commit 8036d38

File tree

2 files changed

+51
-46
lines changed

2 files changed

+51
-46
lines changed

mavros_examples/mavros_examples/flight_task_control.py

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
#!/usr/bin/env python3
2+
#
3+
# Copyright 2025 Haroon Rasheed.
4+
#
5+
# This file is part of the mavros package and subject to the license terms
6+
# in the top-level LICENSE file of the mavros repository.
7+
# https://github.com/mavlink/mavros/tree/master/LICENSE.md
8+
#
29
# =============================================================================
3-
# File Name : flight_task_control.py
4-
# Author : Haroon Rasheed
5-
# Description :
6-
# -----------------------------------------------------------------------------
7-
# This script demonstrates UAV task control using MAVROS services in ROS 2.
8-
# It communicates with ArduPilot through MAVROS to perform flight operations
9-
# such as arming, changing flight modes, takeoff, landing, and setting home.
10+
# This script demonstrates UAV task control using MAVROS services in ROS 2.
11+
# It communicates with ArduPilot through MAVROS to perform flight operations
12+
# such as arming, changing flight modes, takeoff, landing, and setting home.
1013
#
11-
# The following MAVROS services are used:
12-
# • /mavros/cmd/arming — to arm or disarm the UAV
13-
# • /mavros/set_mode — to set the flight mode (e.g., GUIDED, RTL, LAND)
14-
# • /mavros/cmd/takeoff — to initiate takeoff
15-
# • /mavros/cmd/land — to command landing
16-
# • /mavros/cmd/set_home — to set the home position for the UAV
14+
# The following MAVROS services are used:
15+
# • /mavros/cmd/arming — to arm or disarm the UAV
16+
# • /mavros/set_mode — to set the flight mode (e.g., GUIDED, RTL, LAND)
17+
# • /mavros/cmd/takeoff — to initiate takeoff
18+
# • /mavros/cmd/land — to command landing
19+
# • /mavros/cmd/set_home — to set the home position for the UAV
1720
#
18-
# Note:
19-
# It is assumed that all pre-arm checks (such as GPS lock, RC calibration,
20-
# battery level, and sensor health) are passed successfully before executing
21-
# this script.
21+
# Note:
22+
# It is assumed that all pre-arm checks (such as GPS lock, RC calibration,
23+
# battery level, and sensor health) are passed successfully before executing
24+
# this script.
2225
# =============================================================================
2326

24-
2527
import rclpy # noqa: I100
2628
from geometry_msgs.msg import PoseStamped # noqa: F401,I100
2729
from mavros_msgs.msg import State # noqa: F401

mavros_examples/mavros_examples/waypoint_mission_manager.py

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,41 @@
11
#!/usr/bin/env python3
2+
#
3+
# Copyright 2025 Haroon Rasheed.
4+
#
5+
# This file is part of the mavros package and subject to the license terms
6+
# in the top-level LICENSE file of the mavros repository.
7+
# https://github.com/mavlink/mavros/tree/master/LICENSE.md
8+
#
29
# =============================================================================
3-
# File Name : waypoint_mission_manager.py
4-
# Author : Haroon Rasheed
5-
# Description :
6-
# -----------------------------------------------------------------------------
7-
# This Python script demonstrates how to manage waypoint missions using MAVROS.
8-
# It provides examples of how to interact with MAVLink services and topics
9-
# through ROS to perform mission management tasks such as:
10+
# This Python script demonstrates how to manage waypoint missions using MAVROS.
11+
# It provides examples of how to interact with MAVLink services and topics
12+
# through ROS to perform mission management tasks such as:
1013
#
11-
# • Uploading (pushing) waypoints to the flight controller.
12-
# • Downloading (pulling) existing mission waypoints.
13-
# • Clearing all mission waypoints from the flight controller.
14-
# • Setting a specific waypoint as the current active one.
15-
# • Changing flight mode to AUTO for mission execution.
14+
# • Uploading (pushing) waypoints to the flight controller.
15+
# • Downloading (pulling) existing mission waypoints.
16+
# • Clearing all mission waypoints from the flight controller.
17+
# • Setting a specific waypoint as the current active one.
18+
# • Changing flight mode to AUTO for mission execution.
1619
#
17-
# Note:
18-
# - This example only demonstrates the usage of MAVROS services and messages
19-
# related to waypoint missions.
20-
# - It assumes that the quadcopter is already airborne and hovering at its
21-
# home position before executing any mission-related operations.
20+
# Note:
21+
# - This example only demonstrates the usage of MAVROS services and messages
22+
# related to waypoint missions.
23+
# - It assumes that the quadcopter is already airborne and hovering at its
24+
# home position before executing any mission-related operations.
2225
#
23-
# Covered Services (from mavros_msgs):
24-
# - WaypointPush.srv
25-
# - WaypointPull.srv
26-
# - WaypointClear.srv
27-
# - WaypointSetCurrent.srv
28-
# - SetMode.srv
26+
# Covered Services (from mavros_msgs):
27+
# - WaypointPush.srv
28+
# - WaypointPull.srv
29+
# - WaypointClear.srv
30+
# - WaypointSetCurrent.srv
31+
# - SetMode.srv
2932
#
30-
# Related MAVROS Topics (waypoint mission related):
31-
# - /mavros/mission/waypoints : Publishes current mission waypoints.
32-
# - /mavros/mission/reached : Publishes notifications when a waypoint is reached.
33+
# Related MAVROS Topics (waypoint mission related):
34+
# - /mavros/mission/waypoints : Publishes current mission waypoints.
35+
# - /mavros/mission/reached : Publishes notifications when a waypoint is reached.
3336
#
34-
# The code provides a practical foundation for autonomous waypoint mission
35-
# management using MAVROS with ArduPilot-based flight controllers.
37+
# The code provides a practical foundation for autonomous waypoint mission
38+
# management using MAVROS with ArduPilot-based flight controllers.
3639
# =============================================================================
3740

3841
import typing as ty

0 commit comments

Comments
 (0)