bullet3 icon indicating copy to clipboard operation
bullet3 copied to clipboard

[pybullet] Unexpected behavior of keyword argument `rgbaColors` in `createVisualShapeArray`

Open frankroeder opened this issue 3 years ago • 1 comments

Providing an array of rgba colors in createVisualShapeArray is not working.

Taking the example referenced in the "PyBullet Quickstart Guide"

visualShapeId = p.createVisualShapeArray(shapeTypes=[p.GEOM_MESH, p.GEOM_BOX],
                                         halfExtents=[[0, 0, 0], [0.1, 0.1, 0.1]],
                                         fileNames=["duck.obj", ""],
                                         visualFramePositions=[
                                             shift1,
                                             shift2,
                                         ],
                                         meshScales=[meshScale, meshScale])

,adding rgbaColors as keyword argument with

rgbaColors=[[ 1, 0, 0, 1 ], [ 0, 1, 0, 1 ]]

should color both the duck and box differently. However, only the first one is considered for both visual shapes.

frankroeder avatar Jul 04 '22 12:07 frankroeder

Thanks for the report, it is likely a bug indeed.

erwincoumans avatar Jul 06 '22 08:07 erwincoumans