예제 #1
0
    def getObservation(self):
        
        position = vec3ToNumpyArray(self.agentRbNp.getNetTransform().getPos())
        orientation = vec3ToNumpyArray(self.agentRbNp.getNetTransform().getHpr())
        image = self.renderWorld.getRgbImages()['agent-0']
        collision = self.physicWorld.isCollision(self.agentRbNp)

        return Observation(position, orientation, image, collision)
예제 #2
0
 def testVec3ToNumpyArray(self):
     xr = np.random.random((3, ))
     vec = LVector3(*xr.ravel())
     x = vec3ToNumpyArray(vec)
     self.assertTrue(np.allclose(x, xr, atol=1e-6))
예제 #3
0
 def getOrientation(self):
     agentRbNp = self._getAgentNode()
     return vec3ToNumpyArray(agentRbNp.getNetTransform().getHpr())
예제 #4
0
 def getPosition(self):
     agentRbNp = self._getAgentNode()
     return vec3ToNumpyArray(agentRbNp.getNetTransform().getPos())