Quarky Intellio Lane Follower Robot using OpenCV in Python | Assembly Guide

Quarky Intellio Lane Follower Robot using OpenCV in Python
Description
Learn how to assemble, program, and test the Quarky Intellio Lane Follower Robot using OpenCV in Python and PictoBlox. This tutorial covers camera-based lane detection, image processing, thresholding, contour detection, motor control, and autonomous navigation for students and educators.

Introduction

The Quarky Intellio Lane Follower Robot is a functional robotic model designed to demonstrate autonomous navigation using camera-based lane detection, OpenCV image processing, and motor-controlled movement.

Unlike basic line follower robots that use only IR sensors, this project uses the built-in camera of Quarky Intellio to capture the lane in real time. The Python program processes the live camera feed using OpenCV, detects the lane area, calculates the robot’s position, and controls the motors to keep the robot moving along the path.

This project helps students understand robotics, artificial intelligence, computer vision, image processing, OpenCV in Python, motor control, and autonomous navigation. It is especially useful for learning how real-world robots use cameras and visual feedback to make movement decisions.

Quarky Intellio Lane Follower with OpenCV

To purchase the Quarky Intellio Rover Kit and begin your robotics journey, visit the link: Explore the Quarky Intellio Rover Kit.

Please follow the step-by-step instructions below to construct the Quarky Intellio Lane Follower Robot.

Helpful Tip Before You Start

During assembly, some small connector pins may fit tightly and can be difficult to remove by hand. In such cases, use the Pin Separator Tool to remove the pin easily and safely. Refer to the GIF below to understand how to use the tool correctly before starting the assembly.

Pin Separator Gif

Note:

  • In each step, refer to the image for the exact orientation, alignment, and hole positions. The box in the top-right corner of each image shows the parts required for that step.
  • In the instruction steps, the images in the top-right corner show the parts used for the corresponding assembly step.

Supplies

 Quarky Intellio Rover Kit

Quarky Intellio Rover Kit:

Box 1:

  • 1x Quarky Intellio
  • 1x USB-C Cable
  • 1x Set of AR Markers
  • 1x Set of Recognition Markers
  • 1x Set of Construction Parts
  • 1x Getting Started Guide (Instruction Manual)

Box 2:

  • 1x Quarky Mini Expansion Board
  • 1x Mini Expansion Connector
  • 1x 180° Servo Motor
  • 2x Motors
  • 2x Set of Wheels
  • 1x Set of Axles and Gears
  • 1x Set of Construction Parts

PictoBlox Software: Download here: https://thestempedia.com/product/pictoblox/download-pictoblox/

Step-by-Step Assembly Instructions

Step 1: Prepare the First Motor Sub-Assembly

Take:

  • one (1) DC Motor
  • one (1) Axle 2L
  • one (1) Bevel Gear 12 Tooth

Insert the Axle 2L into the shaft of the DC Motor. Attach the Bevel Gear 12 Tooth to the exposed end of the axle.

Press the gear firmly until it is securely fitted and aligned straight with the motor shaft, as shown in the image.

Step 2: Prepare the Second Motor Sub-Assembly

Repeat Step 1 to create a second identical motor sub-assembly.

Ensure both motor sub-assemblies have the same orientation and that both gears are fitted securely.

Step 3: Verify the Motor Sub-Assemblies

Place the two completed motor sub-assemblies side by side.

Confirm that:

  • Both DC Motors are positioned in the same direction;
  • Both Bevel Gear 12 Tooth parts are aligned correctly, and both motor sub-assemblies are identical.

Step 4: Mount the Motors on the Main Frame

Take:

  • one (1) Frame (7×11)
  • Six (6) Connector Pin 2L (Black)

Insert the six Connector Pins 2L (Black) into the highlighted holes of the Frame (7×11).

Align the two motor sub-assemblies above the pins and press them firmly onto the frame.

Ensure both motors are securely fixed, evenly aligned, and positioned in the same direction, as shown in the image.

Step 5: Attach the Side T-Shape Beams

Take:

  • two (2) T-Shape Beam (3×3)
  • two (2) Connector Pin 2L (Black)
  • two (2) Connector Pin 3L (Blue)

Insert one Connector Pin 2L (Black) and one Connector Pin 3L (Blue) into the highlighted side holes on each side of the Frame (7×11).

Attach one T-Shape Beam (3×3) to the exposed pins on the left side and the second T-Shape Beam (3×3) to the exposed pins on the right side.

Press both beams firmly and ensure they remain symmetrical.

Step 6: Complete the Front Support Structure

Take:

  • one (1) Pin with Hole
  • one (1) T-Shape Beam (3×3)
  • two (2) Connector Pin 2L (Black)

Insert the Connector Pin 2L (Black) into the highlighted mounting holes.

Attach the one T-Shape Beams (3×3) in the orientation shown in the image.

Fit one Pin with Hole onto each T-shape beam. Ensure both supports are securely connected and aligned evenly on both sides.

Step 7: Install the First Drive Axle and Gear

Take:

  • one (1) Axle 7L
  • one (1) Double Bevel Gear 20 Tooth

Insert the Axle 7L through the aligned holes of the first side support and motor assembly.

Slide the Double Bevel Gear 20 Tooth onto the axle and position it so that it meshes correctly with the Bevel Gear 12 Tooth attached to the motor.

Ensure the axle rotates freely and the gears engage smoothly.

Step 8: Install the Second Drive Axle and Gear

Take:

  • one (1) Axle 7L
  • one (1) Double Bevel Gear 20 Tooth

Repeat Step 7 on the opposite side of the chassis.

Insert the second Axle 7L through the aligned holes and attach the remaining Double Bevel Gear 20 Tooth.

Ensure both drive assemblies rotate smoothly and remain symmetrical.

Step 9: Attach the Cross Beam Support

Take:

  • one (1) Cross Beam
  • two (2) Pin with Hole
  • two (2) Connector Pin 2L (Black)

Insert the two Connector Pin 2L (Black) into the highlighted holes at the end of the Frame (7×11).

Align the Cross Beam with the exposed pins and press it firmly into place.

Insert the two Pin with Hole into the highlighted holes of the Cross Beam, with their circular holes facing downward, as shown in the image.

Step 10: Attach the Castor Wheel

Take:

  • one (1) Castor Wheel
  • two (2) Connector Pin 2L (Black)

Insert the two Connector Pin 2L (Black) into the highlighted mounting holes of the Castor Wheel.

Align the Castor Wheel with the two Pin with Hole attached in the previous step.

Press the Castor Wheel firmly into place and ensure it is centred and able to rotate freely.

Step 11: Install the Drive Wheels

Take:

  • two (2) Wheel with Tyre (43 mm)
  • two (2) Bush
  • two (2) Thin Bush

Slide one Bush onto each exposed Axle 7L.

Attach one Wheel with Tyre (43 mm) to each axle.

Secure each wheel by pressing one Thin Bush onto the outer end of the axle.

Ensure both wheels are firmly mounted but can rotate freely.

Step 12: Verify the Chassis Assembly

Check the completed chassis assembly.

Ensure that:

  • Both drive wheels are aligned;
  • The Castor Wheel rotates freely;
  • Both motor gears mesh correctly;
  • Both motors are securely attached, and
  • The chassis remains level and stable.

Step 13: Attach the Upper Mounting Pins

Take:

  • two (2) Pin with Hole

Attach the two Pin with Hole to the exposed Connector Pin 3L (Blue) inside the chassis.

Position them in the direction shown by the arrows in the image.

Press both parts firmly and ensure they remain aligned, as these connections will support the upper frame assemblies.

Step 14: Prepare the First Upper Frame

Take:

  • one (1) Frame (5×7)
  • two (2) Pin with Hole

Insert one Pin with Hole into each highlighted top corner hole of the Frame (5×7).

Ensure both Pin with Hole parts face outward and are positioned symmetrically, as shown in the image.

Step 15: Attach the Second Frame and First Bent Beam

Take:

  • one (1) Frame (5×7)
  • one (1) Bent Beam
  • one (1) Axle Connector Pin (Blue)
  • two (2) Connector Pin 2L (Black)

Position the second Frame (5×7) above the frame prepared in Step 14.

Insert the Axle Connector Pin (Blue) and two Connector Pin 2L (Black) into the highlighted holes of the Bent Beam.

Align the pins with the corresponding holes of both frames and press them firmly into place.

Maintain the exact angle and orientation shown in the image.

Step 16: Attach the Second Bent Beam

Take:

  • one (1) Bent Beam
  • one (1) Axle Connector Pin (Blue)
  • two (2) Connector Pin 2L (Black)

Repeat the previous step on the opposite side of the upper-frame assembly.

Attach the second Bent Beam using the Axle Connector Pin (Blue) and two Connector Pin 2L (Black).

Ensure both Bent Beams are positioned symmetrically and support the upper Frame evenly.

Step 17: Attach the First Vertical Beam

Take:

  • one (1) Beam (1×7)
  • one (1) Pin with Hole
  • one (1) Connector Pin 3L (Blue)
  • two (2) Connector Pin 2L (Black)
  • one (1) Spacer

Insert the Pin with Hole into the bottom hole of the Beam (1×7).

Slide the Spacer onto the Connector Pin 3L (Blue).

Insert the Connector Pin 3L with the Spacer into the highlighted middle hole of the Beam.

Insert the two Connector Pin 2L (Black) into the remaining highlighted holes.

Align the Beam with the corresponding holes on one side of the upper-frame assembly and press all connections firmly into place.

Step 18: Attach the Second Vertical Beam

Take:

  • one (1) Beam (1×7)
  • one (1) Pin with Hole
  • one (1) Connector Pin 3L (Blue)
  • two (2) Connector Pin 2L (Black)
  • one (1) Spacer

Repeat Step 17 on the opposite side of the upper-frame assembly.

Ensure both Beam (1×7) parts are attached symmetrically and that the Pin with Hole connections face downward, as shown in the image.

Step 19: Repeat the Upper-Frame Assembly on the Opposite Side

Using the remaining components, repeat Steps 15–18 on the opposite side to create a matching upper-frame structure.

Ensure that:

  • Both Bent Beams are mounted in the same orientation as shown in the image.
  • Both Beam (1×7) assemblies are positioned symmetrically.
  • All Pin with Hole connections face in the correct direction.
  • The Spacer and Connector Pins are installed in the same positions on both sides.
  • Both upper-frame structures are aligned evenly and maintain the same angle.

After completing this step, the upper-frame assembly should appear symmetrical on both sides and match the configuration shown in the image.

Step 20: Mount the Upper Frames on the Chassis

Take the two completed upper-frame sub-assemblies and position them above the chassis.

Align the lower Pin with Hole connections of the upper frames with the mounting points prepared on the chassis.

Lower the upper-frame assemblies carefully and press them firmly into place.

Ensure that:

  • Both upper frames are securely attached;
  • Both sides are symmetrically aligned;
  • The frames maintain the angle shown in the image, and
  • The joints move smoothly without obstruction.

Step 21: Attach the Mini Expansion Board

Take:

  • one (1) Quarky Mini Expansion Board
  • two (2) Short Connector Pin

Place the Quarky Mini Expansion Board on the designated upper-frame mounting area.

Align its mounting holes with the highlighted holes on the frame.

Insert one Short Connector Pin into each mounting point and press firmly until the board is securely fixed, remains level, and matches the required orientation.

Step 22: Attach Quarky Intellio

Take:

  • one (1) Quarky Intellio
  • two (2) Short Connector Pin

Position Quarky Intellio on the remaining upper-frame mounting area.

Align the mounting holes of Quarky Intellio with the corresponding holes on the frame.

Insert the two Short Connector Pin and press them firmly until Quarky Intellio is securely mounted.

Ensure its camera faces forward and remains unobstructed.

Step 23: Verify the Final Assembly

Check the completed Lane Follower Robot.

Ensure that:

  • Quarky Intellio is securely mounted;
  • The Mini Expansion Board is fixed firmly;
  • The camera faces forward at the correct angle;
  • Both upper frames are symmetrical;
  • The wheels and gears rotate smoothly;
  • The Castor Wheel moves freely, and 
  • There are no loose beams, pins, or connectors.

The mechanical assembly of the Quarky Intellio Lane Follower Robot is now complete.

Connect the Electronics and Set Up the Lane Follower Program

After completing the mechanical assembly, connect Quarky Intellio, the Mini Expansion Board, and both DC Motors. Then open the provided Lane Follower program in PictoBlox, install the required Python packages, configure the network settings, and run the robot.

Step 24: Connect Quarky Intellio to the Mini Expansion Board 

Connect Quarky Intellio to the Mini Expansion Board according to the wiring diagram. 

Ensure that every wire is connected to the matching labelled pin and follows the same orientation shown in the wiring diagram. 

Step 25: Download the Lane Follower Program 

Download the provided Lane Follower Robot Python project file and save it in an easily accessible folder on your computer. 

Remember the saved location, as you will need to open the file in PictoBlox. 

Step 26: Open the Program in PictoBlox 

  1. Open PictoBlox and choose Blocks or Py Editor.
    PictoBlox Block Coding or Python Selection Screen
  2. Use the Open option to browse to the downloaded Lane Follower project file, select the file, and open it.


  3. Confirm that the complete Python program appears in the editor.

Do not use Block Coding for this example because the Lane Follower program is written in Python.

OpenCV Python Functions Used in the Lane Follower

The Lane Follower program uses OpenCV functions to process the live video feed and detect the lane. Some important OpenCV functions used in this camera-based lane follower project are explained below.

  1. cv2.VideoCapture(): This function captures video frames from the camera stream. In this project, it helps the Python program receive the live camera feed from Quarky Intellio.
  2. cv2.resize(): This function resizes the camera frame. Resizing helps improve processing speed and makes the image easier to analyze.
  3. cv2.cvtColor(): This function converts the image from one color format to another. For lane detection, it can be used to convert the image from BGR to grayscale or other formats that are easier to process.
  4. cv2.GaussianBlur(): This function reduces noise in the image. It smooths the camera feed so that small unwanted spots or disturbances do not affect lane detection.
  5. cv2.threshold(): This function separates the dark lane from the light background using a threshold value. It is useful for converting the camera feed into a black-and-white image for lane detection.
  6. cv2.inRange(): This function detects pixels within a selected color or brightness range. It helps identify the lane area based on the selected threshold values.
  7. cv2.findContours(): This function finds the boundaries of detected objects or regions in the processed image. In this project, it helps detect the shape or boundary of the lane.
  8. cv2.contourArea(): This function calculates the area of a detected contour. It helps remove small unwanted regions and focus only on the main lane area.
  9. cv2.moments(): This function calculates the center point of the detected lane contour. The robot uses this center point to understand whether it should move straight, turn left, or turn right.
  10. cv2.line(): This function draws guide lines on the processed frame. It is useful for showing the lane center, frame center, or direction reference lines.
  11. cv2.circle(): This function marks important points on the camera feed, such as the detected lane center.
  12. cv2.imshow(): This function displays the camera feed, threshold view, processed lane output, or tuning window.
  13. cv2.waitKey(): This function keeps the OpenCV display window active and checks for key input while the program is running.

These OpenCV functions work together to convert the camera feed into useful visual information. The robot then uses this information to decide how the motors should move.

Step 27: Connect Quarky Intellio to PictoBlox

Connect Quarky Intellio to PictoBlox using a Quarky Intellio Wi-Fi connection method.Connection Guide Redirection Page

Once the connection is established successfully, copy the IP address assigned to Quarky Intellio.

This IP address will be required in the Python program for communication between PictoBlox and Quarky Intellio.

Update the following line in the code with your connected Quarky Intellio IP address:

QUARKY_IP = "***.***.*.**"  # <--- UPDATE THIS IP

Make sure the IP address in the code exactly matches the IP address displayed after connecting to Quarky Intellio.

Step 28: Install OpenCV and Required Python Packages

The Lane Follower program uses external Python libraries for OpenCV image processing, numerical calculations, networking, and real-time control. Before running the program, make sure all required dependencies are installed.

The program uses the following libraries:

import cv2
import numpy as np
import socket
import threading
import time
import math

If any of these dependencies are not already installed on your system, install them using the Install Pip Package option in PictoBlox. 

  1. Open the Install Pip Package option in PictoBlox.
  2. Enter the name of the package you want to install, then click Install to begin the installation process.

The following packages may need installation:

  • opencv-python (for cv2)
  • numpy

The opencv-python package is required for cv2, which is used for camera feed processing, lane detection, thresholding, contour detection, and visual output windows. The numpy package is used for numerical operations on image data and arrays.

The remaining libraries, socket, threading, time, and math, are included with Python by default and do not require separate installation.

Step 29: Run the Python OpenCV Lane Follower Program

Once Quarky Intellio is connected and all required packages are installed, run the Python script in PictoBlox.

The program will start receiving the live camera feed from Quarky Intellio and process it using OpenCV. It will also open a Tuning Window containing adjustable parameters for lane detection and robot movement.

The Tuning Window allows you to adjust important image processing and robot control values such as:

  • Black Threshold
  • Kp
  • Kd
  • Base Speed
  • Turn Gain
  • Region of Interest, also called ROI

The size and appearance of the detected lane region may vary depending on:

  • The width of the lane
  • The distance of the robot from the lane
  • Camera positioning
  • Lighting conditions
  • Arena design

These tuning values help the OpenCV program accurately identify the lane and control the robot movement. If the robot is unable to follow the lane correctly, adjust the values gradually while observing the camera feed and lane-detection windows.

The tuning parameters may need to be modified whenever a different arena, lane width, or lighting condition is used.

Step 30: Place the Robot on the Lane Follower Arena

Take the prepared Lane Follower Arena and place it on a flat, well-lit, and non-reflective surface. Position the Quarky Intellio Lane Follower Robot at the starting point of the lane. Make sure the camera is facing forward and has a clear view of the lane.

Quarky intellio Lane Arena

