Skip to content
Snippets Groups Projects
Commit 8f7ccf01 authored by Yuri Victorovich's avatar Yuri Victorovich
Browse files

devel/py-bullet3: Update 3.09 -> 3.17

Also:
* Add missing dependencies
* Add the test target based on the example from the documentation

Reported by:	portscout
parent 52f07664
Branches
Tags
No related merge requests found
PORTNAME= bullet3
DISTVERSION= 3.09
DISTVERSION= 3.17
CATEGORIES= devel
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
......@@ -9,8 +9,11 @@ COMMENT= Python version of 3D collision detection library Bullet
LICENSE= ZLIB
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
RUN_DEPENDS= ${PYNUMPY} \
${PYTHON_PKGNAMEPREFIX}gym>0:math/py-gym@${PY_FLAVOR}
USES= compiler:c++11-lang gl localbase python:3.6+
USE_PYTHON= autoplist distutils
USE_PYTHON= distutils autoplist
USE_GL= gl glew
USE_GITHUB= yes
......@@ -19,4 +22,7 @@ GH_ACCOUNT= bulletphysics
post-install:
@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/pybullet*.so
do-test: install # test require graphical environment
@${PYTHON_CMD} ${FILESDIR}/test.py
.include <bsd.port.mk>
TIMESTAMP = 1614982042
SHA256 (bulletphysics-bullet3-3.09_GH0.tar.gz) = f2feef9322329c0571d9066fede2db0ede92b19f7f7fdf54def3b4651f02af03
SIZE (bulletphysics-bullet3-3.09_GH0.tar.gz) = 129274815
TIMESTAMP = 1621185390
SHA256 (bulletphysics-bullet3-3.17_GH0.tar.gz) = baa642c906576d4d98d041d0acb80d85dd6eff6e3c16a009b1abf1ccd2bc0a61
SIZE (bulletphysics-bullet3-3.17_GH0.tar.gz) = 131995187
import pybullet as p
import time
import pybullet_data
physicsClient = p.connect(p.GUI)#or p.DIRECT for non-graphical version
p.setAdditionalSearchPath(pybullet_data.getDataPath()) #optionally
p.setGravity(0,0,-10)
planeId = p.loadURDF("plane.urdf")
cubeStartPos = [0,0,1]
cubeStartOrientation = p.getQuaternionFromEuler([0,0,0])
boxId = p.loadURDF("r2d2.urdf",cubeStartPos, cubeStartOrientation)
for i in range (10000):
p.stepSimulation()
time.sleep(1./240.)
cubePos, cubeOrn = p.getBasePositionAndOrientation(boxId)
print(cubePos,cubeOrn)
p.disconnect()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment