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
- Add a
blocks/Icons/README.md recording the convention and how each icon was made (even if just "bdtex2icon, see bdsim").
- 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.
- 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.
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 plus250x250/and50x50/subfolders, but no script and no README explaining how the icons are made, andblocks/README.mddoesn't mention icons. I found no reference tobdtex2iconor anicons.shanywhere in the repo. Several names (coriolis.png,fdyn.png,fdynx.png, ...) match icons in bdsim, which are made withbdtex2iconfrom 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.shthat needs bdsim, a LaTeX installation and the unpublishedrvc-notationmacros. The open PR petercorke/machinevision-toolbox-python#121 adds, in MVTB'sblocks/Icons/:make_icons.py: renders TeX math to a 250x250 black-on-transparent RGBA PNG using matplotlibmathtext(Computer Modern), so no LaTeX and no extra dependency;README.mddescribing the icon convention (shared with bdsim'sIconsfolder);Findings from the prototype, including how many of bdsim's own icon expressions render and one gotcha (
math_to_imageoutput has an opaque white background), are in petercorke/bdsim#109.Possible follow-up for RTB
blocks/Icons/README.mdrecording the convention and how each icon was made (even if just "bdtex2icon, see bdsim").icons.sh, or a table like MVTB'sICONS) so they can be regenerated.\dvec,\ddvecand\sbulletandarraymatrices; icons likecoriolisandfdynuse\dvec/\ddvec, so those would need the macro definitions fromrvc-notation. I haven't tried RTB's actual expressions.Not urgent.