Skip to content

Commit 6407f3c

Browse files
committed
release v0.30.2
1 parent dd5ae25 commit 6407f3c

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

pyrfuniverse/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Version of the library that will be used to upload to pypi
2-
__version__ = "0.30.1"
2+
__version__ = "0.30.2"
33

44
import os.path
55
import json

test/pyrfuniverse_test/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.30.1"
1+
__version__ = "0.30.2"
22

33
import os
44

test/pyrfuniverse_test/test/test_cloth_attach.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
import cv2
55
import numpy as np
6+
from pyrfuniverse.attributes.camera_attr import CameraAttr
67

78
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")))
89
import os.path
@@ -17,6 +18,9 @@
1718
path=t_shirt_path
1819
)
1920
mesh.SetTransform(position=[0, 0.5, 0])
21+
camera = env.InstanceObject("Camera", attr_type=CameraAttr)
22+
camera.SetTransform(position=[0, 1, -1])
23+
camera.LookAt([0, 0.5, 0])
2024
env.step(200)
2125
mesh.GetParticles()
2226
env.step()
@@ -42,3 +46,10 @@
4246
point1.DoMove([-0.25, 1, 0.5], 0.5)
4347
point2.DoMove([0.25, 1, 0.5], 0.5)
4448
point2.WaitDo()
49+
50+
camera.GetRGB(width=1024, height=512)
51+
env.step()
52+
image = np.frombuffer(camera.data["rgb"], dtype=np.uint8)
53+
image = cv2.imdecode(image, cv2.IMREAD_COLOR)
54+
cv2.imshow("depth", image)
55+
cv2.waitKey(0)

0 commit comments

Comments
 (0)