Questions tagged [pybullet]

PyBullet is a module for physics simulation, robotics and deep reinforcement learning. It's an easy to use package and highly recommended for real-time collision detection, multi-physics for VR simulations, etc. The tag should be used when asking questions about Python implementations of the Bullet Physics SDK.

PyBullet is a Python package based upon the infamous Bullet Physics SDK/Engine for which the developer, Erwin Coumans, even won a Scientific and Technical Academy Award. The Python module has implemented most of the features the original C++ SDK has as well - referring to this GitHub repository.

With PyBullet comes a lot of functionality (for the list click here), including but not limited to physics simulation, robotics, deep reinforcement learning, dynamics simulation, inverse dynamics computation and so on. Aside from physics simulation, you're also able to either render it via CPU or visualize the data via OpenGL.

62 questions
4
votes
1 answer

How to project PyBullet simulation coordinates to rendered Frame pixel coordinates using OpenCV?

How can I convert an objects position in PyBullet to pixel coordinates & draw a line onto the frame using PyBullet & OpenCV? We would like to do this because PyBullet native addUserDebugLine() function is not available in DIRECT mode. import…
avgJoe
  • 832
  • 7
  • 24
3
votes
2 answers

Problem with importing module rospy in python(win10)

I have installed ROS on win10(http://wiki.ros.org/Installation/Windows), and the turtle can also move by pressing the arrow keys. I also installed pybullet through Anaconda3 and used python to import some modules such as import pybullet as p import…
V One
  • 31
  • 1
  • 3
3
votes
2 answers

How to translate camera in pyBullet

Currently in debug visualizer, I know I can drag the mouse to swivel the rotation of the camera. Additionally, I can use the mouse wheel to zoom in and out. But what about translating the camera? Say, along the XYZ world frame axises. Or even along…
user3180
  • 1,369
  • 1
  • 21
  • 38
2
votes
1 answer

depthImg from getCameraImage() is full of 'nan'

This is the code I'm using the generate the image: pos_vec = [.15, .15, .15] up_vec = camera_upvec(pos_vec) viewMat = p.computeViewMatrix( cameraEyePosition=pos_vec, cameraTargetPosition=[0, 0, 0], cameraUpVector=up_vec) projMat =…
2
votes
1 answer

unabel to load a ppo model

hello I've trained a PPO model from stabel_baselines3 on collab I saved it model.save("model") but when I tried loading it I got the following error: m = PPO.load("model", env=env) AttributeError Traceback (most recent…
2
votes
0 answers

Using Bullet3 Pyhsics Simulator with VR and Ubuntu Server

This question concerns the Bullet3 Physics engine. I'm trying to add VR capabilities to existing project that was written with pybullet in Ubuntu. The existing project has a complex set of dependencies that I'm not able to port to Windows so I need…
nikwl
  • 21
  • 2
1
vote
0 answers

Pybullet - Gripper is not able to Grasp Object

I am using the Kinova Jaco robotic arm with the j2n6s300.urdf file and I simply want to grasp a mug from the side and live it up. However, the gripper is not able to pick up the mug. It seems that there is an "invisible" barrier between gripper…
1
vote
2 answers

"cannot connect to X server" while trying to connect to PyBullet in WSL

I am currently using a windows machine, and am busy with some Genetic Algorithm stuff that relies on using a PyBullet virtual environment to test out the locomotive capacity of my "robots". The project I'm working on required me to use…
1
vote
0 answers

Python: AssertionError Pybulet Gym Reinforcement Learning

I am trying to implement an Pybullet + Gym model to generate an RF-Learning Robot. Referred to this YouTube video - https://youtu.be/uczY8oAgLMs Code - import gym import pybullet, pybullet_envs import torch as th from stable_baselines3 import…
Topaz Blue
  • 11
  • 1
1
vote
1 answer

how to calculate quaternion of robot arm end effector to direct it to the center of a sphere while running trajectory along the sphere

I am running a simulation of a robot arm and I want an end effector to be directed to the center of a sphere while it's running a trajectory along the surface of a sphere. My questions is how to calculate with pybullet a quaternion for end effector…
besch
  • 45
  • 4
1
vote
1 answer

TypeError in pybullet code: an integer is required (got type list)

import pybullet as p import pybullet_data import time obstacles_coor=[[-5,10,2.5],[2,10,2.5],[10,10,2.5],[0,5,2.5],[-10,-5,2.5]] physicsClient = p.connect(p.GUI) p.setAdditionalSearchPath(pybullet_data.getDataPath()) p.loadURDF('plane.urdf',…
AisyJeff
  • 21
  • 2
1
vote
0 answers

Pybullet pose in Open3D visualization

I've a problem with the integration of pybullet and open3D. In a nutshell, in the end of a pybullet simulation I have the pose (position and orientation). The I'd like to reopen the same mesh in Open3D and place it back to the pose. In this way I…
1
vote
0 answers

Shadows not showing up in Pybullet getCameraImage

I am trying to produce shadows in a captured image in the Pybullet simulator. The shadows show up in the debugGUI mode but are not visible when calling p.getCameraImage even with shadow=True. Something else I noticed is when shadow=True in…
1
vote
1 answer

How to get depth images from the camera in pyBullet

In pyBullet, I have struggled a bit with generating a dataset. What I want to achieve is to get pictures of what the camera is seeing: img = p.getCameraImage(224, 224, renderer=p.ER_BULLET_HARDWARE_OPENGL) Basically: to get the images that are seen…
M.K
  • 1,464
  • 2
  • 24
  • 46
1
vote
1 answer

Is the rotation matrix in Pybullet converting world coordinates into camera or camera to world?

I am working on a project, where I need to replace the renderings by pybullet with renders generated with pytorch3d. I figured out that pybullet and pytorch3d have different definitions for the coordinate systems (see these links: pybullet,…
1
2 3 4 5