Annotate ROS occupancy grid map
หลังจาก tune SLAM ไม่กี่ชั่วโมง คุณมี occupancy grid สวยงาม ตอนนี้ต้องใส่ใน paper, report หรือ presentation พร้อม planned route ที่วาดทับ, target pose ที่ label ไว้, no-go zone ที่แรเงา นี่คือสิ่งที่ ROS map import ของ drawtonomy ทำได้
drawtonomy ทำอะไรกับ .pgm + .yaml
หัวข้อที่มีชื่อว่า “drawtonomy ทำอะไรกับ .pgm + .yaml”drawtonomy อ่านคู่แผนที่ ROS (.pgm image + .yaml metadata) และ
- วาง occupancy grid บนแคนวาสตามมาตราส่วน metric ที่ถูกต้อง
- ใช้ field
resolutionและoriginจาก YAML เพื่อให้ world coordinate round-trip ได้ - ให้วาดเลน ทางแยก ยานพาหนะ คนเดินเท้า สัญญาณไฟ และ arrow / text แบบอิสระทับลงบน
เลเยอร์การวาดเป็นชุด shape แยก ไฟล์ .pgm ต้นฉบับไม่ถูกแก้ไข
ทำไมต้อง annotate grid
หัวข้อที่มีชื่อว่า “ทำไมต้อง annotate grid”- Paper figure “Figure 3: nav2 planning around obstacles” occupancy grid เปล่า ๆ แทบอ่านไม่ออก grid พร้อม planned route และ target pose บอกเรื่องราว
- Internal doc SLAM map ที่มี annotation no-go zone, ตำแหน่ง charging-dock และ named subarea คือ artifact ที่รอดชีวิตเมื่อทีมเปลี่ยน
- สื่อการสอน เมื่อสอน nav2 หรือ AMCL ภาพที่ annotate ให้นักเรียนเห็นสิ่งที่ planner มองเห็น
- Bug reproducer “หุ่นยนต์ติดที่นี่ นี่คือ grid นี่คือ planned path ที่ล้มเหลว”
เวิร์กโฟลว์ drawtonomy
หัวข้อที่มีชื่อว่า “เวิร์กโฟลว์ drawtonomy”- นำเข้า Import → ROS map วาง
.pgmและ.yaml(หรือ zip ทั้งสองไว้ด้วยกัน) - ตรวจสอบมาตราส่วน
resolutionและoriginของ yaml ถูกนำไปใช้อัตโนมัติ ruler ของ drawtonomy แสดงเป็นเมตร - Annotate ใช้ Lane, Vehicle, Path, Polygon และ Text shape Polygon tool พร้อม opacity ต่ำดีสำหรับแรเงา no-go zone
- บันทึกเป็น
.drawtonomy.svgAnnotation บน SLAM map แทบไม่เคยทำครั้งเดียว ไฟล์.drawtonomy.svgเปิดใหม่พร้อม annotation ทุกอย่าง - ส่งออกสำหรับแจกจ่าย จาก scene เดิม ส่งออก PNG สำหรับ documentation ที่ไม่ต้องการ vector ที่ scale ได้ หรือ flat SVG สำหรับ paper และ slide
เคล็ดลับการ render
หัวข้อที่มีชื่อว่า “เคล็ดลับการ render”- ใช้สีเดียวสำหรับ annotation layer หลายสีบน grayscale grid สร้างความยุ่งเหยิง visual
- เพิ่ม scale bar ด้วยมือ ด้วย Linestring และ Text shape drawtonomy ไม่ render scale bar อัตโนมัติ แต่ ruler บอกว่าความยาว meter ที่ต้องการเป็น pixel เท่าไหร่
ข้อจำกัด
หัวข้อที่มีชื่อว่า “ข้อจำกัด”- drawtonomy ไม่ใช่ ตัวแทนของเครื่องมือแก้ไขแผนที่
nav2(CLI utilities สำหรับ crop / inflate / rotate grid) - เลเยอร์ annotation เป็น drawtonomy-native เก็บไฟล์
.drawtonomy.svgเป็น source of truth
ดู นำเข้า ROS occupancy grid guide สำหรับรายละเอียดการนำเข้า