ข้ามไปยังเนื้อหา

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 อ่านคู่แผนที่ ROS (.pgm image + .yaml metadata) และ

  • วาง occupancy grid บนแคนวาสตามมาตราส่วน metric ที่ถูกต้อง
  • ใช้ field resolution และ origin จาก YAML เพื่อให้ world coordinate round-trip ได้
  • ให้วาดเลน ทางแยก ยานพาหนะ คนเดินเท้า สัญญาณไฟ และ arrow / text แบบอิสระทับลงบน

เลเยอร์การวาดเป็นชุด shape แยก ไฟล์ .pgm ต้นฉบับไม่ถูกแก้ไข

  • 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 ที่ล้มเหลว”
  1. นำเข้า Import → ROS map วาง .pgm และ .yaml (หรือ zip ทั้งสองไว้ด้วยกัน)
  2. ตรวจสอบมาตราส่วน resolution และ origin ของ yaml ถูกนำไปใช้อัตโนมัติ ruler ของ drawtonomy แสดงเป็นเมตร
  3. Annotate ใช้ Lane, Vehicle, Path, Polygon และ Text shape Polygon tool พร้อม opacity ต่ำดีสำหรับแรเงา no-go zone
  4. บันทึกเป็น .drawtonomy.svg Annotation บน SLAM map แทบไม่เคยทำครั้งเดียว ไฟล์ .drawtonomy.svg เปิดใหม่พร้อม annotation ทุกอย่าง
  5. ส่งออกสำหรับแจกจ่าย จาก scene เดิม ส่งออก PNG สำหรับ documentation ที่ไม่ต้องการ vector ที่ scale ได้ หรือ flat SVG สำหรับ paper และ slide
  • ใช้สีเดียวสำหรับ 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 สำหรับรายละเอียดการนำเข้า