mujoco_wasm icon indicating copy to clipboard operation
mujoco_wasm copied to clipboard

Are body names interpreted correctly?

Open danieldugas opened this issue 8 months ago • 0 comments

for example, looking at the live demo (https://zalo.github.io/mujoco_wasm/)

image

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

image

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.

danieldugas avatar Jun 21 '24 11:06 danieldugas