Skip to content

Commit a1abca2

Browse files
committed
Update Unity simListassets, simSpawnObject APIs
1 parent e706003 commit a1abca2

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Unity/AirLibWrapper/AirsimWrapper/Source/WorldSimApi.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,4 +373,12 @@ std::vector<msr::airlib::DetectionInfo> WorldSimApi::getDetections(ImageCaptureB
373373
return std::vector<msr::airlib::DetectionInfo>();
374374
}
375375

376+
std::vector<std::string> WorldSimApi::listAssets() const
377+
{
378+
throw std::invalid_argument(common_utils::Utils::stringf(
379+
"listAssets API is not supported on Unity")
380+
.c_str());
381+
return {};
382+
}
383+
376384
#pragma endregion

Unity/AirLibWrapper/AirsimWrapper/Source/WorldSimApi.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ class WorldSimApi : public msr::airlib::WorldSimApiBase
1818

1919
// ------ Level setting apis ----- //
2020
virtual bool loadLevel(const std::string& level_name) override { return false; };
21-
virtual std::string spawnObject(std::string& object_name, const std::string& load_component, const Pose& pose, const Vector3r& scale, bool physics_enabled) override { return ""; };
21+
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 ""; };
2222
virtual bool destroyObject(const std::string& object_name) override { return false; };
23+
virtual std::vector<std::string> listAssets() const override;
2324

2425
virtual bool isPaused() const override;
2526
virtual void reset() override;

0 commit comments

Comments
 (0)