blocks/Icons: no record of how icons are made (see MVTB#121 for a no-LaTeX script)

Ouverte Adaptée aux débutants
#709 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
2/5
Temps estimé
1-3 heures
Accessibilité débutants
68/100
Type d'issue
Documentation
Clarté
Plutôt claire
Activité
Active
Stack technique
latex, matplotlib, python

Piste de recherche

Commencez par src/roboticstoolbox/blocks/Icons/ et blocks/README.md, puis comparez la convention des icônes et les notes de génération des travaux MVTB et bdsim référencés. Documentez la manière dont les icônes existantes ont été créées, leurs sources ou leur chemin de régénération s’il est connu, ainsi que les dépendances ou limitations pertinentes ; la tâche est terminée lorsqu’une personne débutante peut comprendre la convention et reproduire ou maintenir les icônes.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Note for later, prompted by a cleanup in the Machine Vision Toolbox (MVTB).

What I found in RTB

src/roboticstoolbox/blocks/Icons/ has 27 PNGs plus 250x250/ and 50x50/ subfolders, but no script and no README explaining how the icons are made, and blocks/README.md doesn't mention icons. I found no reference to bdtex2icon or an icons.sh anywhere in the repo. Several names (coriolis.png, fdyn.png, fdynx.png, ...) match icons in bdsim, which are made with bdtex2icon from LaTeX, so these were probably made the same way, but I haven't verified that.

What MVTB did

MVTB had the same gap: its icons came from an untracked icons.sh that needs bdsim, a LaTeX installation and the unpublished rvc-notation macros. The open PR petercorke/machinevision-toolbox-python#121 adds, in MVTB's blocks/Icons/:

  • make_icons.py: renders TeX math to a 250x250 black-on-transparent RGBA PNG using matplotlib mathtext (Computer Modern), so no LaTeX and no extra dependency;
  • a short README.md describing the icon convention (shared with bdsim's Icons folder);
  • a test for the script.

Findings from the prototype, including how many of bdsim's own icon expressions render and one gotcha (math_to_image output has an opaque white background), are in petercorke/bdsim#109.

Possible follow-up for RTB

  1. Add a blocks/Icons/README.md recording the convention and how each icon was made (even if just "bdtex2icon, see bdsim").
  2. If the LaTeX sources for the icons are still known, record them (an icons.sh, or a table like MVTB's ICONS) so they can be regenerated.
  3. Note for whoever tries it: in bdsim's list, the expressions that did not render under mathtext used the custom macros \dvec, \ddvec and \sbullet and array matrices; icons like coriolis and fdyn use \dvec/\ddvec, so those would need the macro definitions from rvc-notation. I haven't tried RTB's actual expressions.

Not urgent.

Langage dominant
C++
Étoiles
3.6k
Forks
650
Merge moyen
1 j 1 h
PR mergées (30 j)
149

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de petercorke/robotics-toolbox-python

Toutes les issues de petercorke/robotics-toolbox-python

Issues similaires

Plus d'issues C++

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.