FLL 2022: Push and collect with Kriket - Second version how to accomplish M08, M15, M07 - FIRST LEGO League 2022-2023 SUPER POWERED Pro Preview

In this video tutorial we accomplish 3 missions from the FIRST LEGO League 2022-2023 SUPER POWER robotics competition. The three missions are wind turbine, television, rechargeable battery. The robot uses a program with sensor compared to the previous way we've accomplished the missions with the same robot.

  • #2224
  • 03 Jan 2024
  • 14:43

It is always better to use sensors. Always. Especially if you want to have a more consistent and reliable behaviour of the robot

English

In this video tutorial, we approach missions with the Kriket robot with a new attachment, and we do this as a second try, over the same missions. We can see the attachment and how we've modified it. We have to accomplish the Rechargeable Battery, the Television, and the Wind Turbine. And this is a second implementation for the same problems in order for us to see the differences. Here it is, same robot, but with the second implementation. And it's an improved implementation of the attachment and the robot behavior. Go, push the television, we collect the energy unit, and then we go for the wind turbine, where we collect three of the units. Then we return back to base. Now let's look at the specific missions and how we accomplish them. As for every run, we have to align the robot in the base. This is how we align this specific robot. There are these black lines in the base, and we can use them to align the robot. It doesn't matter where exactly we start. As a general rule, you have to just figure out for the specific mission and for the specific robot, and you have to use these lines to align the robot to them. Then it's much easier to start and keep the robot behavior much more consistent and reliable. Let's go for the specific missions. What we should do for the Television mission is to push this mission model. But when we push it, it must not be that fast. And the energy unit should only go from inside of the mission model to this green container right there on the right side. So, we shouldn't push very hard. The robot moves, it pushes. The mission is accomplished. We should also go there with the robot and collect this rechargeable battery. It's in the form of an energy unit, but the whole mission is collect, collect, and probably deliver. We collect this mission model with the attachment, and you can see that we just put the attachment on top of the mission model, and we collect it. Third mission. The third mission is the Wind Turbine. We should reach the wind turbine from the base, and then we should push on the mission model. Some of the energy units will fall, hopefully, all of them, and we collect them. It's a classic collect mission, and we managed to do it with this new attachment. So, three missions, three new implementations. Let's look at the program that we've developed for this robot. Previously, you might remember that we did the same three missions with a different robot, without using any sensors, and with a very simple attachment. Here, we have a more complex attachment, a little bit more complex program, but again, very reliable, very stable, and following a few better principles. We don't rely on just aligning to the mission models. We also, from time to time, use some of the sensors to help us maintain a proper consistency and reliability there. So, here is the program. Initially, we set speed to motors C and D to 45%. And these are the motors on which we have the attachment. Let's see. These are the two motors on which we have the attachment connected. And we'll be lifting and lowering this attachment. We move to shortest path. So, this is the initial position of both the motors. We initialize the robot. This is the place where we initialize the robot. And it's always good to initialize the robot when you start. That's one of the principles of using these robots. Try to initialize the values of the speed of the motors and also their position so that you can always start from the same position. So, we initialize. Then we set movement motors to E and F. So, E and F are the motors that we use to move the robot. We wait for 0.5 seconds. This is just for the recording. You can wait. You might decide not to wait. It's always good to have some wait, because in this way, you can remove your finger from the robot when you start it, before it goes. Otherwise, you are still holding the robot and it might go in a different direction. Then we move. We set movement speed to 100 for these motors because we want to reach the television model really fast. And we move for 650 degrees. 650 degrees. Here it is. We start and we move to 650 degrees. And you can see that right here, we move slightly to the left. So, it's slightly to the right. So, left minus two. It's slightly to the right. In this way we keep the position on the right side. Then we set movement to about 20%. And we move slightly to the right, 220 degrees. Here is the behavior of the robot - slightly to the right.

