carla-simulator / carla

Open-source simulator for autonomous driving research.
http://carla.org
MIT License
11.27k stars 3.65k forks source link

Adding a custom car #1779

Closed kasperhaak closed 5 years ago

kasperhaak commented 5 years ago

Hi,

I've tried adding a custom car to the Carla game. However whenever i start the simulation with the custom vehicle, the car spawns, falls to the ground and then bounces off never to return again. I can't really figure out whats going on, that's why i'm turning here for help.

Some info about the car:

Furthermore I followed the How to add assets guide in order to model the blueprints. I can't figure out why the car is flying off after it reaches the ground. Any help is much appreciated.

Thanks in advance

stale[bot] commented 5 years ago

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.

pl-ai commented 5 years ago

I have the same issue

krdindorkar commented 4 years ago

@kasperhaak @prashantluitel I am having same issue. Did you resolved yours? Kindly help me

peclatj commented 1 year ago

Hi, I have the exact same issue after following the guide to add a vehicle. I tried to change the collision box but it change nothing.

The vehicle spawn and start gaining speed by itself, until it rolls over and fly off in the sky.

Edit: I noticed the vehicle does not fly away when gravity is disable its physic asset. Also if in the BP I change the skeletal asset with the one of another vehicle, it is fine.

peclatj commented 1 year ago

I found a solution, It has to do with the armature of my mesh in blender. I have no idea why but mine does not work but the armature provided (https://carla.readthedocs.io/en/latest/tuto_A_add_vehicle/) on the 2nd tutorial works, I'm unable to find a single difference in the parameters in blender between the two armatures.

EDIT: I found the difference between my two armatures, it's only the scale. I had to scale down my armature by 100 (0.01 instead of 1.0) and then to compensate scale up the bones and my mesh in edit mode by 100. It results in the same visually but this make it work in Unreal.

I tested multiple times, the scale of the mesh does not affect it. But the scale of the armature has to be 0.01 or 0.001 but not 1.0 nor 0.1.

My units in blender are Meters and the scale is 1.0

I have no words...

I found a thread that says it is a well known issue https://forums.unrealengine.com/t/blender-to-ue4-rig-scaling-problem/440629 maybe it is worth saying that in the tutorial. It would have save me two whole days T_T.