Skip to content

Commit

Permalink
Update Unity simListassets, simSpawnObject APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
rajat2004 committed Nov 28, 2021
1 parent 3881dbd commit a470785
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Unity/AirLibWrapper/AirsimWrapper/Source/WorldSimApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,4 +397,12 @@ std::vector<msr::airlib::DetectionInfo> WorldSimApi::getDetections(ImageCaptureB
return std::vector<msr::airlib::DetectionInfo>();
}

std::vector<std::string> WorldSimApi::listAssets() const
{
throw std::invalid_argument(common_utils::Utils::stringf(
"listAssets API is not supported on Unity")
.c_str());
return {};
}

#pragma endregion
1 change: 1 addition & 0 deletions Unity/AirLibWrapper/AirsimWrapper/Source/WorldSimApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class WorldSimApi : public msr::airlib::WorldSimApiBase
virtual bool loadLevel(const std::string& level_name) override { return false; };
virtual std::string spawnObject(const std::string& object_name, const std::string& load_component, const Pose& pose, const Vector3r& scale, bool physics_enabled, bool is_blueprint) override { return ""; };
virtual bool destroyObject(const std::string& object_name) override { return false; };
virtual std::vector<std::string> listAssets() const override;

virtual bool isPaused() const override;
virtual void reset() override;
Expand Down

0 comments on commit a470785

Please sign in to comment.