File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,11 @@ class OcTree {};
203203
204204%include " tesseract_geometry/mesh_parser.h"
205205%pybuffer_binary(const uint8_t * bytes, size_t bytes_len);
206+ // %pybuffer_binary does not automatically create a typecheck
207+ %typemap(typecheck) (const uint8_t * bytes, size_t bytes_len) {
208+ // Check if the input is a Python bytes or bytearray object
209+ $1 = PyBytes_Check ($input) || PyByteArray_Check ($input);
210+ }
206211%template (createMeshFromResource) tesseract_geometry::createMeshFromResource<tesseract_geometry::Mesh>;
207212%template (createSDFMeshFromResource) tesseract_geometry::createMeshFromResource<tesseract_geometry::SDFMesh>;
208213%template (createConvexMeshFromResource) tesseract_geometry::createMeshFromResource<tesseract_geometry::ConvexMesh>;
You can’t perform that action at this time.
0 commit comments