File that runs onboard the drone, connects to and communicates with the ISAACS server
-
Please install ROS by following this link. We recommend installing the option with Gazebo at this stage (desktop full).
-
Install Dependencies: geographiclib, mavlink, roslibpy
sudo apt-get install geographiclib-* ros-melodic-geographic-* sudo apt-get install ros-melodic-mavlink sudo apt-get install libgeographic-dev ros-melodic-geographic-msgs pip install roslibpy
-
Clone this repository by running:
git clone https://github.com/immersive-command-system/drone-mavros.git --recursive
. -
Once in the directory of the repository (drone-mavros), run
catkin build
Any repositories downloaded can be placed independently of the rest.
-
Install the desired firmware SITL (Software-In-The-Loop). The two available options are PX4 or ArduPilot.
-
For ArduPilot, run the following:
git clone https://github.com/ArduPilot/ardupilot.git
Change directory into ardupilot viacd ardupilot
. Rungit submodule update --init --recursive
. From inside the ardupilot directory, runTools/environment_install/install-prereqs-ubuntu.sh -y
. Finally, run. ~/.profile
. For more information, visit https://ardupilot.org/dev/docs/building-setup-linux.html#building-setup-linux. -
For PX4, run the following:
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
. Change directory into PX4-Ardupilot viacd PX4-Ardupilot
. Runbash ./Tools/setup/ubuntu.sh
. For more information, visit https://docs.px4.io/master/en/dev_setup/dev_env_linux_ubuntu.html.
-
-
If you have not yet installed Gazebo, please install Gazebo by following this link
-
Download https://github.com/SwiftGust/ardupilot_gazebo and follow installation instructions on that README.
These steps must be completed before running ROS if the simulator is to be used.
-
Launch Gazebo with ArduPilot Plugin.
- Run gazebo and the corresponding .world file. Ex:
gazebo --verbose typhoon_ardupilot.world
. The .world file is found in the worlds folder of the ardupilot_gazebo repo that was downloaded previously.
- Run gazebo and the corresponding .world file. Ex:
-
Launch the desired firmware SITL.
- For ArduPilot, change directory into
ardupilot/Tools/autotest
. To start the firmware SITL, runpython sim_vehicle.py -v ArduCopter -f gazebo-iris
. This should provide information about the possible arguments when starting the SITL. See https://ardupilot.org/dev/docs/using-sitl-for-ardupilot-testing.html for more information. Keep in mind, the default parameters make the drone in a quadcopter configuration in SITL (but may be hexacopter in Gazebo). In order to change the parameter to a hexacopter configuration,param set FRAME_CLASS 2
. To see a map of the flight area use:python sim_vehicle.py -v ArduCopter -f gazebo-iris -m --mav10 --map --console -I0
- For ArduPilot, change directory into
- After building the ROS project,
source devel/setup.bash
in thedrone-mavros
directory. - Run
roslaunch server_connector start_connection.launch server_ip:={ip}
to launch the drone where {ip} should be replaced by the ip of the ISAACS Server.
Please visit the Wiki to see how to integrate code and publish topics and services from the local ROS network.
Resource not found: mavros
- Probably a faulty git submodule.
cd drone-mavros
git submodule update --init --recursive
catkin build
source devel/setup.bash
catkin: command not found
- Try
sudo apt-get install ros-$ROS_DISTRO-catkin python-catkin-tools
When libmavconn
package, CMake Error
finding package configuration file provided by mavlink
.
sudo apt-get install ros-kinetic-mavros ros-kinetic-mavros-extras
Pymavlink not found
- Pymavlink may not be installed. To fix this issue, run
pip install pymavlink