Skip to content

Instantly share code, notes, and snippets.

@Veilkrand
Created January 9, 2019 02:56
Show Gist options
  • Save Veilkrand/29d3a79acbf44489a9a8d6c711b38b80 to your computer and use it in GitHub Desktop.
Save Veilkrand/29d3a79acbf44489a9a8d6c711b38b80 to your computer and use it in GitHub Desktop.
Upstream PX4+Mavros install

New PX4 work space

  1. Install Mavros in ~/px4_ws/src http://dev.px4.io/en/ros/mavros_installation.html
  2. Clone Firmware in ~/px4_ws/src. git clone --recursive https://github.com/PX4/Firmware
  3. Create virtual link for sitl_gazebo package in ~/px4_ws/src: ln -s Firmware/Tools/sitl_gazebo mavlink_sitl_gazebo
  4. Catkin build
  5. Fix Gazebo paths:
export GAZEBO_MODEL_PATH=$HOME/px4_ws/src/mavlink_sitl_gazebo/models
export GAZEBO_RESOURCE_PATH=$HOME/px4_ws/src/mavlink_sitl_gazebo/worlds
export GAZEBO_PLUGIN_PATH=$HOME/px4_ws/build/mavlink_sitl_gazebo
export GAZEBO_MODEL_DATABASE_URI=''
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/px4_ws/build/mavlink_sitl_gazebo
  1. Test Mavros SITL PX4: roslaunch px4 mavros_posix_sitl.launch
  2. Test Px4: roslaunch px4 px4.launch
  3. Test Gazebo: roslaunch gazebo_ros empty_world.launch world_name:=iris.world verbose:=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment