home

Description

The block set all the servo motors of the quadruped angles to 90.

Example

Discover the capabilities of pick-and-place robotic arms, mechanical systems designed to efficiently pick up objects from one location and precisely place them in another.

Introduction

A pick-and-place robotic arm is a mechanical system designed to perform the task of picking up objects from one location and placing them in another. It consists of multiple segments connected, similar to a human arm, and is equipped with motors, sensors, and grippers.

The robotic arm is programmed to move in a precise and controlled manner. It can be guided by various input methods, such as a computer interface or remote control. The arm uses its grippers to grasp objects securely, and then it can move them to a different location.

Pick-and-place robotic arms are commonly used in industries such as manufacturing, logistics, and assembly lines. They automate repetitive tasks that involve moving objects, saving time and reducing the risk of human error. These robotic arms can handle a wide range of objects, from small components to larger items, with accuracy and efficiency.

Code

Logic

  1. Open the Pictoblox application.
  2. Select the block-based environment.
  3. Click on the robotic arm extension available in the left corner.
  4. Drag and drop the Set Pins Link1(), Link2(), Base(), and Gripper() block to define the robotic arm for each servo connection.
  5. Use the Calibrate Link1(), Link2(), and Base() block to set the angle.
  6. Drag and drop the Set Offset Along Length() and Set Offset along Z() blocks to adjust the position of the end effector in the z-direction.
  7. Select the home() block to set the home position for the robotic arm.
  8. Open the gripper to pick up a specific object.
  9. Close the gripper to grab the object securely.
  10. Move to the desired location, then open the gripper to release the object.
  11. Close the gripper afterward.
  12. Then The arm will move to its default or home position using home() block.
  13. Press Run to run the code.

Output

Read More
Learn about face-tracking, and how to code a face-tracking Quadruped robot using sensors and computer vision techniques.

Introduction

A face-tracking robot is a type of robot that uses sensors and algorithms to detect and track human faces in real-time. The robot’s sensors, such as cameras or infrared sensors, capture images or videos of the surrounding environment and use computer vision techniques to analyze the data and identify human faces.
Face-tracking robots have many potential applications, including in security systems, entertainment, and personal robotics. For example, a face-tracking robot could be used in a museum or amusement park to interact with visitors, or in a home as a companion robot that can recognize and follow the faces of family members.

One of the most fascinating activities is face tracking, in which the Quadruped can detect a face and move its head in the same direction as yours. How intriguing it sounds, so let’s get started with the coding for a face-tracking Quadruped robot.

Logic

  1. If the face is tracked at the center of the stage, the Quadruped should be straight.
  2. As the face moves to the left side, the Quadruped will also move to the left side.
  3. As the face moves to the right side, the Quadruped will also move to the right side.

Code Explain

  1. Drag and drop the when green flag clicked block from the Events palette.
  2. Then, add a turn () video on stage with () % transparency block from the Face Detection extension and select one from the drop-down. This will turn on the camera.
  3. Add the set pins FR Hip () FL Hip () FR Leg () FL Leg() BR Hip () BL Hip () BR Leg () BL Leg () block from the Humanoid extension.
  4. Click on the green flag and your camera should start. Make sure this part is working before moving further.
  5. Add the forever block below turn () video on stage with () % transparency from the Control palette.
  6. Inside the forever block, add an analyzed image from the () block. This block will analyze the face the camera detects. Select the camera from the dropdown.
  7. Create a variable called Angle that will track the angle of the face. Based on the angle, the robot will move to adjust its position.
  8. Here comes the logical part as in this, the position of the face on the stage matters a lot. Keeping that in mind, we will add the division () / () block from the Operator palette into the scripting area.
  9. Place get () of the face () at the first place of addition () + (), and 3 at the second place. From the dropdown select X position.
  10. If the angle value is greater than 90, the Humanoid will move left at a specific speed. If the angle is less than 90, the Humanoid will move right at a specific speed. If the angle is exactly 90, the Humanoid will return to its home position.
Block Explained

  1. Create a variable called Angle and assign it the value of the face’s position.
  2. At the center of the stage, we will get the X position value which is zero.
  3. As we move to the left side the X position value will give you the negative value and as we move to the right side the X position value will give you the positive value.
  4. The x position value is divided by 3 which gives precise positioning.
  5. To set the angle at 90 when the face is at the center of the stage we have added 90 to the X position value.
  6. As we move to the left side the angle value will get decreased as the X position value is going in negative.
  7. As we move to the right side the angle value will get increased as the X position value is going in positive.

Code

Output

Our next step is to check whether it is working right or not. Whenever your face will come in front of the camera, it should detect it and as you move to the right or left, the head of your  Quadruped robot should also move accordingly.

Read More
Discover the versatility and benefits of automatic robotic arms in various industries.

Introduction

An automatic robotic arm is a mechanical device that imitates a human arm. It can be programmed and used in many industries. The arm consists of linked parts that can move and rotate, enabling it to do various tasks. Technology advancements like AI and machine learning have led to more advanced robotic arms. These arms can adapt and work autonomously. As a result, they are now widely used across industries and play a crucial role in automation systems.

