-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeError: Unknown error while trying to spawn actor #4363
Comments
I noticed the error happens when the asset doesn't appear as "static mesh" inside Unreal, (e.g, "Skeletal Mesh"). But there is nowhere explaining how to export from Blender to Carla an .fbx file that is a "static mesh". |
Hi, I was facing the exact same issue when trying to spawn new props and I found a valid workaround (for If you look at With this, I was able to add a {
"name": "new_prop",
"path": "/Game/Carla/Static/Static/SM_new_prop.SM_new_prop",
"size": "Medium" # or whatever size estimation you'd like
} Of course ensure you correctly have valid static mesh path file (note that the file does have a Then after a quick relaunch of the editor you should be able to now spawn your bp = list(blueprint_library.filter("static.prop.new_prop"))[0]
transform = world.get_map().get_spawn_points()[0] # or choose any other spawn point
world.spawn_actor(bp, transform) # should succeed with no errors Note that I've only tested this in Town03, and interestingly some of the additional (opt) maps (in 0.9.11) have their own |
I also experienced the same issue and solved it after several tests.Thanks for @GustavoSilvera mentioning the existence of the file For example, my static mesh name in Blender is All in all, it is important to check the real name of the imported static mesh inside the content folder of UE4, and see if it is the same as in (Besides, I cannot just import new props by filling the |
I also faced the same issue in Carla version: 0.9.12 modified the generated |
@ChengHuang-CH |
@crabiner Thanks for your helpful comments. Your solution works for me by revising the |
Hi folks, The problem with the nomenclature adding the FBX name before the asset is because now you can import maps in tiles, and then we need to avoid conflicts between assets with the same name from different tiles, that is why we add the FBX name as a prefix. Regards |
I am able to spawn the props using python API when pressing play in UE4 editor, but when running from a carla package created by "make package" I still get "RuntimeError: Unknown error while trying to spawn actor" |
Hello all, I found that I also am having this problem when trying to spawn custom props in shipping (package) mode. The issue for me was that the props were not being cooked by UE4's UAT script, so the props were unable to be spawned in the package mode. You should be able to check if this is the case for you by seeing if If this is the case for you, I figured out how to solve this as follows:
# example
{
"name": "my_prop",
"path": "/Game/MyProps/SM_CustomProp.SM_CustomProp",
"size": "Big"
}
+DirectoriesToAlwaysCook=(Path="/Game/MyProps/") (Note, this can also be done from within the Editor in ProjectSettings look for "cook" and "additional asset directories" Then running You should be able to verify this works by ensuring that within the build directory there exists a If the above steps didn't work for you, you might be successful by modifying After trying both methods, the first (modifying Hope this helps! |
I also encountered the issue that The fix for me is to add after this line
I believe the cause is the missing PropsMap when cooking for Linux version. Hope it helps! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@GustavoSilvera hello, I'm so excited that you give me some hope. But I still meet some problem about using my own prop. PreparesI use the docker version of carla 0.9.13 and I have design a new prop then import to the docker following this guide. . ProblemBut when I want to spawn it to the world, I can not find it in the blueprint. And I also don't know how to use it like other props ( QuestionCould you teach me that how to use the props I just import to the carla docker? thanks for your time |
In Carla_0.9.14, it's still a problem. and i solved it by @GustavoSilvera's solution. However, my path is the absolute path instead of the path "/Game/..." |
Hello, I followed your instruction and i was able to obtain a correct package from ue4 to carla, with .uexp and .uasset files. The problem now is that I still get the error
|
This is still an issue. |
Which is actually the issue? |
@Croquembouche check this #6789 |
Hi, I also have this problem. also updated the Default.Package.json with this: and still I can see the prop on the blueprint library list, but when spawn it getting the error I mentioned above. |
How are you trying to spawn it? example code please. |
Print in console of static.prop and see what happens |
Yes, your bigtrashcan is there as expected, so your method to get it is wrong. SpawnActor(prop, spawn_point) |
But I manage to spawn vehicles without problems: when I do the same to the trash can it failed. |
I think is related with you try to get the proper blueprint |
I'm not sure I get it. I'm trying to spawn it as you said, unfortunately it is not working |
prop = world.get_blueprint_library().filter("static.prop.bigtrashcan") Is this working? |
Python argument types in |
|
Those 2 lines are not the problem, I got them in my code: This is my current script: import carla def spawn_random_objects_on_roads(client, blueprint_library, num_objects):
def main():
|
I guess you meant: and that not working either. Its not crashing but the object is not spawned. |
Hi, I managed to import some props, but some refused to load. These props are from the Unreal Engine and CARLA blueprint. I am trying to package the props in the source version and import them into the prebuilt version. I will try again later and update this issue with screenshots. |
Carla version: 0.9.11
I tried following the tutorial to add Props to carla here. More specifically, I followed the "Ingestion in a build from source", i.e., I have a locally compiled Carla, which I run through Unreal Engine.
Added the files to the
Import/
folder exactly like the tutorial described:carla/
--Import/
----Package01/
----|--Package01.json
----|--Props/
----|--|--Ball/
----|--|--|--Ball.fbx
Package01.json:
Used this object.
I ran
make import
,make PythonAPI
andmake launch
in this order, and then started simulation inside Unreal Editor.I tried spawning it (
world.spawn_actor()...
), even though it finds it on the Blueprint list (withblueprint_library.filter('static.prop.football')[0]
), I get an error:RuntimeError: Unknown error while trying to spawn actor
Also tried exporting it as a package and importing to a pre-compiled carla installation. Got the same error when trying to spawn.
edit: Tried with this object instead now. Didn't get any error, but I can't see anything spawned on the map.
The text was updated successfully, but these errors were encountered: