Export Grasp Poses only for parts with Grasp Poses
This commit is contained in:
parent
20900e4eba
commit
b2543c3672
1 changed files with 5 additions and 4 deletions
|
@ -256,10 +256,11 @@ def exportGazeboModels():
|
||||||
config_file.write(GazeboExport.config(obj.Label,
|
config_file.write(GazeboExport.config(obj.Label,
|
||||||
'model.sdf', 'Author', 'Email', 'Comment', 'Version'))
|
'model.sdf', 'Author', 'Email', 'Comment', 'Version'))
|
||||||
|
|
||||||
with open(os.path.join(model_dir, 'frames.json'), 'w') as frames_file:
|
if len(parts[obj.Label]["graspposes"]) > 0:
|
||||||
# frames_file.write(json.dumps(parts[obj.Label]["graspposes"]))
|
with open(os.path.join(model_dir, 'frames.json'), 'w') as frames_file:
|
||||||
json.dump({"features": { "grasp-poses" : parts[obj.Label]["graspposes"]}},
|
# frames_file.write(json.dumps(parts[obj.Label]["graspposes"]))
|
||||||
frames_file, indent=1, separators=(',', ': '))
|
json.dump({"features": { "grasp-poses" : parts[obj.Label]["graspposes"]}},
|
||||||
|
frames_file, indent=1, separators=(',', ': '))
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue