Repository navigation
feat Aruco/Apriltag generator - #2037
Conversation
…nto apriltag-generator
Greptile SummaryAdds a new
Confidence Score: 4/5Safe to merge after adding upfront ID-range validation in The generator opens the output file via
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
CLI["dimos apriltag CLI\n(dimos.py)"] -->|"parse_id_spec(ids)"| PARSE["ID list\n[0, 1, 2, ...]"]
PARSE --> GEN["generate_pdf()"]
GEN -->|validate family/page/size| VAL{Valid?}
VAL -->|No| ERR1[raise ValueError]
VAL -->|Yes| CANVAS["canvas.Canvas(out_path)"]
CANVAS -->|pack=False| SINGLE["_draw_single_page()\nper tag"]
CANVAS -->|pack=True| LAYOUT["_grid_layout()\ncols x rows"]
LAYOUT --> PACKED["_draw_packed_page()\nper batch"]
SINGLE --> TAG["_draw_tag()\n→ _cell_matrix()\n→ cv2.aruco.generateImageMarker"]
PACKED --> TAG
SINGLE --> RULER["_draw_ruler()"]
PACKED --> RULER
TAG --> SAVE["c.save() → PDF"]
RULER --> SAVE
|
Switch from mypy-ignore to types-reportlab>=4.5.0 (matches reportlab 4.5 in deps), matching the project's pattern for the other ~15 types-* packages. The stubs immediately caught a real bug — Canvas.setKeywords expects str | None, not list[str].
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
mustafab0
left a comment
There was a problem hiding this comment.
Do we need this to be a cli utility?
Can be just a regular utility function/script. Wouldn't hurt to have it but also use cases seem not as frequent to warrant a cli tool.
|
Also, we should add support for ArucoTags (a separate family) and also very widely used. |
good point, I kinda like that dimos let us think about it, and let me merge this for now |
added |
|
I run the following Attached is the output |
you selected only id 4 with this command
also pack is default so you don't need to include it
|
* perf(rerun): render voxel maps as Points3D spheres instead of Boxes3D (dimensionalOS#1793) * feat(api): add porcelain api with connect (dimensionalOS#1779) * fix(rerun): dimos-viewer version upgrade (dimensionalOS#1785) * Task: Add meaningful manipulation tests (dimensionalOS#1765) * feat: never leave child processes alive after the parent (dimensionalOS#1886) * Fix mac UDP (dimensionalOS#1789) * Remove sim from base install (dimensionalOS#1878) * fix(tests): fix flakey porcelain test (dimensionalOS#1900) * feat(go2): rage mode via webrtc (dimensionalOS#1903) * feat:rust native modules (dimensionalOS#1794) Co-authored-by: leshy <lesh@sysphere.org> * Feat/memory2 - plotting, examples, recorder module, semantic search (dimensionalOS#1769) Co-authored-by: RD <63036454+ruthwikdasyam@users.noreply.github.com> * fix attributes (dimensionalOS#1918) * Jeff/fix/rconnect2 (dimensionalOS#1784) * fix(types): resolve mypy 3.10 errors (dimensionalOS#1921) * feat(go2): go2 SDK adapter + nix cyclonedds setup (dimensionalOS#1885) Co-authored-by: Mustafa Bhadsorawala <39084056+mustafab0@users.noreply.github.com> * Revert "Jeff/fix/rconnect2" (dimensionalOS#1924) * feat(modules): async modules (dimensionalOS#1920) * chore(logging): enforce usage of setup_logger (dimensionalOS#1895) * feat(api): peek_stream (dimensionalOS#1909) * CI/macos: skip failing tests (dimensionalOS#1944) * fix(ci): restrict code-cleanup workflow to Linux runners only (dimensionalOS#1948) * Fix/memory2 go2 autorecorder (dimensionalOS#1925) * Convert patrol module to be an async module (dimensionalOS#1939) * feat(tool-streams): add tool streams (dimensionalOS#1713) * G1 Low level connection module coordinator integration (dimensionalOS#1954) * feat(sim): MuJoCo sim teleop for xarm + piper (dimensionalOS#1958) * Show child process cpu usage in dtop (dimensionalOS#1880) Co-authored-by: leshy <lesh@sysphere.org> * Task: OpenArm Integration with DimOS (dimensionalOS#1897) Co-authored-by: Paul Nechifor <paul@nechifor.net> Co-authored-by: RD <63036454+ruthwikdasyam@users.noreply.github.com> Co-authored-by: Andrew Lauer <69774903+aclauer@users.noreply.github.com> Co-authored-by: leshy <lesh@sysphere.org> Co-authored-by: Jeff Hykin <jeff.hykin@gmail.com> * md-babel-py bump (dimensionalOS#1994) * new hong kong office recording (dimensionalOS#1991) * chore(security): update packages with issues (dimensionalOS#1989) * Make whisper an optional extra with faster-whisper by default (dimensionalOS#1877) * Drop perception. Update docs. (dimensionalOS#1888) * Add codecov (dimensionalOS#1889) * go2 lidar timestamps bugfix (dimensionalOS#1992) * go2 cli (dimensionalOS#1990) * refactor(core): memory2 for dtop (dimensionalOS#2004) * fix: adaptive timestamp correction (dimensionalOS#2021) Co-authored-by: Ivan Nikolic <lesh@sysphere.org> * Disable codecov status check (dimensionalOS#2026) * fixes replay mem leak (dimensionalOS#2025) * fix: launch arm blueprints with --simulation flag (dimensionalOS#2027) * small fixes for release (dimensionalOS#2019) * chore: add problems back * Change Codecov branch from 'dev' to 'main' * docs: remove mentions of dev * Ivan/fix/go2recording2 (dimensionalOS#2034) * mapper memory leak fix, measurement transforms (dimensionalOS#2031) * Feat/1759 doc codeblocks ci (dimensionalOS#1884) * Nav Stack 0.1 * fix(security): upgrade some packages (dimensionalOS#2040) * go2 apriltag recordings (dimensionalOS#2044) * Ivan/fix/doc codeblocks added skip2 (dimensionalOS#2052) * feat Aruco/Apriltag generator (dimensionalOS#2037) * Split tests off of self hosted runner (dimensionalOS#1901) Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * fix(verify): exclude unitree-dds extra to avoid cyclonedds C lib Upstream introduced `dimos[unitree-dds]` which depends on `cyclonedds==0.10.5`. The Python binding tries to compile against the CycloneDDS C library, which is not installed on the fork's ubuntu-latest runner. This makes verify fail with: Could not locate cyclonedds. Try to set CYCLONEDDS_HOME or CMAKE_PREFIX_PATH Upstream's own `ci.yml` (line 36) already passes `--no-extra dds --no-extra unitree-dds`; align the fork's verify with it. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: RD <63036454+ruthwikdasyam@users.noreply.github.com> Co-authored-by: Paul Nechifor <paul@nechifor.net> Co-authored-by: Mustafa Bhadsorawala <39084056+mustafab0@users.noreply.github.com> Co-authored-by: Sam Bull <git@sambull.org> Co-authored-by: Andrew Lauer <69774903+aclauer@users.noreply.github.com> Co-authored-by: leshy <lesh@sysphere.org> Co-authored-by: Jeff Hykin <jeff.hykin@gmail.com> Co-authored-by: stash <pomichterstash@gmail.com> Co-authored-by: Dan Vi <bogwi@tutamail.com> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Co-authored-by: jiangtao-huazhijian <jiang.tao@topsunpower.cc> Co-authored-by: Cursor <cursoragent@cursor.com>
Problem
I wanted a nice PDF generator for april tags, quickly vibed.
Size ruler for validation, intelligent packing
getting ready for #2036
Solution
How to Test
dimos apriltag --help
example outputs
tags_50.pdf
tags_75.pdf
Contributor License Agreement