mujoco_wasm
mujoco_wasm copied to clipboard
Are body names interpreted correctly?
for example, looking at the live demo (https://zalo.github.io/mujoco_wasm/)
the body names are initialized based on the model.name_bodyadr
array.
However, the names
array has less entries than the largest index in name_bodyadr
also, the 0th body should logically be world, but here the 9th entry in names
is "thigh_left", so it looks like the indexing is not as expected.
My guess is that the name_bodyadr
indexing is a character count, as model.names is a long array of chars, later converted into a string and then split.
If I have time I could look into a PR and fix, if you agree with this assessment.