This commit is contained in:
Shital Shah 2017-12-06 15:56:57 -08:00
Родитель 87184da778
Коммит ec2501ed81
4 изменённых файлов: 21 добавлений и 21 удалений

Просмотреть файл

@ -1160,7 +1160,7 @@ public:
this->addSwitch({ "-pause_time", "100", "pause time between each image in milliseconds (default 100)" }); 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. // group the images by the current date.
std::string folderName = Utils::to_string(Utils::now(), "%Y-%m-%d"); std::string folderName = Utils::to_string(Utils::now(), "%Y-%m-%d");
@ -1178,19 +1178,19 @@ public:
const char* typeName = ""; const char* typeName = "";
switch (imageType) switch (imageType)
{ {
case msr::airlib::VehicleCameraBase::ImageType::Scene: case msr::airlib::ImageCaptureBase::ImageType::Scene:
typeName = "scene"; typeName = "scene";
break; break;
case msr::airlib::VehicleCameraBase::ImageType::DepthVis: case msr::airlib::ImageCaptureBase::ImageType::DepthVis:
typeName = "depth"; typeName = "depth";
break; break;
case msr::airlib::VehicleCameraBase::ImageType::Segmentation: case msr::airlib::ImageCaptureBase::ImageType::Segmentation:
typeName = "seg"; typeName = "seg";
break; break;
case msr::airlib::VehicleCameraBase::ImageType::SurfaceNormals: case msr::airlib::ImageCaptureBase::ImageType::SurfaceNormals:
typeName = "normals"; typeName = "normals";
break; break;
case msr::airlib::VehicleCameraBase::ImageType::DisparityNormalized: case msr::airlib::ImageCaptureBase::ImageType::DisparityNormalized:
typeName = "disparity"; typeName = "disparity";
break; break;
default: default:
@ -1220,18 +1220,18 @@ public:
TTimeDelta pause_time = getSwitch("-pause_time").toTimeDelta(); TTimeDelta pause_time = getSwitch("-pause_time").toTimeDelta();
CommandContext* context = params.context; CommandContext* context = params.context;
VehicleCameraBase::ImageType imageType; ImageCaptureBase::ImageType imageType;
if (type == "depth") { if (type == "depth") {
imageType = VehicleCameraBase::ImageType::DepthVis; imageType = ImageCaptureBase::ImageType::DepthVis;
} else if (type == "scene") { } else if (type == "scene") {
imageType = VehicleCameraBase::ImageType::Scene; imageType = ImageCaptureBase::ImageType::Scene;
} else if (type == "segmentation") { } else if (type == "segmentation") {
imageType = VehicleCameraBase::ImageType::Segmentation; imageType = ImageCaptureBase::ImageType::Segmentation;
} else if (type == "normals") { } else if (type == "normals") {
imageType = VehicleCameraBase::ImageType::SurfaceNormals; imageType = ImageCaptureBase::ImageType::SurfaceNormals;
} else if (type == "disparity") { } else if (type == "disparity") {
imageType = VehicleCameraBase::ImageType::DisparityNormalized; imageType = ImageCaptureBase::ImageType::DisparityNormalized;
} else { } else {
cout << "Error: Invalid image type '" << type << "', expecting either 'depth', 'scene' or 'segmentation'" << endl; cout << "Error: Invalid image type '" << type << "', expecting either 'depth', 'scene' or 'segmentation'" << endl;
return true; return true;

Просмотреть файл

@ -108,9 +108,9 @@ private:
typedef msr::airlib::Vector3r Vector3r; typedef msr::airlib::Vector3r Vector3r;
typedef msr::airlib::Quaternionr Quaternionr; typedef msr::airlib::Quaternionr Quaternionr;
typedef msr::airlib::Pose Pose; typedef msr::airlib::Pose Pose;
typedef msr::airlib::VehicleCameraBase::ImageRequest ImageRequest; typedef msr::airlib::ImageCaptureBase::ImageRequest ImageRequest;
typedef msr::airlib::VehicleCameraBase::ImageResponse ImageResponse; typedef msr::airlib::ImageCaptureBase::ImageResponse ImageResponse;
typedef msr::airlib::VehicleCameraBase::ImageType ImageType; typedef msr::airlib::ImageCaptureBase::ImageType ImageType;
std::string storage_dir_; std::string storage_dir_;
bool spawn_ue4 = false; bool spawn_ue4 = false;

Просмотреть файл

@ -25,9 +25,9 @@ int main()
// This assumes you are running DroneServer already on the same machine. // This assumes you are running DroneServer already on the same machine.
// DroneServer must be running first. // DroneServer must be running first.
msr::airlib::CarRpcLibClient client; msr::airlib::CarRpcLibClient client;
typedef VehicleCameraBase::ImageRequest ImageRequest; typedef ImageCaptureBase::ImageRequest ImageRequest;
typedef VehicleCameraBase::ImageResponse ImageResponse; typedef ImageCaptureBase::ImageResponse ImageResponse;
typedef VehicleCameraBase::ImageType ImageType; typedef ImageCaptureBase::ImageType ImageType;
typedef common_utils::FileSystem FileSystem; typedef common_utils::FileSystem FileSystem;
try { try {

Просмотреть файл

@ -21,9 +21,9 @@ int main()
using namespace msr::airlib; using namespace msr::airlib;
msr::airlib::MultirotorRpcLibClient client; msr::airlib::MultirotorRpcLibClient client;
typedef VehicleCameraBase::ImageRequest ImageRequest; typedef ImageCaptureBase::ImageRequest ImageRequest;
typedef VehicleCameraBase::ImageResponse ImageResponse; typedef ImageCaptureBase::ImageResponse ImageResponse;
typedef VehicleCameraBase::ImageType ImageType; typedef ImageCaptureBase::ImageType ImageType;
typedef common_utils::FileSystem FileSystem; typedef common_utils::FileSystem FileSystem;
try { try {