GitHub - Saurabhmandlik - Vision-based-indoor-navigation-of-an-UAV
GitHub - Saurabhmandlik - Vision-based-indoor-navigation-of-an-UAV
Star Notifications
Required Set-up
https://github.com/saurabhmandlik/Vision-based-indoor-navigation-of-an-UAV 1/6
2/6/25, 11:39 PM GitHub - saurabhmandlik/Vision-based-indoor-navigation-of-an-UAV
1. Ubuntu 18.04
2. ROS Melodic
3. Mission Planner
4. RViz
5. vision_to_mavros ROS packages and AprilTag marker
6. TensorFlow
7. Python 2.7
Hardware used
1. Raspberry Pi 4
2. Intel RealSense Camera
3. Raspberry Pi camera V2.0
4. UAV
5. PixHawk 4
6. RC transmitter
7. 4500 mAh LiPo Battery
8. StromPi and Battery module
Features of MAVROS
-Communication with autopilot via serial port, UDP or TCP (e.g. PX4 Pro or
ArduPilot)
-Plugin system for ROS-MAVLink translation
-Parameter manipulation tool
-Waypoint manipulation tool
-PX4Flow support (by mavros_extras)
-OFFBOARD mode support
-Geographic coordinates conversions.
MAVROS Installation
https://github.com/saurabhmandlik/Vision-based-indoor-navigation-of-an-UAV 2/6
2/6/25, 11:39 PM GitHub - saurabhmandlik/Vision-based-indoor-navigation-of-an-UAV
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin init
wstool init src
README
./src/mavros/mavros/scripts/install_geographiclib_datasets.sh
catkin build
source devel/setup.bash
Pixhawk FCU
Pixhawk is a flight controller unit that is used for many applications of multicopters, rovers
etc. It offers a wide variety of flight modes from fully manual to fully autonomous. As part of
the wider ArduPilot software platform it works seamlessly with a variety of Ground Control
Station programs that are used to setup the vehicle, monitor the vehicle’s flight in real-time
and perform powerful mission planning activities. For this project, I have used Pixhawk 4 FCU.
AprilTag Marker
Apriltag is
https://github.com/saurabhmandlik/Vision-based-indoor-navigation-of-an-UAV 3/6
2/6/25, 11:39 PM GitHub - saurabhmandlik/Vision-based-indoor-navigation-of-an-UAV
Hardware Setup
Before doing this, check the following parameters in Mission Planner Software: (Information
regarding mission planner software and mandatory hardware configuration steps can
available in Thesis Work -> Mission Planner directory)
AHRS_EKF_TYPE = 2
BRD_RTC_TYPES = 2
EK2_ENABLE = 1
EK3_ENABLE = 0
EK2_GPS_TYPE = 3
EK2_POSNE_M_NSE = 0.1
EK2_VELD_M_NSE = 0.1
EK2_VELNE_M_NSE = 0.1
GPS_TYPE = 0
COMPASS_USE = 0
COMPASS_USE2 = 0
COMPASS_USE3 = 0
SERIAL5_BAUD = 921 (the serial port used to connect to Raspberry Pi)
SERIAL5_PROTOCOL = 1
SYSID_MYGCS = 1 (to accept control from mavros)
VISO_TYPE = 0
Ground test
Go to misssion planner software and click on the connect button (upper right part of the
window) with having baudrate 57600.
2. MAVROS node
- roslaunch px4.launch fcu_url:ttyACM0:57600
3. vision_to_mavros node:
- roslaunch vision_to_mavros tf_to_mavros_rs.launch
https://github.com/saurabhmandlik/Vision-based-indoor-navigation-of-an-UAV 4/6
2/6/25, 11:39 PM GitHub - saurabhmandlik/Vision-based-indoor-navigation-of-an-UAV
and also run the "mavros echo /tf" to see the camera pose in Apriltag frame with Z-axis
pointing downwards. /tf is basically transforms the pose of source_frame_id and
target_frame_id which is defined in tf_to_mavros_rs.launch file.
I already mentioned above how to connect FCU to MP. After connecting to MP, You can see
the pop-up screen on MP window that shows getting parameters.
Then you have to set the EKF home position. It's shows the vehicle position in the world. For
that, I have a script set_origin.py where I have set SET_GPS_GLOBAL_origin and
SET_HOME_POSITION MAVLink messages. Run this scropt on terminal by command "rosrun
vision_to_mavros set_origin.py". Script available in visio_to_mavros -> scripts directory.
After running the script, you can see the quadcopter icon on MP software. (add SS here)
Now you are ready to fly UAV manually. Keep UAV on AprilTag marker and turn on the RC tx
ON and click on ARM button in MP. The rotors will start to rotate and according to given
thrust, we can manage the UAV using different modes. We will see the flight modes in details.
Releases
No releases published
Packages
No packages published
Contributors 2
holger-ziti
https://github.com/saurabhmandlik/Vision-based-indoor-navigation-of-an-UAV 5/6
2/6/25, 11:39 PM GitHub - saurabhmandlik/Vision-based-indoor-navigation-of-an-UAV
Languages
https://github.com/saurabhmandlik/Vision-based-indoor-navigation-of-an-UAV 6/6