Closed
Description
If I run the demo,
replacing the main function of demo_coverage.py with
def main():
rclpy.init()
navigator = CoverageNavigatorTester()
navigator.startup()
# Some example field
field = [[5.0, 5.0], [5.0, 8.0], [8.0, 8.0], [5.0, 5.0]]
navigator.navigateCoverage(field)
i = 0
while not navigator.isTaskComplete():
# Do something with the feedback
i = i + 1
feedback = navigator.getFeedback()
if feedback and i % 5 == 0:
print('Estimated time of arrival: ' + '{0:.0f}'.format(
Duration.from_msg(feedback.estimated_time_remaining).nanoseconds / 1e9)
+ ' seconds.')
time.sleep(1)
# Do something depending on the return code
result = navigator.getResult()
if result == TaskResult.SUCCEEDED:
print('Goal succeeded!')
elif result == TaskResult.CANCELED:
print('Goal was canceled!')
elif result == TaskResult.FAILED:
print('Goal failed!')
else:
print('Goal has an invalid return status!')
field = [[6.0, 5.0], [5.0, 8.0], [8.0, 8.0], [6.0, 5.0]]
navigator.navigateCoverage(field)
i = 0
while not navigator.isTaskComplete():
# Do something with the feedback
i = i + 1
feedback = navigator.getFeedback()
if feedback and i % 5 == 0:
print('Estimated time of arrival: ' + '{0:.0f}'.format(
Duration.from_msg(feedback.estimated_time_remaining).nanoseconds / 1e9)
+ ' seconds.')
time.sleep(1)
# Do something depending on the return code
result = navigator.getResult()
if result == TaskResult.SUCCEEDED:
print('Goal succeeded!')
elif result == TaskResult.CANCELED:
print('Goal was canceled!')
elif result == TaskResult.FAILED:
print('Goal failed!')
else:
print('Goal has an invalid return status!')
I get the following error
[coverage_server]: Invalid GML File or Coordinates: Outer polygon malformed, first element must equal last!
Metadata
Metadata
Assignees
Labels
No labels