Skip to content

Commit

Permalink
Unity: Add unimplemented simAddVehicle API method
Browse files Browse the repository at this point in the history
  • Loading branch information
rajat2004 committed Feb 8, 2021
1 parent 7dbba6c commit c971ae2
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 @@ -195,4 +195,12 @@ void WorldSimApi::setWind(const Vector3r& wind) const
simmode_->setWind(wind);
};

bool createVehicleAtRuntime(const std::string& vehicle_name, const std::string& vehicle_type, const Pose& pose, const std::string& pawn_path)
{
throw std::invalid_argument(common_utils::Utils::stringf(
"createVehicleAtRuntime (simAddVehicle API) is not supported on unity").c_str());
return false;
}


#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 @@ -64,6 +64,7 @@ class WorldSimApi : public msr::airlib::WorldSimApiBase

virtual void setWind(const Vector3r& wind) const override;
virtual bool createVoxelGrid(const Vector3r& position, const int& x_size, const int& y_size, const int& z_size, const float& res, const std::string& output_file) override;
virtual bool createVehicleAtRuntime(const std::string& vehicle_name, const std::string& vehicle_type, const Pose& pose, const std::string& pawn_path = "") override;

private:
SimModeBase * simmode_;
Expand Down

0 comments on commit c971ae2

Please sign in to comment.