当前位置:网站首页>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
边栏推荐
- [research materials] 2021 China's game industry brand report - Download attached
- Congratulations to musk and NADELLA on their election as academicians of the American Academy of engineering, and Zhang Hongjiang and Fang daining on their election as foreign academicians
- JS function algorithm interview case
- (perfect solution) how to set the position of Matplotlib legend freely
- How to connect the network: Chapter 2 (Part 1): a life cycle of TCP connection | CSDN creation punch in
- Go language interface learning notes Continued
- Celebrate the new year together
- Hotel public broadcasting background music - Design of hotel IP network broadcasting system based on Internet +
- Pessimistic lock and optimistic lock of multithreading
- Self introduction and objectives
猜你喜欢

leetcode860. Lemonade change

Gbase8s composite index (I)

The consumption of Internet of things users is only 76 cents, and the price has become the biggest obstacle to the promotion of 5g industrial interconnection

Go practice -- factory mode of design patterns in golang (simple factory, factory method, abstract factory)

Appium 1.22. L'Inspecteur appium après la version X doit être installé séparément

Unity tool Luban learning notes 1
![[research materials] annual report of China's pension market in 2021 - Download attached](/img/24/622aeeb38de16ac84128b362ceeddb.jpg)
[research materials] annual report of China's pension market in 2021 - Download attached

Coordinatorlayout appbarrayout recyclerview item exposure buried point misalignment analysis

RT thread flow notes I startup, schedule, thread

酒店公共广播背景音乐-基于互联网+的酒店IP网络广播系统设计
随机推荐
Burp suite plug-in based on actual combat uses tips
Go practice - gorilla / handlers used by gorilla web Toolkit
[set theory] relation properties (transitivity | transitivity examples | transitivity related theorems)
College campus IP network broadcasting - manufacturer's design guide for college campus IP broadcasting scheme based on campus LAN
About debugging the assignment of pagenum and PageSize of the formal parameter pageweb < T > (i.e. page encapsulation generic) in the controller
Automatic voltage rise and fall 5-40v multi string super capacitor charging chip and solution
1103 integer factorization (30 points)
"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
Go practice -- gorilla / websocket used by gorilla web Toolkit
JS dynamic table creation
Go practice -- design patterns in golang's singleton
Interview question -- output the same characters in two character arrays
112 stucked keyboard (20 points)
穀歌 | 蛋白序列的深度嵌入和比對
Pessimistic lock and optimistic lock of multithreading
Intégration profonde et alignement des séquences de protéines Google
Use posture of sudo right raising vulnerability in actual combat (cve-2021-3156)
leetcode406. Rebuild the queue based on height
BIO、NIO、AIO区别
Appium 1.22. L'Inspecteur appium après la version X doit être installé séparément