зеркало из https://github.com/microsoft/AirSim.git
VehicleCameraBase -> ImageCaptureBase, https://github.com/Microsoft/AirSim/issues/662
This commit is contained in:
Родитель
87184da778
Коммит
ec2501ed81
|
@ -1160,7 +1160,7 @@ public:
|
|||
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");
|
||||
|
@ -1178,19 +1178,19 @@ public:
|
|||
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:
|
||||
|
@ -1220,18 +1220,18 @@ public:
|
|||
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;
|
||||
|
|
|
@ -108,9 +108,9 @@ private:
|
|||
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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче