In this video tutorial, we accomplish the FIRST LEGO League 2021-2022 mission called Platooning Trucks. The goal is to connect the two mission models (trucks) to each other and then connect them both to the bridge. It's quite an interesting mission as it involves three mission models.
- 18 Apr 2023
- LEGO Education SPIKE Prime
- Deliver, Push, FIRST LEGO League, FIRST LEGO League 2021-2022 Cargo Connect, Attachments, Scratch, LEGO Education SPIKE App Word Blocks 2, Sensors, Motion Sensor, Gyro Sensor
In this video tutorial we accomplish the platooning trucks mission from the FIRST LEGO League 2021 Cargo Connect. The goal of the mission is to connect these two trucks. One of them is in the base, the other is on the field and we must connect them both to the bridge. So the two trucks are connected together and they are connected to the bridge. That's the goal of the mission. Quite interesting. As a mission. For this mission, we use a Lego Education Spike Prime robot with a simple yet interesting attachment. Let's see how it works. Start from base, move forward, rotate, and we got them connected. Let's check the program. The program is not very difficult. The program is quite straightforward. We get from base, we rotate right, we move forward. That's it. But to make it a little bit more consistent and reliable, what we did is we use the Yaw angle and we try to use the motion sensor to keep the robot more consistent and reliable. Always try to use some of the sensors. So here is the program. When the program starts, we set movement motors to A and B. It's fine. Speed to 30%. That's fine. We set yaw angle to zero right here. And we wait. We wait for 0.1 seconds. What we do there is we wait until we remove our finger from the robot. Then we move for 35 CM. Here it is.
We move for 35 CM. Then we set speed to the left motor 30% and we start moving it. We wait until we have the yaw angle to more than 83 degrees, which is somewhere at rotating the robot at a right angle. It's not 90, because there is some inertia it's. Somewhere along 83 for our particular robot. Then we rotate, we stop moving and we move four third centimeters. Then we stop moving again.
Move four third centimeters, we stop and we move back. That's the whole program. The interesting part in this program is the use of the Yaw angle. When we try to rotate the robot to about 90 degrees, right? We don't set 90, we set 83. Because of the speed and the rotation of the robot, there will be some inertia. Now, we've discussed in the FIRST LEGO, in the LEGO Education Spike Prime for competition programming course, we discussed different ways in which you can rotate exactly at 90 degrees. So I would advise you to go there and take a look at those lessons. In the meantime, in this simple program, we use this simple wait until the Yaw angle is more than 83. This means it could be 85 86. But for this particular mission, the exact angle is not that important because we can accomplish it. If it is 83 or 85 or 86, there is a large margin of error for the robot when we accomplish the mission. That's it. I hope this is useful. I hope you've learned how to accomplish such an interesting mission where we have to connect these two platooning trucks. And I hope I see you in the next tutorial for the FIRST LEGO League 2021-2022 competition. Cargo connect.
Курсове и занятия включващи този Урок
Този Урок е използван в следните курсове и занятия.