当前位置:网站首页>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
边栏推荐
- Introduction to webrtc protocol -- an article to understand dtls, SRTP, srtcp
- 最大连续子段和(动态规划,递归,递推)
- JS function algorithm interview case
- JS scope
- Interview question -- output the same characters in two character arrays
- Primary school campus IP network broadcasting - Design of primary school IP digital broadcasting system based on campus LAN
- Go practice -- gorilla/rpc (gorilla/rpc/json) used by gorilla web Toolkit
- es7创建索引容易犯的错误
- BTC-密码学原理
- The principle is simple, but I don't know how to use it? Understand "contemporaneous group model" in one article
猜你喜欢

XML配置文件

BIO、NIO、AIO区别
![[clock 223] [binary tree] [leetcode high frequency]: 102 Sequence traversal of binary tree](/img/0f/bc8c44aee7a2c9dccac050b1060017.jpg)
[clock 223] [binary tree] [leetcode high frequency]: 102 Sequence traversal of binary tree

How to connect the network: Chapter 2 (Part 1): a life cycle of TCP connection | CSDN creation punch in

appium1.22.x 版本後的 appium inspector 需單獨安裝

大学校园IP网络广播-厂家基于校园局域网的大学校园IP广播方案设计指南
![[set theory] relationship properties (symmetry | symmetry examples | symmetry related theorems | antisymmetry | antisymmetry examples | antisymmetry theorems)](/img/34/d195752992f8955bc2a41b4ce751db.jpg)
[set theory] relationship properties (symmetry | symmetry examples | symmetry related theorems | antisymmetry | antisymmetry examples | antisymmetry theorems)

Promise

Overview of basic knowledge of C language

Unity tool Luban learning notes 1
随机推荐
[research materials] 2021 annual report on mergers and acquisitions in the property management industry - Download attached
Pan details of deep learning
Go practice -- closures in golang (anonymous functions, closures)
Yolov5 input (I) -- mosaic data enhancement | CSDN creative punch in
Common methods of JS array
Why is go language particularly popular in China
Intégration profonde et alignement des séquences de protéines Google
Introduction to webrtc protocol -- an article to understand dtls, SRTP, srtcp
Webrtc protocol introduction -- an article to understand ice, stun, NAT, turn
Interview question -- output the same characters in two character arrays
JS function algorithm interview case
谷歌 | 蛋白序列的深度嵌入和比对
[develop wechat applet local storage with uni app]
Redis 入门和数据类型讲解
微服务常见面试题
Pessimistic lock and optimistic lock of multithreading
(完美解决)matplotlib图例(legend)如何自由设置其位置
"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
SSM framework integration
Self introduction and objectives