Before testing, check the camera feed and confirm that the lane is clearly visible in the OpenCV output window.

Ensure that:

  • The surface is flat.
  • The lane has clear contrast against the background.
  • The lighting is soft and even.
  • Shadows do not cover the lane.
  • There is no strong reflection on the arena.
  • The camera has a clear forward view.
  • The wheels can rotate freely.
  • The robot has enough space to move safely.

Run the Program

Run the Python program in PictoBlox. 

Use the Tuning Window to adjust parameters such as Black Threshold, Kp, Kd, Base Speed, Turn Gain, and Region of Interest (ROI) if the robot does not follow the lane accurately. Adjust the values gradually and test the robot again until it follows the lane smoothly and consistently.

How OpenCV Helps the Quarky Intellio Lane Follower Robot

OpenCV is used in this project to process the live camera feed captured by Quarky Intellio. The robot does not simply move forward blindly. Instead, it continuously analyzes the lane visible in the camera frame and makes movement decisions based on the processed image.

The Python program uses OpenCV to convert the camera feed into a format suitable for lane detection, identify dark lane regions, calculate the lane position, and adjust the motor speed accordingly. This allows the robot to follow the lane autonomously.

In simple terms, OpenCV acts as the robot’s vision system. It helps Quarky Intellio “see” the lane, understand where the path is located, and decide whether to move forward, turn left, or turn right.

Troubleshooting Guide

While running the Quarky Intellio Lane Follower Robot, you may face issues related to motor direction, camera feed, lighting, or tuning values. Use the following troubleshooting steps to identify and fix the problem.

If the robot is not moving correctly or turns in the wrong direction.

To test the motors:

  1. Go to the Blocks section in PictoBlox.
  2. From the Mini Expansion Board, add the block to run motor 1 forward with 100 speed.
  3. Tap on the block and check whether Motor 1 moves forward.
  4. Repeat the same step for Motor 2 by changing the motor number from 1 to 2 and confirm that both motors move forward.

To test the motors

Both motors must move forward correctly for the lane-follower robot to follow the path.

Check Camera Streaming Resolution

The camera streaming resolution should be set to SVGA (800 × 600) for stable lane detection.

  1. Go to the Blocks section in PictoBlox.
  2. From the Camera extension, add the block to run Motor 1 forward at 100 speed.
  3. Tap on the block to set the camera resolution.

Camera resolution should be set to SVGA

Using a different resolution may affect the camera feed, lane detection window, and tracking accuracy.

Camera Feed is Glitching

If the camera feed is lagging, freezing, or glitching, check the connection method and network quality.

Try the following:

  1. Make sure Quarky Intellio is connected properly.
    In this guide, this enables real-time camera streaming, AI processing, and interactive project control.
    Connection Guide Redirection Page
  2. Check whether the Wi-Fi connection is stable.
  3. Keep the robot and computer closer to the Wi-Fi router.
  4. Avoid using slow or unstable internet connections.
  5. Restart the connection and run the program again.

A weak connection can affect the live camera stream and reduce lane-following accuracy.

If the Camera Feed is Mirrored.

If the robot behaves opposite to the lane direction, check whether the camera feed is mirrored.

  1. After running the Quarky Intellio lane-follower robot program, open the camera stream window and observe the live feed from the Lane Follower Robot.
    Check if the Camera Feed is Mirrored
  2. Ensure that the feed direction matches the actual movement of the robot. If the feed is mirrored or reversed, the robot may make incorrect left and right corrections while following the lane.

Robot is Not Following the Lane Properly on the Arena

If the robot is unable to track the lane correctly on the arena, check the lighting and surface conditions.

Use the robot in an area with:

  • Soft and even lighting
  • No strong reflections
  • No direct bright light on the lane
  • No very dark shadows
  • A clear contrast between the lane and the background
  • A flat and non-reflective surface

Avoid glossy, reflective, very bright, or very dark areas because they can confuse the camera-based lane detection system.

Robot Still Does Not Follow the Lane Correctly

If the robot still has difficulty following the lane, adjust the tuning values in the Tuning Window.

Start by reducing the Base Speed.

A lower base speed gives the robot more time to detect the lane and make corrections smoothly.

Recommended tuning action:

  • Reduce the Base Speed gradually.
  • Observe the camera feed and lane detection window.
  • Adjust values slowly instead of making large changes.
  • Test again after each adjustment.

If the robot moves too fast, it may miss turns or leave the lane. Slowing it down usually improves tracking accuracy.

You can further improve the project by adjusting the tuning values, changing the lane layout, modifying the robot speed, or enabling additional object-detection behaviours.

Table of Contents