基于子弹的软库机器人仿真
qibullet的Python项目详细描述
qibullet
bullet为softbank robotics'机器人进行基于python的模拟。
安装
需要以下模块:
- numpy
- pybullet
对于python 2.7和python 3,qibullet模块可以通过pip安装:
pip install --user qibullet
用法
机器人可以通过SimulationManager类生成:
fromqibulletimportSimulationManagerif__name__=="__main__":simulation_manager=SimulationManager()# Launch a simulation instances, with using a graphical interface.# Please note that only one graphical interface can be launched at a timeclient_id=simulation_manager.launchSimulation(gui=True)# Spawning a virtual Pepper robot, at the origin of the WORLD frame, and a# ground planepepper=simulation_manager.spawnPepper(client_id,translation=[0,0,0],quaternion=[0,0,0,1],spawn_ground_plane=True)# Or a NAO robot, at a default positionnao=simulation_manager.spawnNao(client_id,spawn_ground_plane=True)
或者使用PepperVirtual类中的loadRobot,如果您已经有一个模拟环境:
pepper=PepperVirtual()pepper.loadRobot(translation=[0,0,0],quaternion=[0,0,0,1],physicsClientId=client_id)
更多代码片段可以在examples folder或存储库wiki中找到
文档
可以找到qibulletapi文档here。文档可以通过以下命令生成(^ {STR 1 } $doxGeN/Stult>包必须预先安装,DOCS文件夹必须存在):
cd docs
doxygen
存储库还包含一个wiki,提供一些教程。
引文
如果您在出版物中使用此存储库,请引用qibullet:
Paper coming soon...
故障排除
opengl驱动程序
如果您遇到消息:
Workaround for some crash in the Intel OpenGL driver on Linux/Ubuntu
您的计算机正在使用Intel OpenGL驱动程序。转到software&updates,additional drivers,然后选择与GPU对应的驱动程序。