MCPcopy Create free account
hub / github.com/NVlabs/GraspDataGen / from_file

Method from_file

scripts/graspgen/object.py:86–103  ·  view source on GitHub ↗
(cls, file_path, scale, args=None)

Source from the content-addressed store, hash-verified

84
85 @classmethod
86 def from_file(cls, file_path, scale, args=None):
87 object_file = file_path
88 object_scale = default_object_scale
89 obj2usd_use_existing_usd = default_obj2usd_use_existing_usd
90 obj2usd_collision_approximation = default_obj2usd_collision_approximation
91 obj2usd_friction = default_obj2usd_friction
92 if args is not None:
93 # object_file = args.object_file
94 object_scale = args.object_scale
95 obj2usd_use_existing_usd = args.obj2usd_use_existing_usd
96 obj2usd_collision_approximation = args.obj2usd_collision_approximation
97 obj2usd_friction = args.obj2usd_friction
98 # Apply the scale uniformly to all object types
99 object_scale *= scale
100 return cls(object_file=object_file, object_scale=object_scale,
101 obj2usd_use_existing_usd=obj2usd_use_existing_usd,
102 obj2usd_collision_approximation=obj2usd_collision_approximation,
103 obj2usd_friction=obj2usd_friction)
104
105 @classmethod
106 def from_isaac_grasp_dict(cls, grasp_dict, grasp_file_args=None):

Callers 2

process_single_objectFunction · 0.45
datagen_mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected