From d065583c7cedcb2afd27a87b3b7e62e5dfcdbab2 Mon Sep 17 00:00:00 2001 From: fxia22 Date: Sat, 17 Oct 2020 18:36:02 -0700 Subject: [PATCH] fix plane not found issue, constraint body id issue --- examples/demo/igsdf_obj_viz.py | 10 +++++----- gibson2/render/viewer.py | 5 ++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/examples/demo/igsdf_obj_viz.py b/examples/demo/igsdf_obj_viz.py index 0fbe0081b..cdbda4bf3 100644 --- a/examples/demo/igsdf_obj_viz.py +++ b/examples/demo/igsdf_obj_viz.py @@ -97,13 +97,13 @@ def main(): s.renderer.set_light_position_direction([0,0,10], [0,0,0]) - s.renderer.load_object('plane/plane_z_up_0.obj', scale=[3,3,3]) - s.renderer.add_instance(0) - s.renderer.set_pose([0,0,-1.5,1, 0, 0.0, 0.0], -1) - + #s.renderer.load_object('plane/plane_z_up_0.obj', scale=[3,3,3]) + #s.renderer.add_instance(0) + #s.renderer.set_pose([0,0,-1.5,1, 0, 0.0, 0.0], -1) + # removed the plane since it is in local dir v = [] - mesh_path = os.path.join(model_path, 'shape/visual') + mesh_path = os.path.join(model_path, 'shape', 'visual') for fn in os.listdir(mesh_path): if fn.endswith('obj'): vertices, faces = load_obj_np(os.path.join(mesh_path, fn)) diff --git a/gibson2/render/viewer.py b/gibson2/render/viewer.py index 651260638..2b7526a90 100644 --- a/gibson2/render/viewer.py +++ b/gibson2/render/viewer.py @@ -74,9 +74,8 @@ def create_visual_object(self): self.simulator.import_object( self.constraint_marker2, use_pbr=False) self.simulator.import_object(self.constraint_marker, use_pbr=False) - - self.constraint_marker.set_position([0, 0, -1]) - self.constraint_marker2.set_position([0, 0, -1]) + self.constraint_marker.set_position([0, 0, -1]) + self.constraint_marker2.set_position([0, 0, -1]) def apply_push_force(self, x, y, force): camera_pose = np.array([self.px, self.py, self.pz])