mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-13 21:30:09 +00:00
255 lines
18 KiB
Plaintext
255 lines
18 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 1,
|
|
"metadata": {
|
|
"collapsed": true
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"import pybullet as p"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 2,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"0"
|
|
]
|
|
},
|
|
"execution_count": 2,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"p.connect(p.DIRECT)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 3,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"0"
|
|
]
|
|
},
|
|
"execution_count": 3,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"p.loadURDF(\"plane.urdf\")"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 4,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"r2d2=p.loadURDF(\"r2d2.urdf\",[0,0,0.5])"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 5,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"2"
|
|
]
|
|
},
|
|
"execution_count": 5,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"source": [
|
|
"p.getNumBodies()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 6,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"joint 0 name= base_to_right_leg\n",
|
|
"joint 1 name= right_base_joint\n",
|
|
"joint 2 name= right_front_wheel_joint\n",
|
|
"joint 3 name= right_back_wheel_joint\n",
|
|
"joint 4 name= base_to_left_leg\n",
|
|
"joint 5 name= left_base_joint\n",
|
|
"joint 6 name= left_front_wheel_joint\n",
|
|
"joint 7 name= left_back_wheel_joint\n",
|
|
"joint 8 name= gripper_extension\n",
|
|
"joint 9 name= left_gripper_joint\n",
|
|
"joint 10 name= left_tip_joint\n",
|
|
"joint 11 name= right_gripper_joint\n",
|
|
"joint 12 name= right_tip_joint\n",
|
|
"joint 13 name= head_swivel\n",
|
|
"joint 14 name= tobox\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"for i in range (p.getNumJoints(r2d2)):\n",
|
|
" jointInfo=p.getJointInfo(r2d2,i)\n",
|
|
" print(\"joint\",jointInfo[0],\"name=\",jointInfo[1].decode('ascii'))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 7,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"pos = 0.00000,0.00000,0.50000 \n",
|
|
"pos = 0.00000,-0.00000,0.49983 \n",
|
|
"pos = 0.00000,-0.00000,0.49948 \n",
|
|
"pos = 0.00000,-0.00000,0.49896 \n",
|
|
"pos = 0.00000,-0.00000,0.49826 \n",
|
|
"pos = 0.00000,-0.00000,0.49740 \n",
|
|
"pos = 0.00000,-0.00000,0.49636 \n",
|
|
"pos = 0.00000,-0.00000,0.49514 \n",
|
|
"pos = 0.00000,-0.00000,0.49375 \n",
|
|
"pos = 0.00000,-0.00000,0.49219 \n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"p.setGravity(0,0,-10)\n",
|
|
"precision=5\n",
|
|
"for i in range (10):\n",
|
|
" pos,orn = p.getBasePositionAndOrientation(r2d2)\n",
|
|
" posmsg='pos = {posx:.{prec}f},{posy:.{prec}f},{posz:.{prec}f} '.format(posx=pos[0],posy=pos[1],posz=pos[2], prec=precision)\n",
|
|
" print(posmsg)\n",
|
|
" p.stepSimulation()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 8,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"p.stepSimulation()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 9,
|
|
"metadata": {
|
|
"collapsed": true
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"%matplotlib inline\n",
|
|
"\n",
|
|
"import matplotlib\n",
|
|
"import numpy as np\n",
|
|
"import matplotlib.pyplot as plt"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 12,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"camTargetPos = [0,0,0]\n",
|
|
"cameraUp = [0,0,1]\n",
|
|
"cameraPos = [1,1,1]\n",
|
|
"\n",
|
|
"pitch = -10.0\n",
|
|
"yaw = 60\n",
|
|
"roll=0\n",
|
|
"upAxisIndex = 2\n",
|
|
"camDistance = 4\n",
|
|
"pixelWidth = 320\n",
|
|
"pixelHeight = 200\n",
|
|
"nearPlane = 0.01\n",
|
|
"farPlane = 100\n",
|
|
"fov = 60\n",
|
|
"viewMatrix = p.computeViewMatrixFromYawPitchRoll(camTargetPos, camDistance, yaw, pitch, roll, upAxisIndex)\n",
|
|
"aspect = pixelWidth / pixelHeight;\n",
|
|
"projectionMatrix = p.computeProjectionMatrixFOV(fov, aspect, nearPlane, farPlane);\n",
|
|
"img_arr = p.getCameraImage(pixelWidth, pixelHeight, viewMatrix,projectionMatrix, shadow=1,lightDirection=[1,1,1])\n"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 13,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD0CAYAAACVbe2MA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qZbnCTgT+L+B3Y8DfxGkj/0c6c1YIYRoOOMO3QghhBgyEnohhGg4EnohhGg4Enoh\nhGg4EnohhGg4EnohhGg4EnohhGg4EnohhGg4/x8Y5R/5ppVyFQAAAABJRU5ErkJggg==\n",
|
|
"text/plain": [
|
|
"<matplotlib.figure.Figure at 0x108feb4a8>"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"w=img_arr[0] #width of the image, in pixels\n",
|
|
"h=img_arr[1] #height of the image, in pixels\n",
|
|
"rgb=img_arr[2] #color data RGB\n",
|
|
"plt.imshow(rgb,interpolation='none')\n",
|
|
"plt.draw()\n",
|
|
"plt.show()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"collapsed": true
|
|
},
|
|
"outputs": [],
|
|
"source": []
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python 3",
|
|
"language": "python",
|
|
"name": "python3"
|
|
},
|
|
"language_info": {
|
|
"codemirror_mode": {
|
|
"name": "ipython",
|
|
"version": 3
|
|
},
|
|
"file_extension": ".py",
|
|
"mimetype": "text/x-python",
|
|
"name": "python",
|
|
"nbconvert_exporter": "python",
|
|
"pygments_lexer": "ipython3",
|
|
"version": "3.6.1"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 2
|
|
}
|