I am trying to set up a list of tasks that the robot is supposed to do at each position of the basic security patrol route.
For some sensor data collection I want the robot to lift its arm to 0.5, then to 1.05. After that the Robot should rotate 4 times by 90°. After each action, the robot should stay and wait in position for 5 seconds.
So for testing this, at first I tried to add any small tasks into the script, but I am facing two issues:
The code for this is:
'# Do something during our route (e.x. AI detection on camera images for anomalies) # Simply print ETA for the demonstation i = 0 while not navigator.isTaskComplete(): i += 1 feedback = navigator.getFeedback() if feedback and i % 3 == 0: navigator.get_logger().info('Executing current waypoint: ' + str(feedback.current_waypoint + 1) + '/' + str(len(route_poses))) now = navigator.get_clock().now() print("Arm out") robot.arm.move_to(0.3) robot.push_command() robot.arm.wait_until_at_setpoint() time.sleep(5) print("Arm in") robot.arm.move_to(0.005) robot.push_command() robot.arm.wait_until_at_setpoint() # Some navigation timeout to demo cancellation if now - nav_start > Duration(seconds=600.0): navigator.cancelTask() # If at end of route, reverse the route to restart security_route.reverse()`
- The error message says, that the robot.lift and the robot.arm are not calibrated
- When testing the rotation, the base obviously does not give the error 1). However, the task is not executed, nor is the text printed as I want it.
What is wrong here? I have fed 3 positions into the script, including the origin, hence I changed the condition to i%3 instead of the i%5 from the original tutorial script.
Looking forward to any help here