Improve error messages

This commit is contained in:
Edwin Jakobs
2025-01-25 14:26:14 +01:00
parent 864228d346
commit de637c087f
4 changed files with 21 additions and 12 deletions

View File

@@ -39,7 +39,11 @@ fun Turtle.segment(
})
require(position.distanceTo(segment0.start) < 1E-5) {
"""${position}, ${segment0.start}"""
"Alignment error: Turtle position ${position} is not aligned with segment start ${segment0.start}. Distance: ${
position.distanceTo(
segment0.start
)
}"
}
cb.segment(segment0)
orientation = cb.segments.last().pose(1.0).matrix33.matrix44