Improve debug text/line rendering, can be use to draw frames and text in local coordinate of an object / link.
example:
kuka = p.loadURDF("kuka_iiwa/model.urdf")
p.getNumJoints(kuka)
pybullet.addUserDebugLine([0,0,0],[0,0,0.1],[0,0,1],trackObjectUniqueId=2,trackLinkIndex=6)
pybullet.addUserDebugText("tip", [0,0,0.1],textColorRGB=[1,0,0],trackObjectUniqueId=2,trackLinkIndex=6)
Also allow to render text using a given orientation (instead of pointing to the camera), example:
pybullet.addUserDebugText("tip", [0,0,0.1],textColorRGB=[1,0,0],textOrientation=[0,0,0,1], trackObjectUniqueId=2,trackLinkIndex=6)
Add drawTexturedTriangleMesh, for drawing 3d text.
Expose readSingleInstanceTransformToCPU, to extract position/orientation from graphics index.
updateTexture: allow to not flip texels around up axis
This commit is contained in:
@@ -625,6 +625,9 @@ enum EnumUserDebugDrawFlags
|
||||
USER_DEBUG_REMOVE_CUSTOM_OBJECT_COLOR = 32,
|
||||
USER_DEBUG_ADD_PARAMETER=64,
|
||||
USER_DEBUG_READ_PARAMETER=128,
|
||||
USER_DEBUG_HAS_OPTION_FLAGS=256,
|
||||
USER_DEBUG_HAS_TEXT_ORIENTATION = 512,
|
||||
USER_DEBUG_HAS_TRACKING_OBJECT=1024,
|
||||
|
||||
};
|
||||
|
||||
@@ -640,8 +643,13 @@ struct UserDebugDrawArgs
|
||||
|
||||
char m_text[MAX_FILENAME_LENGTH];
|
||||
double m_textPositionXYZ[3];
|
||||
double m_textOrientation[4];
|
||||
int m_trackingObjectUniqueId;
|
||||
int m_trackingLinkIndex;
|
||||
double m_textColorRGB[3];
|
||||
double m_textSize;
|
||||
int m_optionFlags;
|
||||
|
||||
|
||||
double m_rangeMin;
|
||||
double m_rangeMax;
|
||||
|
||||
Reference in New Issue
Block a user