Skip to content

Commit

Permalink
VehicleCameraBase -> ImageCaptureBase, microsoft#662
Browse files Browse the repository at this point in the history
  • Loading branch information
sytelus committed Dec 6, 2017
1 parent 87184da commit ec2501e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
24 changes: 12 additions & 12 deletions DroneShell/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ class GetImageCommand : public DroneCommand {
this->addSwitch({ "-pause_time", "100", "pause time between each image in milliseconds (default 100)" });
}

void getImages(CommandContext* context, VehicleCameraBase::ImageType imageType, std::string baseName, int iterations, TTimeDelta pause_time)
void getImages(CommandContext* context, ImageCaptureBase::ImageType imageType, std::string baseName, int iterations, TTimeDelta pause_time)
{
// group the images by the current date.
std::string folderName = Utils::to_string(Utils::now(), "%Y-%m-%d");
Expand All @@ -1178,19 +1178,19 @@ class GetImageCommand : public DroneCommand {
const char* typeName = "";
switch (imageType)
{
case msr::airlib::VehicleCameraBase::ImageType::Scene:
case msr::airlib::ImageCaptureBase::ImageType::Scene:
typeName = "scene";
break;
case msr::airlib::VehicleCameraBase::ImageType::DepthVis:
case msr::airlib::ImageCaptureBase::ImageType::DepthVis:
typeName = "depth";
break;
case msr::airlib::VehicleCameraBase::ImageType::Segmentation:
case msr::airlib::ImageCaptureBase::ImageType::Segmentation:
typeName = "seg";
break;
case msr::airlib::VehicleCameraBase::ImageType::SurfaceNormals:
case msr::airlib::ImageCaptureBase::ImageType::SurfaceNormals:
typeName = "normals";
break;
case msr::airlib::VehicleCameraBase::ImageType::DisparityNormalized:
case msr::airlib::ImageCaptureBase::ImageType::DisparityNormalized:
typeName = "disparity";
break;
default:
Expand Down Expand Up @@ -1220,18 +1220,18 @@ class GetImageCommand : public DroneCommand {
TTimeDelta pause_time = getSwitch("-pause_time").toTimeDelta();
CommandContext* context = params.context;

VehicleCameraBase::ImageType imageType;
ImageCaptureBase::ImageType imageType;

if (type == "depth") {
imageType = VehicleCameraBase::ImageType::DepthVis;
imageType = ImageCaptureBase::ImageType::DepthVis;
} else if (type == "scene") {
imageType = VehicleCameraBase::ImageType::Scene;
imageType = ImageCaptureBase::ImageType::Scene;
} else if (type == "segmentation") {
imageType = VehicleCameraBase::ImageType::Segmentation;
imageType = ImageCaptureBase::ImageType::Segmentation;
} else if (type == "normals") {
imageType = VehicleCameraBase::ImageType::SurfaceNormals;
imageType = ImageCaptureBase::ImageType::SurfaceNormals;
} else if (type == "disparity") {
imageType = VehicleCameraBase::ImageType::DisparityNormalized;
imageType = ImageCaptureBase::ImageType::DisparityNormalized;
} else {
cout << "Error: Invalid image type '" << type << "', expecting either 'depth', 'scene' or 'segmentation'" << endl;
return true;
Expand Down
6 changes: 3 additions & 3 deletions Examples/StereoImageGenerator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ class StereoImageGenerator {
typedef msr::airlib::Vector3r Vector3r;
typedef msr::airlib::Quaternionr Quaternionr;
typedef msr::airlib::Pose Pose;
typedef msr::airlib::VehicleCameraBase::ImageRequest ImageRequest;
typedef msr::airlib::VehicleCameraBase::ImageResponse ImageResponse;
typedef msr::airlib::VehicleCameraBase::ImageType ImageType;
typedef msr::airlib::ImageCaptureBase::ImageRequest ImageRequest;
typedef msr::airlib::ImageCaptureBase::ImageResponse ImageResponse;
typedef msr::airlib::ImageCaptureBase::ImageType ImageType;

std::string storage_dir_;
bool spawn_ue4 = false;
Expand Down
6 changes: 3 additions & 3 deletions HelloCar/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ int main()
// This assumes you are running DroneServer already on the same machine.
// DroneServer must be running first.
msr::airlib::CarRpcLibClient client;
typedef VehicleCameraBase::ImageRequest ImageRequest;
typedef VehicleCameraBase::ImageResponse ImageResponse;
typedef VehicleCameraBase::ImageType ImageType;
typedef ImageCaptureBase::ImageRequest ImageRequest;
typedef ImageCaptureBase::ImageResponse ImageResponse;
typedef ImageCaptureBase::ImageType ImageType;
typedef common_utils::FileSystem FileSystem;

try {
Expand Down
6 changes: 3 additions & 3 deletions HelloDrone/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ int main()
using namespace msr::airlib;

msr::airlib::MultirotorRpcLibClient client;
typedef VehicleCameraBase::ImageRequest ImageRequest;
typedef VehicleCameraBase::ImageResponse ImageResponse;
typedef VehicleCameraBase::ImageType ImageType;
typedef ImageCaptureBase::ImageRequest ImageRequest;
typedef ImageCaptureBase::ImageResponse ImageResponse;
typedef ImageCaptureBase::ImageType ImageType;
typedef common_utils::FileSystem FileSystem;

try {
Expand Down

0 comments on commit ec2501e

Please sign in to comment.