Created
October 4, 2022 19:58
-
-
Save michalpelka/f9bcd277de1bb9ba5fd50d718af060af to your computer and use it in GitHub Desktop.
Export Collider definition from Blender to use in URDF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import bpy | |
| import | |
| obj = bpy.context.active_object | |
| l = obj.location | |
| e = obj.rotation_euler | |
| s = obj.scale | |
| #print ('<origin rpy="%f %f %f" xyz="%f %f %f"/>' % (e[0],e[1],e[2], l[0],l[1],l[2])) | |
| print ('<origin rpy="%f %f %f" xyz="%f %f %f"/>' % (e[0],e[1],e[2], l[0],l[1],l[2])) | |
| print ('<geometry>') | |
| print (' <box size="%f %f %f"/>' % (s[0],s[1],s[2])) | |
| print ('</geometry>') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment