forked from microsoft/AirSim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add beginning of a unit test and fix linux compile errors.
- Loading branch information
1 parent
065bbe9
commit b489084
Showing
18 changed files
with
152 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
// AirLibUnitTests.cpp : Defines the entry point for the console application. | ||
// | ||
|
||
#include "stdafx.h" | ||
#include <cassert> | ||
#include "TestVehicles.hpp" | ||
|
||
int main() | ||
{ | ||
assert(1 + 1 > 1); | ||
Settings& settings = Settings::loadJSonFile("settings.json"); | ||
|
||
TestVehicles test1; | ||
test1.Run(); | ||
|
||
return 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
#ifndef msr_AirLibUnitTests_TestVehicles_hpp | ||
#define msr_AirLibUnitTests_TestVehicles_hpp | ||
|
||
#include <chrono> | ||
#include <cassert> | ||
#include "vehicles/configs/PX4ConfigCreator.hpp" | ||
#include "vehicles/configs/RosFlightQuadX.hpp" | ||
|
||
using namespace msr::airlib; | ||
|
||
class TestVehicles | ||
{ | ||
public: | ||
void Run() { | ||
|
||
// try the RosFlightQuadX. | ||
RosFlightQuadX rosFlight; | ||
rosFlight.initialize(); | ||
|
||
// Test PX4 based drones | ||
std::unique_ptr<MultiRotorParams> params = PX4ConfigCreator::createConfig("Pixhawk"); | ||
params->initialize(); | ||
|
||
DroneControllerBase* controller = params->getController(); | ||
assert(controller != nullptr); | ||
|
||
controller->start(); | ||
std::this_thread::sleep_for(std::chrono::milliseconds(10)); | ||
controller->stop(); | ||
|
||
|
||
return; | ||
} | ||
}; | ||
|
||
#endif |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.