Skip to content

PX4-firmware based drone control ROS node written in python

Notifications You must be signed in to change notification settings

Y-Grigoriy/px4_control

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PX4 drone control

ROS node to control a px4-firmware drone. Waypoints following, intelligent landing.

jmavsim_flight

Installation

  1. Install Gazebo, jMAVsim simulators and Pixhawk tools, reference:
wget https://raw.githubusercontent.com/PX4/Firmware/master/Tools/setup/ubuntu.sh
wget https://raw.githubusercontent.com/PX4/Firmware/master/Tools/setup/requirements.txt

bash ubuntu.sh
  1. Install ROS and Mavros:
sudo apt-get install ros-melodic-mavros ros-melodic-mavros-extras
wget https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh
sudo bash install_geographiclib_datasets.sh
  1. Clone and build PX4 Firmware:
mkdir ~/src; cd ~/src
git clone https://github.com/PX4/Firmware.git --recursive
cd ~/src/Firmware
make px4_sitl_default
  1. Create ROS catkin workspace and build the package:
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone https://github.com/RuslanAgishev/px4_control/
cd ~/catkin_ws
catkin_make
source ~/catkin_ws/devel/setup.bash
  1. In order to fly in a simulator:
  • launch a simulated environment (Jmavsim):
cd PX4/Firmware/
make px4_sitl_default jmavsim

if it shows ant: command not found error, do:

sudo apt-get update
sudo apt-get install ant

if it shows "Ant needs tools.jar and unable to find it", do:

sudo apt-get install openjdk-8-jdk
  • connect to the simulated drone:
cd aerovr_ws/
source ~/aerovr_ws/devel/setup.bash
roslaunch px4_control px4_sim.launch
  • execute flight command:
rosrun px4_control drone_test.py

About

PX4-firmware based drone control ROS node written in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 93.5%
  • CMake 6.5%