gbionics / gbionics/idyntree

linkIndices in iDynTreeWrappers matlab visualizer differs from model

Open
#809 9 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
234
Forks
72
PR merge metrics
No merged PRs in 30d

Description

I noticed that when using the matlab visualizer in `iDynTreeWrappers`, there is the possibility to change the visualization options of the links using [`iDynTreeWrappers.modifyLinksVisualization`](https://github.com/robotology/idyntree/blob/master/bindings/matlab/%2BiDynTreeWrappers/modifyLinksVisualization.m) method.

This method can be used by passing a list of links indices using the `linkIndices` options,
e.g. we can call it as:
```
iDynTreeWrappers.modifyLinksVisualization(visualizer,'linksIndices', [5 6 7 ...], ...);
```
However, the indices passed in this function should not correspond to the links indices used in the iDynTree model (that is 0-based), but corresponds to the indices of the links in the matlab vector `visualizer.linkNames` (that is 1-based) as you can see in https://github.com/robotology/idyntree/blob/master/bindings/matlab/%2BiDynTreeWrappers/modifyLinksVisualization.m#L40.

I think this can be a source of confusion, and it would be better to use the iDynTree model indices also in this parameter.

Contributor guide

Open the contributing guide

Research direction

Start in bindings/matlab/+iDynTreeWrappers/modifyLinksVisualization.m, especially the handling of linkIndices and visualizer.linkNames. Compare that behavior with the model's 0-based link indices and determine the affected MATLAB usage; done means linkIndices follows the model indexing convention without changing the intended visualization selection.

Written by the indexing model from the issue text.

Assessment

Tech stack
matlab
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.