Fix texture indexing bug in bindings.

Fixes #2341.

PiperOrigin-RevId: 713667648
Change-Id: I7fa5da1506306c5374febf762ce54aff9146079b
This commit is contained in:
Alessio Quaglino
2025-01-09 07:37:31 -08:00
committed by Copybara-Service
parent 419da17395
commit 90049343b9
2 changed files with 18 additions and 0 deletions
+1
View File
@@ -103,6 +103,7 @@ py::array_t<T> MakeArray(T* base_ptr, int index, std::vector<int>&& shape,
shape.insert(shape.begin(), m.hfield_nrow[index]);
} else if (MjSize == &raw::MjModel::ntexdata) {
offset = m.tex_adr[index];
shape.insert(shape.begin(), m.tex_nchannel[index]);
shape.insert(shape.begin(), m.tex_width[index]);
shape.insert(shape.begin(), m.tex_height[index]);
} else if (MjSize == &raw::MjModel::nsensordata) {