Skip to content

Commit

Permalink
Draw map marker for tasks without inspections
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddasol committed Feb 23, 2024
1 parent 4966031 commit f546bfb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions frontend/src/utils/MapMarkers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ export const placeTagsInMap = (
const maxTaskOrder: number = Math.max(...tasks.map((task) => task.taskOrder))

const orderedTasks = orderTasksByDrawOrder(tasks, currentTaskOrder, maxTaskOrder)

orderedTasks.forEach((task) => {
if (task.inspections.length === 0) {
const pixelPosition = calculateObjectPixelPosition(mapMetadata, task.robotPose.position)
// Workaround for current bug in echo
const order = task.taskOrder < 214748364 ? task.taskOrder + 1 : 1
drawTagMarker(pixelPosition[0], pixelPosition[1], map, order, 30, task.status)
}
task.inspections.forEach((inspection) => {
const pixelPosition = calculateObjectPixelPosition(mapMetadata, inspection.inspectionTarget)
// Workaround for current bug in echo
Expand Down

0 comments on commit f546bfb

Please sign in to comment.