Skip to content

PX4 Firmware with some SITL tweaks/add-ons: Models for UPenn F450 quadrotor, front and down cameras (use with forked mavros)

License

Notifications You must be signed in to change notification settings

pennaerial/Firmware-old

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NSF Student Competition SITL Gazebo test environment

To install on a fresh Ubuntu VM, open a terminal and go through the following steps.

(you will be asked for your password in the beginning)

Without camera plugins

Once installation is over,

  • cd ~/src/Firmware
  • make posix_sitl_default gazebo

It will take a bit the first time you run this. Also, if the build fails, try again. You should see a Gazebo client window with the F450 at the center.

In another terminal, run the mavros node

  • roslaunch mavros px4.launch fcu_url:="udp://:14540@127.0.0.1:14557"

and, in yet another terminal

  • cd ~/catkin_ws/src/mavros/test_mavros/scripts
  • python mavros_wpmission_test.py

You will now see the UAV takeoff, fly a mission, and land again.

On a terminal, you can look at the list of mavros topics,

  • rostopic list

And maybe check out the state of the FMU,

  • rostopic echo /mavros/state

With camera plugins

GAZEBO ROS
To acquire gazebo camera pugin data, we need to start the SITL stack with no_sim=1. In terminal 1,

  • make no_sim=1 posix_sitl_default gazebo

In a bit, you should see the ASCII PX4 art, and a message "Waiting for initial data on UDP. Please start the flight simulator to proceed.."

At this time open another terminal, and use

  • roslaunch mavros gazebo-mavros.launch gui:=true

You should now see both the Gazebo client, and an RQT window showing the image-view panels, and a line plot for UAV height. You will have to click the reload (circular arrow) buttons for the camera image streams to activate on RQT, and choose the front and down cameras respectively from the dropdowns. The height plot should start updating on its own.

The next step is the same as non gazebo_ros mode. That is, in another terminal

  • cd ~/catkin_ws/src/mavros/test_mavros/scripts
  • python mavros_wpmission_test.py

You should now see the UAV take off, and the camera images update accordingly.

*** It's advised that you close gazebo client at this time so that the controller simulation has maximum fidelity.
*** Do not use gui:=true when starting the gazebo-mavros.launch file for actual simulation use.

------ UPSTREAM INFO-----

PX4 Flight Core and PX4 Middleware

Build Status Coverity Scan

Gitter

This repository contains the PX4 Flight Core, with the main applications located in the src/modules directory. It also contains the PX4 Drone Platform, which contains drivers and middleware to run drones.

Users

Please refer to the user documentation and user forum for flying drones with the PX4 flight stack.

Developers

This repository contains code supporting these boards:

About

PX4 Firmware with some SITL tweaks/add-ons: Models for UPenn F450 quadrotor, front and down cameras (use with forked mavros)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 55.1%
  • C 31.3%
  • Python 6.4%
  • CMake 5.0%
  • Makefile 1.2%
  • MATLAB 0.5%
  • Other 0.5%