Skip to content

Commit

Permalink
Merge branch 'master' into bug_fixes/rpclib
Browse files Browse the repository at this point in the history
  • Loading branch information
madratman authored Jul 24, 2020
2 parents f19f8ad + fce7ac5 commit b842ddc
Show file tree
Hide file tree
Showing 308 changed files with 25,268 additions and 9,907 deletions.
20 changes: 17 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -358,15 +358,29 @@ xcuserdata/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno

/Unity/UnityDemo/Library
# Unity
/Unity/UnityDemo/Assembly-CSharp.csproj
/Unity/UnityDemo/UnityDemo.sln
/Unity/UnityDemo/Logs/
/Unity/UnityDemo/Assets/Plugins/AirsimWrapper.dll
/Unity/linux-build
/Unity/UnityDemo/Assets/Plugins/
/Unity/UnityDemo/[Ll]ibrary/
/Unity/UnityDemo/[Tt]emp/
/Unity/UnityDemo/[Oo]bj/
/Unity/UnityDemo/[Bb]uild/
/Unity/UnityDemo/[Bb]uilds/
/Unity/UnityDemo/[Ll]ogs/
/Unity/UnityDemo/[Uu]ser[Ss]ettings/

# ROS
ros/.catkin_tools/
ros/devel/
ros/logs/
ros/.catkin_workspace
ros/src/CMakeLists.txt

# docs
docs/README.md
build_docs/

# api docs
PythonClient/docs/_build
Empty file removed .gitmodules
Empty file.
97 changes: 41 additions & 56 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,73 +1,58 @@
language: cpp
#git:
# shorten this if we can nail down submodule depth
# depth: 3

fast_finish: false
jobs:
include:
- name: Ubuntu 18.04
os: linux
dist: bionic

matrix:
allow_failures:
- env: ALLOW_FAILURES=true
- name: Ubuntu 16.04
os: linux
dist: xenial

include:
# linux version have unique dependencies, so we set them up individually
- os: linux
dist: trusty
sudo: required
services:
- docker
#- os: windows
# dotnet: 2.1.5
# services:
# - docker

- name: Windows 10
os: windows
env:
- MSBUILD_PATH="c:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\16.0\Bin"
- PATH_FIX="C:\Windows\System32"

# OS X CMake
#- os: osx
# sudo: required
# osx_image: xcode8.2
# compiler:
# - clang
# env:
# - TOOL="cmake"
# - DESCRIPTION="OS X build/test via CMake"
- name: MacOS
os: osx
osx_image: xcode11.4

