Skip to content

Python simSpawnObject API support for compiled i.e., _C blueprints #124

@MACILLAS

Description

@MACILLAS

Thank you very much for continuing the AirSim Project!

My Setup: UE 5.5.0, Cosys-AirSim 3.3 (pre-compiled) Ubuntu 22.04

Problem Description:

I've created a dynamic Actor (car) that moves in random directions, while sticking to the terrain using Blueprints in the Unreal Editor. When I launch the game from the Unreal Editor I can use the Python simSpawnObject just fine, however when I package and ship the project (i.e., running ./MyProject.sh) and try to use simSpawnObject API, it crashes...

asset_name = "GroundMover"                        
obj_name = client.simSpawnObject(desired_name, asset_name, obj_pose, scale, False, True)

WorldSimApi::createNewBPActor(FActorSpawnParameters const&, UE::Math::TTransform<double> const&, Eigen::Matrix<float, 3, 1, 0, 3, 1> const&, UBlueprint*) [/home/maxm/Linux_Unreal_Engine_5.5.0/Engine/Source/Runtime/CoreUObject/Public/UObject/ObjectPtr.h:187] 0x000000000c84d667 Desert1!UE::Core::Private::Function::TFunctionRefCaller<WorldSimApi::spawnObject(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, msr::airlib::VectorMathT<Eigen::Matrix<float, 3, 1, 0, 3, 1>, Eigen::Quaternion<float, 2>, float>::Pose const&, Eigen::Matrix<float, 3, 1, 0, 3, 1> const&, bool, bool)::$_0, void>::Call(void*) [/home/maxm/Documents/Unreal Projects/Desert1/Plugins/AirSim/Source/WorldSimApi.cpp:126] 0x0000000005070e35 Desert1!TGraphTask<TFunctionGraphTaskImpl<void (), (ESubsequentsMode::Type)0> >::ExecuteTask()() 0x000000000506d1eb Desert1!UE::Tasks::Private::FTaskBase::TryExecuteTask()() 0x000000000506c2fd Desert1!FNamedTaskThread::ProcessTasksNamedThread(int, bool)() 0x000000000506b60c Desert1!FNamedTaskThread::ProcessTasksUntilIdle(int)() 0x000000000c080a23 Desert1!FTickTaskSequencer::ReleaseTickGroup(ETickingGroup, bool)() 0x000000000c07bb75 Desert1!FTickTaskManager::RunTickGroup(ETickingGroup, bool)() 0x000000000b6ab665 Desert1!UWorld::Tick(ELevelTick, float)() 0x000000000b4007ad Desert1!UGameEngine::Tick(float, bool)() 0x000000000c62ad37 Desert1!FEngineLoop::Tick()() 0x000000000c62edda Desert1!GuardedMain(char16_t const*)() 0x000000000c594715 Desert1!CommonUnixMain(int, char**, int (*)(char16_t const*), void (*)())() 0x00007d5be4829d90 libc.so.6!UnknownFunction(0x29d8f) 0x00007d5be4829e40 libc.so.6!__libc_start_main(+0x7f) 0x000000000502a02a Desert1!_start(+0x29) [2026.01.15-21.27.58:829][753]LogExit: Executing StaticShutdownAfterError Malloc Size=131160 LargeMemoryPoolOffset=393352 Malloc Size=131160 LargeMemoryPoolOffset=524536 Malloc Size=179316 LargeMemoryPoolOffset=703876 [2026.01.15-21.27.58:840][753]LogHAL: Error: FUnixPlatformProcess::CreateProc: File does not exist (/home/maxm/Downloads/Linux/Engine/Binaries/Linux/CrashReportClient) Engine crash handling finished; re-raising signal 11 for the default handler. Good bye. Segmentation fault (core dumped)

ChatGPT is saying is likely due to trying to load the UBlueprint and not the UClass... In contrast simAddVehicle seem to use the UClass.

Could you please advise?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions