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
|
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