Closed jmainpri closed 3 years ago
Can you provide a small full working script, together with a specific URDF file, so someone maybe able to verify? (PyBullet has a few rudimentary methods such as pybullet.multiplyTransforms and pybullet.inverseTransform if needed) I doubt this is a bug, but the joint frame could be re-aligned, since URDF and PyBullet have different conventions, but it shouldn't affect joint angles or world-space coordinates.
Another thing that may help, read and write the URDF file using the PyBullet UrdfEditor, it may re-align the joint frame as it us used internally:
Run this script (replace capsule.urdf with your robot)
from pybullet_utils import bullet_client as bc
from pybullet_utils import urdfEditor as ed
import pybullet
import pybullet_data
import time
p0 = bc.BulletClient(connection_mode=pybullet.DIRECT)
p0.setAdditionalSearchPath(pybullet_data.getDataPath())
kuka = p0.loadURDF("capsule.urdf")
ed0 = ed.UrdfEditor()
ed0.initializeFromBulletBody(kuka, p0._client)
ed0.saveUrdf("capsule_out.urdf")
(this script requires a reasonably recent updated pip install pybullet)
Hi,
I am trying to recover the orientation of the joint origin in the URDF file by doing:
transform_pyb just creates a 4x4 homogenous transformation.
But the orientation info[15] in the transformation does not match the origin of the joint in the URDF. The resulting position in origin is ok.
I run out of ideas to go further apart from reading the C++ code. Is it a bug in my version of pybullet? Do I miss something? Are orientations and positions handled differently?