- dependencies
- run jmavsim as simulator
- run dronekit sample code
Install dependencies
sudo apt-get install python-jinja2
sudo pip install numpy toml
Download PX4 and build
ROS and gazebo are preinstalled
mkdir px4
cd px4
git clone https://github.com/PX4/Firmware.git
cd Framework
wget https://raw.githubusercontent.com/PX4/Devguide/master/build_scripts/ubuntu_sim_common_deps.sh
source ubuntu_sim_common_deps.sh
#First Build (Using the jMAVSim Simulator)
make posix jmavsim
DroneKit
dronekit
sudo pip install dronekit
Demo
- Dronekit read data from PX4 SITL
- Run PX4 SITL (simulation)
dronekit sample code
from dronekit import connect, VehicleMode
connection_string = "127.0.0.1:14540"
print("Connecting to vehicle on: %s" % (connection_string,))
vehicle = connect(connection_string, wait_ready=True)
print " System status: %s" % vehicle.system_status.state
Run gazebo simulation (without gzclient)
HEADLESS=1 make posix_sitl_default gazebo
No comments:
Post a Comment