Open brean opened 1 month ago
I can see the reason, the armature I exported I normalize the rotation axis as z axis. I think in Blender, the primary axis of the bone is y. At the moment, I don't have plans to work with ChaosVehicle, and I'm also implementing another parser from USD to FBX and I will consider taking the y-axis instead of z. Hope it could help.
And the reason why I chose z-axis is because it's more common in robotics.
I think its not the axis but the missing armature modifiers. I will investigate myself and maybe create a pull request if I find the time.
When I import the model using the URDF-importer it looks like this (and not working):
However following the tutorial I posted in my first post it ends up looking like this (and is working nicely):
so the code is not linking the strucutre the same way I would do following the tutorial. (note that the bones from the import script for UE4 vehicles are on a slightly different model so the names are a bit different, however the point is that the structure is different: When I move one joint in the hand-made armature the connected part moves, if I try to move something in the urdf-importer generated model the whole robot moves - so its not just ChaosVehicle but the armature import in general that has a bug)
I experimented a bit more, the UE4 vehicle plugin switches to pose mode in the end, I was in Edit mode with the urdf_importer plugin, so when I was moving stuff it just moved in edit mode. The Plugin creates a vertex group, I am not sure if that's really needed, the only other differences I see is that it just has one root node on the y-axis while the urdf has the joint on the y-axis as you wrote, so maybe that is the issue here. (I also think its helpful to show the names and axes of the bones, which could easily be achived by setting it on the root_armature):
arm.show_names = True
arm.show_axes = True
The imported bone structure is not setup for using with the ChaosVehicle plugin of Unreal Engine. After importing we had to re-rig it based on this toutorial: https://www.youtube.com/watch?v=0lwKWxBeFcQ However I think this library should import the robot with an armature that can be exported directly.