Yea, not exactly what the challenge is, but I think I can make an argument that I did more than what the challenge called for.
The movie is real-time. I’ve solved all the “loud noises” issues - it runs quietly. Unfortunately, I was watching the robot and didn’t notice that I hadn’t turned on the cell phone camera. I’ll do so again in the future, but right now I’m going to go out for lunch and buy a lottery ticket as today is my lucky day after finally getting this done. This has been pretty much a solid month of very long hours from building a simulation to get the first behavior tree to work in Gazebo right up until just now when all of the real robot bits replaced the simulation.
Here is what the behavior tree does, in summary:
- Home the gripper arm so it will be in a safe position for the robot when it travels.
- Capture the current pose (i.e., while talking to the Invisible Man on the chair, quietly notice where he is sitting).
- Note that the man wants a can of Coke Zero. Look into my database of possible repositories of soda cans and select the first one on the list. Oh yes, there’s one left on a table in the computer room.
- Use the Nav2 stack to get where I should be able to see a can if it’s there.
- Using the OAK-D camera mounted about 4 feet above the robot, look for a coke can. If not found, rotate up to one full circle until one is seen.
- While the can remains in the camera, move towards the can by rotating so the can is with a 30-degree arc in front of the robot, then move so that can is within the reachable distance of the extendable arm.
- Move the extendable arm up until the Pi camera, mounted just above and behind the gripper, with its own AI detector, determines that the arm height is roughly centered vertically on the can.
- Rotate the arm until the can would be positioned right between the jaws of the gripper, once the gripper is opened and extended.
- Open the jaws of the gripper.
- Move the arm out until the can is a few millimeters from the back of the gripper jaws.
- Close the jaws.
- Lift the can up about 4 inches so it won’t drag on the table.
- Retract the arm and lower it to a safe position again, but not so low that the can would hit the body of the robot and come loose.
- Back up a few inches in case the robot needs to rotate as it begins to head back.
- Return to the starting position. Wait patiently for the Invisible Man to take the soda. Hmm, the Man has left. Even though this took less than a minute, the Man is of the TikTok generation and has no attention span. Fortunately, the robot’s creator has a huge attention span.