当前位置:网站首页>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
边栏推荐
- Go practice -- gorilla / websocket used by gorilla web Toolkit
- [backtrader source code analysis 4] use Python to rewrite the first function of backtrader: time2num, which improves the efficiency by 2.2 times
- 112 stucked keyboard (20 points)
- Oracle SQL table data loss
- 动态规划——相关概念,(数塔问题)
- Go practice -- design patterns in golang's singleton
- College campus IP network broadcasting - manufacturer's design guide for college campus IP broadcasting scheme based on campus LAN
- The principle is simple, but I don't know how to use it? Understand "contemporaneous group model" in one article
- Shallow and first code
- How to connect the network: Chapter 1 CSDN creation punch in
猜你喜欢

Principles of BTC cryptography

Botu uses peek and poke for IO mapping

JQ style, element operation, effect, filtering method and transformation, event object
![[research materials] the fourth quarter report of the survey of Chinese small and micro entrepreneurs in 2021 - Download attached](/img/01/052928e7f20ca671cdc4c30ae55258.jpg)
[research materials] the fourth quarter report of the survey of Chinese small and micro entrepreneurs in 2021 - Download attached

appium1.22.x 版本后的 appium inspector 需单独安装
![[Yu Yue education] basic reference materials of interchangeability and measurement technology of Zhongyuan Institute of Technology](/img/f1/d0dc4dc3fe49a2d2cd9e452a0ce31e.jpg)
[Yu Yue education] basic reference materials of interchangeability and measurement technology of Zhongyuan Institute of Technology

Go practice -- gorilla / websocket used by gorilla web Toolkit
![[basic grammar] C language uses for loop to print Pentagram](/img/9e/021c6c0e748e0981d4233f74c83e76.jpg)
[basic grammar] C language uses for loop to print Pentagram
![[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

Webrtc native M96 version opening trip -- a reading code download and compilation (Ninja GN depot_tools)
随机推荐
Promise
[Yu Yue education] basic reference materials of interchangeability and measurement technology of Zhongyuan Institute of Technology
Skip table: principle introduction, advantages and disadvantages of skiplist
Bluebridge cup real topic 2020 palindrome date simulation construction provincial competition
Handler understands the record
Actual combat 8051 drives 8-bit nixie tube
Redis breakdown penetration avalanche
Dynamic programming - related concepts, (tower problem)
小学校园IP网络广播-基于校园局域网的小学IP数字广播系统设计
Botu uses peek and poke for IO mapping
1107 social clusters (30 points)
Shuttle + alluxio accelerated memory shuffle take-off
1118 birds in forest (25 points)
Go language interface learning notes
leetcode435. Non overlapping interval
最大连续子段和(动态规划,递归,递推)
@Autowired 导致空指针报错 解决方式
Appium 1.22. L'Inspecteur appium après la version X doit être installé séparément
乾元通多卡聚合路由器的技术解析
College campus IP network broadcasting - manufacturer's design guide for college campus IP broadcasting scheme based on campus LAN