Then, what happens is that we wait for 0.2 seconds. Again, we wait for all the inertia to be down, and we have a small pause. And you can experiment with these pauses. It's a good practice sometimes to have a small pause here and there just to make sure that the robot really stops and the inertia is down. We set the yaw angle to zero. And as we know that we've stopped with the robot, we can set the yaw angle to zero. Then what happens is that we set movement speed to 100 and we move back. We move back right here. We move back for about 200 degrees. And you can see this slight turn to the right. So it's a turn left minus two. It's a turn to the right. Then when we are here, and we decided on this position because it's just useful for us to then turn and go for the second mission. When we are here, what we want to do is to lift the attachment. So how do we lift the attachment? We broadcast a message, and we don't use broadcast in a lot of programs. So this here is an opportunity for us to discuss. We broadcast a lift message right here. We have another set of blocks: when I receive lift. And the good thing is that we can broadcast this message and it could execute almost like in a parallel. So it's executing along with the other problems. When I receive the left message, what do I want to do? I want to start motors C and D until motor C goes to a position of less than 135. Now, the value here is not important. It is specific for this robot. In some of your other programs, it will be a different value. So don't focus on the value. The principle is important. We lift the attachment after we broadcast a message to the robot. And we broadcast a message. And you can see that the robot is doing two things at the same time. It is lifting the attachment and it is moving back. So we can save a lot of time by using this principle, just lift and in the same time move back, which is really, really cool. While we are lifting the attachment, we continue with the program. Right here. Where was I? Yes, right here. We broadcast lift and in the same time we move back -200 degrees. Let's see.

And this is the place where we stop. We've already lifted the attachment. This is the place where we stop. Then, we set movement speed to 20% and we start moving. We start moving until the yaw angle detects something that's minus or less than -48. This here is us moving to the left until the yaw angle detects something that's less than -48. Again, why 48? Because this is just the field and we need this amount of rotations to get to a position in which we can approach the next mission. We stop moving. We set movement speed to 100 because we want to be fast now. And we rotate. This time we rotate with 1.7 rotations. We don't use degrees. We use rotations. Same principle. We just move forward and we change different ways in which we control the motors. You can use degrees, you can use rotations. They are both the same. So we try to use them from time to time - to use rotations and to use degrees. And we move. While we are moving at the end, somewhere around here, we broadcast a new message, which is the message "lower". And we have another block, another set of blocks, which is right here, which says, when I receive lower, execute this set of blocks, which again will be executed in parallel. And we just lower the attachment at the front. How do we lower it? Here it is. And while we lower it, you can see that we move forward with the robot. We move forward, which is again in parallel. We do two actions in parallel, at the same time, which helps with the speed. And we reduce the time that we need to accomplish the missions. And we have more time to accomplish the missions. Now, after we broadcast "lower", we move at the same time again, we move 0.45 rotations. We set movement speed to 30%, start moving right. So while we are lowering, we are moving forward with this block. Move for 0.45 rotations. Here it is. Then, after we lower the attachment, we move to the right. We start moving to the right until yaw angle gives us a measurement of more than 40. Here it is, right about here. And then 100%. Move forward to rotations. Move forward to rotations. And we push. We start pushing on this wind turbine. We start pushing with the blocks that we have. We push with the first block, we return. We push with the second block, we return. We push with the third block, we return. We do it three times. And we wait. We wait for about 0.2 - 0.7. This is just to make sure that the robot stops and to wait for the energy units to fall. At the end, what we do is to return back, the last time, to 250 degrees. And we are right here. We move right and we return to base. That's it. It's a little bit more advanced program where we look at how we broadcast messages. But it's quite good as a program. Very reliable, very consistent, and you can learn a lot about it and a lot from it. It's also very useful because we can execute more than one action at a time.

Courses and lessons with this Tutorial

This Tutorial is used in the following courses and lessons

Image for FIRST LEGO League 2022-2023 SUPERPOWERED solutions and review with Kriket Box robot from LEGO Education SPIKE Prime
  • 67
  • 222:31
  • 21
Image for FIRST LEGO League 2022-2023 SUPERPOWERED solutions and review with Kriket Box robot from LEGO Education SPIKE Prime
  • 67
  • 222:31
  • 21
Image for FIRST LEGO League 2022-2023 SUPERPOWERED solutions and review with Kriket Box robot from LEGO Education SPIKE Prime
  • 67
  • 222:31
  • 21
Image for FIRST LEGO League 2022-2023 SUPERPOWERED solutions and review with Kriket Box robot from LEGO Education SPIKE Prime
  • 67
  • 222:31
  • 21
Image for FIRST LEGO League 2022-2023 SUPERPOWERED solutions and review with Kriket Box robot from LEGO Education SPIKE Prime
  • 67
  • 222:31
  • 21