-
Notifications
You must be signed in to change notification settings - Fork 197
Test the Framework
This repository is under continuous integration with one integration test that ensures that the controller and the autopilot are working correctly. Our integration test makes use of the RotorS Gazebo plugins to fully run our framework in simulation. If this check does not pass, code changes cannot be merged into the master branch, so on the master branch there should always be a correctly running framework. You can also run the integration test locally to make sure everything is working fine. This is also the first step to test your installation and the code of the integration test serves as a starting point to develop your own applications for our framework. So let's build and run the integration test locally.
Build and run the integration with:
catkin run_tests --no-deps rpg_quadrotor_integration_test
This will first build the integration test and run it directly.
Alternatively, if you are using Eclipse you can build the integration test after the following steps:
Right click on the rpg_quadrotor_integration_test
project and select properties
. Select C/C++ Build
and click on Manage Configurations...
. Click New...
and give it the name test
then click OK
. From the drop down menu in Configuration:
select the test
configuration you just created and then add tests
at the end of the Build command:
, then click OK
.
Select the drop down menu of the hammer symbol in the Eclipse toolbar and select test.
If you have built the integration test already and just want to run it you can do so with:
rostest rpg_quadrotor_integration_test rpg_quadrotor_integration_test.launch
If the integration test is working correctly you should see a Gazebo simulation environment like this:
where the quadrotor is taking of, performs a couple of different maneuvers, and lands again.
To start a basic simulation of a quadrotor that is control by our framework launch the following:
roslaunch rpg_rotors_interface quadrotor_empty_world.launch
and you should see an environment that looks like this:
To fly the quadrotor first press the Connect
button to connect the gui, then the Arm Bridge
button to enable sending commands to the vehicle and then Start
.
Once the quadrotor hovers you can test the other features of the gui while also getting feedback from the quadrotor directly in the gui.
For more information on how things work and what happens behind the scenes check out the Overview and Concepts section.
In this basic simulation you can also fly the quadrotor around by connecting a gamepad to you computer. For more details on how to use the gamepad during simulation and real quadrotor flight check out the Basic Usage section.