# docker exec xenial apt-get -y install clang libclang-3.8-dev;
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
docker pull ubuntu:xenial;
docker run -d --name xenial -dti ubuntu:xenial bash;
docker ps -a;
docker exec xenial mkdir /build;
docker cp . xenial:/build;
docker exec xenial apt-get update;
docker exec xenial apt-get -y upgrade;
docker exec xenial apt-get -y install git wget unzip sudo;
docker exec xenial apt-get -y install build-essential software-properties-common cmake;
docker exec xenial apt-get update;
elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
echo "No install osx actions--using repo";
elif [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TOOL" == "cmake" ]]; then
echo "No install Windows actions--using repo";
fi

before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
echo "No pre-install linux actions--using docker";
elif [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TOOL" == "cmake" ]]; then
echo "No pre-install osx actions";
sudo apt-get update;
sudo apt-get -y install git wget unzip;
sudo apt-get -y install build-essential software-properties-common cmake rsync libboost-all-dev;
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
echo "No before_install actions for OSX";
elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
choco install visualstudio2019buildtools --package-parameters "--includeRecommended --includeOptional";
choco install visualstudio2019-workload-vctools;
fi

#docker exec xenial /bin/sh -c "export EIGEN3_INCLUDE_DIR=/build/eigen/eigen3 && cd /build/cmake && sh ./build.sh && cmake . && make";
script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
docker exec -t xenial /build/setup.sh;
docker exec -t xenial /build/build.sh;
./setup.sh;
./build.sh || travis_terminate 1;
echo "Starting Unity Build!";
(cd Unity && ./build.sh || travis_terminate 1);
elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
.\\build.cmd;
.\\Unity\\build.cmd;
export PATH=$MSBUILD_PATH:$PATH_FIX:$PATH;
cmd.exe //C 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat' amd64 '&&'
build.cmd '&&'
cd Unity '&&' build.cmd;
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
git submodule update --init --recursive;
./setup.sh;
./build.sh;
./build.sh || travis_terminate 1;
echo "Starting Unity Build!";
(cd Unity && ./build.sh || travis_terminate 1);
fi

# Test ROS wrapper compilation
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
./tools/install_ros_deps.sh;
(cd ros && source ~/.bashrc && catkin build -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8);
fi
19 changes: 12 additions & 7 deletions AirLib/AirLib.vcxproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AirSim.props))\AirSim.props" />
<PropertyGroup>
<ShowAllFiles>true</ShowAllFiles>
Expand Down Expand Up @@ -45,6 +45,7 @@
<ClInclude Include="include\common\common_utils\ExceptionUtils.hpp" />
<ClInclude Include="include\common\common_utils\FileSystem.hpp" />
<ClInclude Include="include\common\common_utils\json.hpp" />
<ClInclude Include="include\common\common_utils\SmoothingFilter.hpp" />
<ClInclude Include="include\common\common_utils\UniqueValueMap.hpp" />
<ClInclude Include="include\common\common_utils\MedianFilter.hpp" />
<ClInclude Include="include\common\common_utils\MinWinDefines.hpp" />
Expand Down Expand Up @@ -164,10 +165,10 @@
<ClInclude Include="include\sensors\SensorCollection.hpp" />
<ClInclude Include="include\vehicles\multirotor\firmwares\mavlink\Px4MultiRotorParams.hpp" />
<ClInclude Include="include\vehicles\multirotor\firmwares\simple_flight\SimpleFlightQuadXParams.hpp" />
<ClInclude Include="include\vehicles\multirotor\MultiRotor.hpp" />
<ClInclude Include="include\vehicles\multirotor\MultiRotorPhysicsBody.hpp" />
<ClInclude Include="include\vehicles\multirotor\MultiRotorParams.hpp" />
<ClInclude Include="include\vehicles\multirotor\MultiRotorParamsFactory.hpp" />
<ClInclude Include="include\vehicles\multirotor\Rotor.hpp" />
<ClInclude Include="include\vehicles\multirotor\RotorActuator.hpp" />
<ClInclude Include="include\vehicles\multirotor\RotorParams.hpp" />
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -196,26 +197,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -267,6 +268,7 @@
<AdditionalIncludeDirectories>include;deps\eigen3;deps\rpclib\include;$(ProjectDir)..\MavLinkCom\include</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<AdditionalOptions>/w34263 /w34266 %(AdditionalOptions)</AdditionalOptions>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -292,6 +294,7 @@
<TreatWarningAsError>true</TreatWarningAsError>
<AdditionalOptions>/w34263 /w34266 %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4100;4505;4820;4464;4514;4710;4571;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand All @@ -318,6 +321,7 @@
<AdditionalIncludeDirectories>include;deps\eigen3;deps\rpclib\include;$(ProjectDir)..\MavLinkCom\include</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<AdditionalOptions>/w34263 /w34266 %(AdditionalOptions)</AdditionalOptions>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -346,6 +350,7 @@
<AdditionalIncludeDirectories>include;deps\eigen3;deps\rpclib\include;$(ProjectDir)..\MavLinkCom\include</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<AdditionalOptions>/w34263 /w34266 %(AdditionalOptions)</AdditionalOptions>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down
7 changes: 5 additions & 2 deletions AirLib/AirLib.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
<ClInclude Include="include\common\common_utils\MinWinDefines.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\vehicles\multirotor\MultiRotor.hpp">
<ClInclude Include="include\vehicles\multirotor\MultiRotorPhysicsBody.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\vehicles\multirotor\MultiRotorParams.hpp">
Expand All @@ -222,7 +222,7 @@
<ClInclude Include="include\vehicles\multirotor\MultiRotorParamsFactory.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\vehicles\multirotor\Rotor.hpp">
<ClInclude Include="include\vehicles\multirotor\RotorActuator.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\vehicles\multirotor\RotorParams.hpp">
Expand Down Expand Up @@ -453,6 +453,9 @@
<ClInclude Include="include\vehicles\multirotor\firmwares\mavlink\ArduCopterSoloParams.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\common\common_utils\SmoothingFilter.hpp">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\safety\ObstacleMap.cpp">
Expand Down
68 changes: 65 additions & 3 deletions AirLib/include/api/RpcLibAdapatorsBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ class RpcLibAdapatorsBase {
DistanceSensorData()
{}

DistanceSensorData(const msr::airlib::DistanceBase::Output& s)
DistanceSensorData(const msr::airlib::DistanceSensorData& s)
{
time_stamp = s.time_stamp;
distance = s.distance;
Expand All @@ -681,9 +681,9 @@ class RpcLibAdapatorsBase {
relative_pose = s.relative_pose;
}

msr::airlib::DistanceBase::Output to() const
msr::airlib::DistanceSensorData to() const
{
msr::airlib::DistanceBase::Output d;
msr::airlib::DistanceSensorData d;

d.time_stamp = time_stamp;
d.distance = distance;
Expand All @@ -694,6 +694,68 @@ class RpcLibAdapatorsBase {
return d;
}
};

struct MeshPositionVertexBuffersResponse {
Vector3r position;
Quaternionr orientation;

std::vector<float> vertices;
std::vector<uint32_t> indices;
std::string name;

MSGPACK_DEFINE_MAP(position, orientation, vertices, indices, name);

MeshPositionVertexBuffersResponse()
{}

MeshPositionVertexBuffersResponse(const msr::airlib::MeshPositionVertexBuffersResponse& s)
{
position = Vector3r(s.position);
orientation = Quaternionr(s.orientation);

vertices = s.vertices;
indices = s.indices;

if (vertices.size() == 0)
vertices.push_back(0);
if (indices.size() == 0)
indices.push_back(0);

name = s.name;
}

msr::airlib::MeshPositionVertexBuffersResponse to() const
{
msr::airlib::MeshPositionVertexBuffersResponse d;
d.position = position.to();
d.orientation = orientation.to();
d.vertices = vertices;
d.indices = indices;
d.name = name;

return d;
}

static std::vector<msr::airlib::MeshPositionVertexBuffersResponse> to(
const std::vector<MeshPositionVertexBuffersResponse>& response_adapter) {
std::vector<msr::airlib::MeshPositionVertexBuffersResponse> response;
for (const auto& item : response_adapter)
response.push_back(item.to());

return response;
}

static std::vector<MeshPositionVertexBuffersResponse> from(
const std::vector<msr::airlib::MeshPositionVertexBuffersResponse>& response) {
std::vector<MeshPositionVertexBuffersResponse> response_adapter;
for (const auto& item : response)
response_adapter.push_back(MeshPositionVertexBuffersResponse(item));

return response_adapter;
}
};


};

}} //namespace
Expand Down
Loading

0 comments on commit b842ddc

Please sign in to comment.