Fingertip trajectory control robot arm

1. Introduction

The fingertip trajectory control robot arm function is based on fingertip trajectory recognition, adding different trajectories to control different movements of the robot arm.

2. Startup

2.1. Program description

After the program is started, the camera captures the image, put the palm flat on the camera screen, open the fingers, and the palm faces the camera, similar to the gesture of the number 5. The image will draw the joints on the entire palm. Adjust the position of the palm and try to locate it in the upper middle part of the screen.

image-20240709151729612

At this time, the index finger remains unchanged, and the other fingers are retracted, similar to the gesture of the number 1.

image-20240709153155463

Keep the gesture 1 unchanged, move the finger position, and a red line will appear on the screen to draw the path of the index finger.

image-20240709153231185

When the figure is drawn, open all fingers, and the gesture similar to the number 5 will generate the drawn figure below.

image-20240709153342249

Note: The drawn figure needs to be closed, otherwise part of the content may be missing.

There are currently four trajectory figures that can be recognized, namely: triangle, rectangle, circle, and five-pointed star.

When the camera recognizes different trajectory shapes, it will control the robot arm to perform corresponding actions.

2.2, Program Start

Press q in the image or press Ctrl+c in the terminal to exit the program.

3. Source code

Code path: