The block sets the servo motors of the humanoid hands to the specified angles at the specified speed.
Learn about humanoid robots, their form and functionality, and how the program uses arrow keys to control humanoid movement in different directions and speed.
Introduction
A humanoid is a type of robot or artificial system that is designed to resemble a human being in its form and functionality. Humanoid robots are typically equipped with sensors, actuators, and artificial intelligence capabilities that enable them to interact with their environment and perform tasks that are similar to those of a human being. Humanoid robots are used in various fields, including robotics research, entertainment, healthcare, education, and customer service.
Logic
The Humanoid will move according to the following logic:
- When the “UP” key is pressed – Humanoid will move forward.
- When the “Down” key is pressed – Humanoid will move Backward.
- When the “Left” key is pressed – Humanoid will turn left.
- When the “Right” key is pressed – Humanoid will turn Right.
Code
The program uses the up, down, left, and right arrows to control the robot and make it move forward, backward, left, and right. Every time you press one of the arrows, Humanoid will move in the direction you choose.
- First, we initialize the humanoid extension by dragging and dropping it onto the block we want to use for the humanoid.
- Then, we initialize the IF-ELSE block from the control palette.
- Here, we use the logic that if the up arrow key is pressed, the humanoid will move forward one step at a specific speed.
- If the down arrow key is pressed, the humanoid will move backward one step at a specific speed.
- When the right arrow key is pressed, the humanoid will move in the right direction one step at a specific speed using do() motion () times at () speed.
- If no key is pressed, the humanoid will return to its home position.
Output
Read More