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 Aug 28, 2021
1 parent 0ca86bf commit ee63274
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Unity/AirLibWrapper/AirsimWrapper/Source/WorldSimApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,4 +373,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
3 changes: 2 additions & 1 deletion Unity/AirLibWrapper/AirsimWrapper/Source/WorldSimApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ class WorldSimApi : public msr::airlib::WorldSimApiBase

// ------ Level setting apis ----- //
virtual bool loadLevel(const std::string& level_name) override { return false; };
virtual std::string spawnObject(std::string& object_name, const std::string& load_component, const Pose& pose, const Vector3r& scale, bool physics_enabled) override { return ""; };
virtual std::string spawnObject(const std::string& object_name, const std::string& load_component, const Pose& pose, const Vector3r& scale, bool physics_enabled) 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 ee63274

Please sign in to comment.