当前位置:网站首页>Win10 install pytullet and test
Win10 install pytullet and test
2022-07-03 05:16:00 【Qianyu QY】
install
pip install pybullet
Possible problems :
1、microsoft visual c++ 14.0 or greater is required.
solve : visit http://go.microsoft.com/fwlink/?LinkId=691126, Install downloaded files .
test
import pybullet as p
from time import sleep
physicsClient = p.connect(p.GUI)
p.setGravity(0, 0, -10)
# planeId = p.loadURDF("plane.urdf")
cubeStartPos = [0, 0, 1]
cubeStartOrientation = p.getQuaternionFromEuler([0, 0, 0])
boxId = p.loadURDF("path_to_urdf", cubeStartPos, cubeStartOrientation)
cubePos, cubeOrn = p.getBasePositionAndOrientation(boxId)
useRealTimeSimulation = 0
if (useRealTimeSimulation):
p.setRealTimeSimulation(1)
while 1:
if (useRealTimeSimulation):
p.setGravity(0, 0, -10)
sleep(0.01) # Time in seconds.
else:
p.stepSimulation()
Possible problems :
1、pybullet.error: cannot load urdf file.
solve :path_to_urdf Write absolute path .
2、b3Printf: path_to_urdf.urdf:15: cannot find ‘path_to_urdf.obj’ in any directory in urdf path
solve :urdf The folder you are in needs to contain model files , take path_to_urdf.obj Put it in path_to_urdf.urdf Under the same directory of .
Final result :

Reference resources :https://blog.csdn.net/weixin_41045354/article/details/104534581
边栏推荐
- Problems encountered in fuzzy query of SQL statements
- Go practice -- gorilla/rpc (gorilla/rpc/json) used by gorilla web Toolkit
- Objects. Requirenonnull method description
- Interview question -- output the same characters in two character arrays
- [research materials] the fourth quarter report of the survey of Chinese small and micro entrepreneurs in 2021 - Download attached
- 音频焦点系列:手写一个demo理解音频焦点与AudioMananger
- (perfect solution) how to set the position of Matplotlib legend freely
- 1094 the largest generation (25 points)
- (subplots用法)matplotlib如何绘制多个子图(轴域)
- Basic knowledge of reflection (detailed explanation)
猜你喜欢

How to connect the network: Chapter 1 CSDN creation punch in

Gbase8s composite index (I)

Kept hot standby and haproxy

Detailed explanation of yolov5 training own data set

谷歌 | 蛋白序列的深度嵌入和比对
![[basic grammar] Snake game written in C language](/img/cb/83631ef3ccd7047ca42d33dc49bf90.jpg)
[basic grammar] Snake game written in C language

"250000 a year is just the price of cabbage" has become a thing of the past. The annual salary of AI posts has decreased by 8.9%, and the latest salary report has been released

Promise

2022-02-12 daily clock in: problem fine brush
![[research materials] 2021 China's game industry brand report - Download attached](/img/b7/a377b0b7c742078e2feb28ebfbca62.jpg)
[research materials] 2021 China's game industry brand report - Download attached
随机推荐
Disassembly and installation of Lenovo r7000 graphics card
[set theory] relationship properties (common relationship properties | relationship properties examples | relationship operation properties)
Technical analysis of qianyuantong multi card aggregation router
穀歌 | 蛋白序列的深度嵌入和比對
Gbase8s composite index (I)
JS dynamic table creation
@Autowired 导致空指针报错 解决方式
112 stucked keyboard (20 points)
Self introduction and objectives
Pessimistic lock and optimistic lock of multithreading
Appium 1.22. L'Inspecteur appium après la version X doit être installé séparément
[backtrader source code analysis 4] use Python to rewrite the first function of backtrader: time2num, which improves the efficiency by 2.2 times
Unity tool Luban learning notes 1
微服务常见面试题
联想R7000显卡的拆卸与安装
leetcode406. Rebuild the queue based on height
JS function algorithm interview case
Go language interface learning notes
Compile and decompile GCC common instructions
1094 the largest generation (25 points)