Code

Logic

  1. Open the Pictoblox application. Select the block-based environment.
  2. Click on the robotic arm extension available in the left corner.
  3. Start by setting up pins for four different connections using set pin lis.
  4. Define the open angle () and close angle () for the gripper.
  5. Establish the home position for the gripper. Use a forever loop to continuously run the loop by dragging and dropping it.
  6. Then open () gripper. Then move position of robotic arm. Change the x, y, and z axes individually at specific intervals.
  7. Utilize the move along the X(), Y(), and Z() axis in ms block to move the arm.
  8. the gripper. Use the goto()  block to change the arm’s position along a specific axis.
  9. Open the gripper. Return the arm to the home position. Close the gripper.
  10. Adjust the position of the robotic arm by moving it along the X(), Y(), and Z() axes one by one using move along the X() Y() Z() axis one by one in ()ms.
  11. We use go to () in () axis in () ms block to change position of arm.
  12. Open the gripper then return home() position then close the gripper().
  13. Add interval of 0.2 second.
  14. Press Run to run the code.

Output

Read More
Discover the exciting world of face-tracking robots and learn how to code one using sensors and algorithms.

Introduction

A face-tracking robot is a type of robot that uses sensors and algorithms to detect and track human faces in real time. The robot’s sensors, such as cameras or infrared sensors, capture images or videos of the surrounding environment and use computer vision techniques to analyze the data and identify human faces.

Face-tracking robots have many potential applications, including in security systems, entertainment, and personal robotics. For example, a face-tracking robot could be used in a museum or amusement park to interact with visitors, or in a home as a companion robot that can recognize and follow the faces of family members.

One of the most fascinating activities is face tracking, in which the Humanoid can detect a face and move its head in the same direction as yours. How intriguing it sounds, so let’s get started with the coding for a face-tracking Humanoid robot.

Logic

  1. If the face is tracked at the center of the stage, the Humanoid should be straight.
  2. As the face moves to the left side, the Humanoid will also move to the left side.
  3. As the face moves to the right side, the Humanoid will also move to the right side.

Code Explained

  1. Drag and drop the when green flag clicked block from the Events palette.
  2. Then, add a turn () video on stage with () % transparency block from the Face Detection extension and select one from the drop-down. This will turn on the camera.
  3. Add the set head pin () FLeft () FRight () BLeft () BRight () block from the Humanoid extension.
  4. Click on the green flag and your camera should start. Make sure this part is working before moving further.
  5. Add the forever block below turn () video on stage with () % transparency from the Control palette.
  6. Inside the forever block, add an analyzed image from the () block. This block will analyze the face the camera detects. Select the camera from the dropdown.
  7. Create a variable called Angle that will track the angle of the face. Based on the angle, the robot will move to adjust its position.
  8. Here comes the logical part as in this, the position of the face on the stage matters a lot. Keeping that in mind, we will add the division () / () block from the Operator palette into the scripting area.
  9. Place get () of the face () at the first place of addition () + (), and 3 at the second place. From the dropdown select X position.
  10. If the angle value is greater than 90, the Humanoid will move left at a specific speed. If the angle is less than 90, the Humanoid will move right at a specific speed. If the angle is exactly 90, the Humanoid will return to its home position.

Block Explained

  1. Create a variable called Angle and assign it the value of the face’s position.
  2. At the center of the stage, we will get the X position value which is zero.
  3. As we move to the left side the X position value will give you the negative value and as we move to the right side the X position value will give you the positive value.
  4. The x position value is divided by 3 which gives precise positioning.
  5. To set the angle at 90 when the face is at the center of the stage we have added 90 to the X position value.
  6. As we move to the left side the angle value will get decreased as the X position value is going in negative.
  7. As we move to the right side the angle value will get increased as the X position value is going in positive.

Code

Output

Our next step is to check whether it is working right or not. Whenever your face will come in front of the camera, it should detect it and as you move to the right or left, the head of your  Humanoid robot should also move accordingly.

Read More
Learn how to set the bounding box threshold, and detect signals such as 'Go', 'TurnRight', 'TurnLeft', and 'Stop' to control quadruped movements.

Introduction

A sign detector Quadruped robot is a robot that can recognize and interpret certain signs or signals, such as hand gestures or verbal commands, given by a human. The robot uses sensors, cameras, and machine learning algorithms to detect and understand the sign, and then performs a corresponding action based on the signal detected.

These robots are often used in manufacturing, healthcare, and customer service industries to assist with tasks that require human-like interaction and decision-making.

Code

Logic

  1. Then, it sets up the quadruped robot’s camera to look for hand signs and tells it how to recognize different signs.
  2. Next, the code starts a loop where the robot looks for hand signs. If it sees a sign, it says the name of the sign out loud.
  3. Finally, if the robot sees certain signs (like ‘Go’, ‘Turn Left’, ‘Turn Right’, or ‘U Turn’), it moves in a certain direction (forward, backward, left, or backward) based on the sign it sees.
  4. So, this code helps a robot understand hand signs and move in response to them!

Output

Read More
Learn how to code logic for video input detection .set the bounding box threshold, and detect signals to control Humanoid movements.

Introduction

A sign detector Humanoid robot is a robot that can recognize and interpret certain signs or signals, such as hand gestures or verbal commands, given by a human. The robot uses sensors, cameras, and machine learning algorithms to detect and understand the sign, and then performs a corresponding action based on the signal detected.

These robots are often used in manufacturing, healthcare, and customer service industries to assist with tasks that require human-like interaction and decision-making.

Code

Logic

  1. Initialise the video on stage and set the transparency as 0%
  2. Show the bounding box and set its threshold to 0.8.
  3. Get the input from the camera forever.
  4. If the signal is detected as ‘Go’ then it displays an ‘up arrow’, sounds go straight and the Humanoid will move 2 steps forward at high speed using do () motion () times at () speed block.
  5. If the signal is detected as ‘TurnRight’ then it displays a ‘right arrow’, sounds Turn right and Humanoid will take a right turn at high speed using do () motion () times at () speed block.
  6. If the signal is detected as ‘TurnLeft’ then it displays a ‘Left arrow’, sounds Turn Left and Humanoid will take a left turn at high speed using do () motion () times at () speed block.
  7. If it detects as stop the display will be cleared in the quirky and the humanoid will be at a home() posture.

Output

Read More
Learn how to create custom sounds to control Quadruped with the Audio Classifier of the Machine Learning Environment in PictoBlox.

Introduction

A Sound-Based Quadruped with Machine Learning refers to a Quadruped robot that can perceive and interact with its environment through sound-based sensing and uses machine-learning techniques to process and analyze the auditory data it receives.
Quadruped robots with machine learning have the potential to greatly enhance the way we interact with machines and each other, making communication more natural and intuitive while also enabling new applications in fields such as healthcare, education, and entertainment.
In this activity, we will use the Machine Learning Environment of the Pictoblox Software. We will use the Audio Classifier of the Machine Learning Environment and create our custom sounds to control the Quadruped.

Audio Classifier Workflow

Follow the steps below to create your own Audio Classifier Model:

  1. Open PictoBlox and create a new file.
  2. Select the Block coding environment as the appropriate Coding Environment.
  3. Select the “Open ML Environment” option under the “Files” tab to access the ML Environment.
  4. A new window will open. Type in an appropriate project name of your choice and select the “Audio Classifier” extension. Click the “Create Project” button to open the Audio Classifier Window.
  5. You shall see the Classifier workflow with two classes already made for you. Your environment is all set. Now it’s time to upload the data.
  6. As you can observe in the above image, we will add two classes for audio. We will be able to add audio samples with the help of the microphone. Rename class 1 as “Clap” and class 2 as “Snap”.

Note: You can add more classes to the projects using the Add Class button.

Adding Data to Class

You can perform the following operations to manipulate the data into a class.

  1. Naming the Class: You can rename the class by clicking on the edit button.
  2. Adding Data to the Class: You can add the data using the Microphone.
  3. You will be able to add the audio sample in each class and make sure you add at least 20 samples for the model to run with good accuracy.
  4. Add the first class as “clap”  and record the audio for clap noises through the microphone.
  5. Add the second class as “snap” and record the audio for snap noises through the microphone.

Note: You will only be able to change the class name in the starting before adding any audio samples. You will not be able to change the class name after adding the audio samples in the respective class.

Training the Model

After data is added, it’s fit to be used in model training. To do this, we have to train the model. By training the model, we extract meaningful information from the hand pose, and that in turn updates the weights. Once these weights are saved, we can use our model to make predictions on data previously unseen.

The accuracy of the model should increase over time. The x-axis of the graph shows the epochs, and the y-axis represents the accuracy at the corresponding epoch. Remember, the higher the reading in the accuracy graph, the better the model. The range of accuracy is 0 to 1.

Testing the Model

To test the model simply, use the microphone directly and check the classes as shown in the below image:

You will be able to test the difference in audio samples recorded from the microphone as shown below:

Export in Block Coding

Click on the “Export Model” button on the top right of the Testing box, and PictoBlox will load your model into the Block Coding Environment if you have opened the ML Environment in the Block Coding.

 

The Quadruped will move according to the following logic:

  1. When the audio is identified as “clap” sound– Quadruped will move forward.
  2. When the “snap” sound is detected –Quadruped will move backward.


Note: You can add even more classes with different types of differentiating sounds to customize your control. This is just a small example from which you can build your own Sound Based Controlled Quadruped in a very easy stepwise procedure.

Code

Logic

  1. First, initialize the Quadruped extension.
  2. Then, initialize a forever loop to continuously loop and analyze the camera from the stage.
  3. If the program detects a clap sound, the Quadruped will move forward at a specific speed.
  4. Similarly, if it identifies a snap sound, the Quadruped will move backward at a specific speed.
  5. Otherwise, the Quadruped will remain in its initial position (home position).

Output

Read More
All articles loaded
No more articles to load
Table of Contents