In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > IT Information >
Share
Shulou(Shulou.com)11/24 Report--
On the oil pipe, there is such a blogger, Shane Wighton, who is often abused by his wife in sports. As a result, he often built some cheating props such as "a hundred shots hit a bow and arrow" and "a hundred shots hit a basketball board" to challenge his wife.
This time, Shane Wighton bought equipment to play billiards with his wife. As a result, Shane Wighton was once again mercilessly ridiculed by his wife.
Since you can't beat a normal game, use technology to beat magic. Shane Wighton decided to "create" his natural skills to create a fully automatic club.
How cool is this thing? the club algorithm automatically calculates the optimal hitting path, the projector above the billiard table gives the best hitting position, and the user only needs to pull the trigger to become a billiard player.
What is the specific effect? Let's just look at the moving picture.
Only saw the user pick up the club, load, pull the trigger, club self-aiming, hit the ball into the hole, this series of movements go smoothly. All the user needs to do is to point the club at the white ball, and the club will automatically calculate the hitting path and complete the shot. Really achieve "I have hands, I can do it".
So how is a self-aiming club made?
In order to make self-aiming clubs with two major devices, it is necessary to complete two tasks: "club transformation" and "self-aiming system construction". The difficulty of its work is only a little bit, understand a little higher mathematics, mechanical principles, code programming, visual algorithms, machine learning, and then have a bright brain on the line.
Club transformation
First of all, let's take a look at the club modification part. The transformation of the club mainly requires that the club can automatically adjust the direction of the club, hit the ball automatically and receive the feedback from the aiming system.
With regard to the direction adjustment system of the club, the author shares the picture in his mind during his early thinking, such as the picture below. He hopes that the club can have the ability of flexible and high-precision direction control, as well as the stiffness that can keep the direction unchanged when hitting billiards at high speed.
Do you have any ideas about adjusting your figure in this direction?
In order to meet the needs of the club, the author adopts the platform parallel mechanism "Stewart" (Stewart platform) with 6 degrees of freedom, which can well complete the function of adjusting the direction of the club.
After determining the tools to adjust the direction, the author began to enter Iron Man's armor-making mode. First, calculate the size of each component, model and simulate the motion effect on the computer, and write code.
Then the firepower is full, and complete the processing of parts and components, equipment installation and so on.
This product's home is simply a small processing plant, I have no doubt that with sufficient funds, he can build an Iron Man armor.
Friends should pay attention to the servo motor used to control the legs to lubricate, otherwise the club may twitch like the following.
Fix the direction adjustment device, and then the realization of the automatic putter hitting function. Compared with the complexity of the Stewart platform, the putter hitting function is obviously simpler, which can be done with a single cylinder.
In this way, through the Stewart platform and cylinder these two tools, our club has been able to achieve multi-directional adjustment has been automatic putter, the next is to install single-chip microcomputer and wireless module to achieve the direction adjustment of the club and putter controllable.
As the saying goes, programmers who do not know how to machine are not good engineers, and the author does all the work of portable code, parts processing and equipment debugging through one operation.
At this point, the transformation of the club is basically completed, and the next thing to be done is the production of the automatic aiming system.
Self-pointing system
To make a self-aiming system, it is necessary to complete two parts: "visual positioning" and "trajectory calculation".
Let's start with the visual positioning part that is easier to understand. The visual positioning system mainly has a camera installed on the top of the billiard to provide picture support. the camera transmits the recorded picture to the computer, and the computer is analyzing the picture.
Well, this camera can also move and adjust the recording angle, capture the billiards on the billiard table without dead angles, and control the overall situation! Is there a sense of vision that the protagonist opens and hangs in the animation? the five understandings are called experts.
Of course, we also need some auxiliary measures to enable the computer to adjust the received picture to be consistent with the actual picture, so as to prevent the ball from going wrong and causing the ball not to enter the hole.
By sticking white dots and QR codes on the billiard table, the author allows the computer to adjust the datum, thus realizing the square appearance of the billiard table in the computer.
Next, use a drop magic code to let the computer identify billiards, holes and the edge of the library.
Code complete. Next, the computer can reverse the hole, the desktop bumper and the position of the ball according to the datum, and then mark it with a visual algorithm to complete the target recognition.
Now that both the ball and the hole can be identified, it's time to let the club start to learn to hit the ball, that is, to enter the "trajectory calculation" part of the self-aiming system.
To complete the trajectory calculation, you must first let the computer know where the club is facing. Universal QR stickers appear again, one sticker can let the computer find the club, two stickers let the computer understand that the club points, home diy must be a good partner.
▲ QR sticker: I marked a location
But wait a minute, these two QR codes can only be formed and 2D images on the computer, the computer does not know the tilt angle of the club, this is not a mess when hitting the ball?
So how to save time and effort to obtain the tilt angle? Let's take a look at which data in the picture perceived by the computer are related to the tilt angle.
Finally, the author finds that what the computer can directly obtain is the change of the image length generated by the two QR codes of the club, and the change of the image length is affected by the tilt angle. I know this question. I learned to solve the equation in primary school. )
In other words, we use a protractor to measure the degree of the tilt angle, combined with the change of the image length in the computer, we can obtain the relationship between the tilt angle and the image length. Enter this change into the code, and the code can automatically calculate the tilt angle of the club through the length of the image.
In order to reduce the influence of the jitter of the hand-supported club on the computer calculation of the inclination angle, the author also designed a support for the club to increase the stability of the club.
When the club is set up like this, it feels like a battery.
The club and table data have been identified, and the next step is to enter the link of batting trajectory calculation. Before the algorithm is actually installed, the author makes a simple algorithm to test the hitting of the club on the computer. This algorithm will tell the author the path and angle of the ball.
It may seem cool, but the computer desktop is so far away from the billiards desktop that it is impossible to glance at the computer every test.
As a result, the author did a very cool thing. He installed the projector on the top of the billiard table, projected the computer picture onto the table, and directly turned the billiard table into an interstellar warfare conference table.
I have to say, this projector and interface design have the feeling of satellite tracking.
Next, everything is ready, except Dongfeng. Finally, go over the algorithm again, and the self-aiming club is ready to enter the combat state!
Call your wife over and rub your hands, ready to show her her invention.
The skyline Hawkeye system is in place, the ground has received Hawkeye trajectory data, club attack!
Well, I don't know, it's an alternative precision to be able to keep the ball from getting into the hole at such close range. Does it mean that the props made by people with poor athletic talent have no athletic talent?
Then recalculate all kinds of formula and various trajectory operation data, the club is still ineffective from time to time, and it is completely impossible to understand the law of error.
After thinking about it, there is no error in the trajectory calculation formula and the putter accuracy of the club, which can only be a problem in some link before entering the calculation link. In the end, the author locked the problem to the camera used to record the picture.
Due to the use of wide-angle camera, the picture recorded by the camera has optical distortion, even if the distortion is corrected by the algorithm, the problem still exists.
In the face of this distortion, the author initially wanted to eliminate the distortion by means of physical calibration, but the failed attempt for four consecutive days made him realize that something was wrong and that no matter what he did, there would be something wrong with the trajectory calculation.
There was nothing he could do about it. He refocused on the algorithm and wanted to start with the algorithm. This view directly led him to find the source of the error-the algorithm he used to correct the distortion was actually designed for another camera, and he just had to modify the algorithm to apply to the working camera.
Finally, the emperor lived up to the heart, after the modification of the algorithm after the hitting trajectory is finally normal, the ball quack fierce.
So far, although the club has not yet developed the self-aiming function, it only plays the role of automatic shot, but after the first wave was ridiculed by his wife. He decided to act cautiously and test the stability of the club again and again.
I have to say, Shane Wighton is really a genius who knows how to do a good job. The test algorithm was boring, so he thought of a way to bring others in to do the test.
By creating a simple Mini Program on the website, participants can gain control of automatic clubs and mark hitting spots on the billiard table to hit the ball.
After many rounds of testing, the hitting of the club is guaranteed, and the author also obtains a large number of hitting data, which provides data support for the following self-aiming algorithm.
All the basic problems have been solved, and the next step is to improve the algorithm so that the club has a brain and becomes a true self-aiming club.
In the algorithm design, the author hopes that at the beginning of each hit, the computer will automatically calculate all the potential hitting paths and choose the optimal path that can achieve continuous hitting into the hole.
To realize that computers can provide accurate hitting paths, a lot of machine learning is necessary. But the urgent desire for shame does not allow the author to spend too much time on machine learning.
As a result, the author adopts a relatively more convenient and efficient method-drawing directed graph. To put it simply, through the directed graph, the author taught the computer to calculate the shortest path when hitting the ball while making sure that the ball can be scored.
After this meal, the billiard table has become like this in the eyes of the computer, and it feels like a torpedo tracking a ship during a naval battle.
Next, the superbrain has been deployed, the interstellar target guidance satellite (projector) has been deployed, and the clubs are ready. Shane Wighton challenged his wife again.
This time, Shane Wighton's wife kicked off, and after two strokes, it was Shane Wighton's turn to hit the ball. Then, there is the batting of Shane Wighton, which thoroughly shows what is a straight man of science and technology.
Finally, let's get to know the author. Shane Wighton, who previously studied at the University of North Carolina at Charlotte, holds a bachelor's degree in mechanical engineering and a master's degree in computer science, and currently works as chief engineer at 3D printing technology developer and manufacturer Formlabs.
Shane Wighton himself has a very high popularity in the tubing, because his wife's athletic talent is so strong that Shane Wighton often needs to make some cool techs to get some face.
In addition to self-aiming clubs, the author has also made cool techs equipment such as fully automatic aiming bows and arrows, a hundred shots and a hundred shots, a fully automatic barber, and a living physical plug-in maker.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.