Lesson 6: Autonomous Robot for Complex Road Network Navigation

How do autonomous vehicles navigate precisely through complex urban road networks on busy streets? How do logistics robots efficiently find optimal paths in maze-like warehouses? These seemingly intricate problems can actually be explored and solved using our UNIHIKER K10 car!

In this project, we will build a road network navigation robot. It can not only accurately identify T-junctions and crossroads but also enable the car to follow preset paths and execute turning maneuvers at complex intersections. This is not only a challenging programming project but also a significant step toward future intelligent transportation technology.

Task Objective

Utilize the built-in algorithms of the UNIHIKER K10 to detect T-junctions and crossroads, enabling the car to accurately identify intersections and execute specified turns based on predefined paths within a complex road network.

Knowledge Points

1. Master the use of built-in algorithms to recognize complex intersections such as crossroads and T-junctions.

2. Learn the methods for intersection detection and turning control.

3. Understand the concept of a "road network" and the role of path planning in future transportation systems.

Materials List

Hardware Requirements:

HARDWARE LIST
1 Maqueen Plus V3
1 UNIHIKER K10

Software Requirements: Mind+ programming software (Version 1.8.1 RC1.0 or above) ×1

Download Link: https://mindplus.cc/

Practical Exercise

Having mastered the basic motion control of the car, we will now take on more complex scenarios. The following two tasks will guide you through practical operations to achieve intersection detecting and path-planning navigation, enhancing your comprehensive application of the car's perception and decision-making capabilities.

Task 1: Complex Intersection Detecting

While the car is in query mode, it continuously detects the current intersection state and provides real-time feedback on the recognition results. The identified intersection information will be displayed on the UNIHIKER K10's screen.

Task 2: Specified Navigation Path

Based on a predefined map route, plan the car's navigation path in advance and program the car to strictly follow the set path during operation.

Task 1: Complex Intersection Detecting

1. Hardware Connection

Connect the assembled car to your computer using a USB 3.0 to Type-C cable.

Note: The Type-C end should be connected to the UNIHIKER K10.

2. Software Preparation

Open Mind+ and complete the software preparation steps as shown in the diagram below.

3. Programming

(1) Initialization Setup

To utilize the built-in line-following function of Maqueen Plus V3, execute the following operations when the "UNIHIKER K10 On Start":

1) → Use the "System initialization module" command to ensure all modules function properly;

2) → Use the "Set up a patrol route speed 1" command to set the car to the lowest line-following speed;

3) → Use the "Patrolling ON" command to activate the line-following function, enabling the car to travel along the black line.

(2) Complex Intersection Detecting

Within the "forever" command, use the "If...Then" conditional statement to determine the type of intersection currently detected by the car.

Note: In query mode, the car outputs different numerical values when recognizing various intersection types during line-following:

1: Crossroad (4-way intersection)

2: T-junction

3: Left turn with straight path

4: Right turn with straight path

When the "Intersection Detecting" command returns a value of 1, use the "Cache text" and "Show cached content" commands to show the text "Crossroad Detected" on the UNIHIKER K10 screen.

Similarly, when the "Intersection detecting" command returns a value of 2, indicating a T-junction has been detected, display the text "T-junction Detected" on the UNIHIKER K10 screen.

When left-turn-with-straight or right-turn-with-straight intersections are detected, use the same method for conditional judgment and text display. The complete program is as follows:

4. Program Execution

Before running the program, ensure the UNIHIKER K10 is properly connected to your computer via USB cable. After verification, click the "Run" button in the software. Place the car on the line-following map and power it on to initiate line tracking. When complex intersections are detected, the UNIHIKER K10 screen will display the corresponding intersection type.

Task 2: Specified Navigation Path

1. Programming

(1) Path Planning Before writing the program, plan a route on the map containing four different types of intersections. The car will travel from start to finish, passing through: two left-turn-with-straight intersections, one right-turn-with-straight intersection, two crossroads, and one T-junction. Each intersection is clearly marked with corresponding turning directions, as shown below:

(2) Initialization Setup

1) → Use the "System initialization" command to ensure all modules function properly;

2) → Use the “Set up a patrol route speed 1” command to set the car to minimum line-following speed;

3) → Use the "Patrolling ON" command to activate the line-following function, enabling the car to travel along the black line.

(3) Specified Navigation Path

1)T-junctions (Intersections 1, 5, and 6)

In the illustrated route, the vehicle encounters T-junctions three times, with different turning operations required each time. For the first T-junction encounter, use the "Set up Trord left" command under the "UNIHIKER K10 On Start" section to execute a left turn maneuver.

For the second T-junction encounter, direct control commands cannot be used for turning operations. Within the "Forever" command, implement conditional logic using the "If...Then" statement to evaluate the "Intersection detecting" command.

Create a new variable "flag_T" to track T-junction pass counts. When the "Intersection detecting" command returns value 1 (true condition), increment this variable using the "change flag_T by 1" command.

When the variable flag_T equals 1, this indicates the car's second encounter with a T-junction. Use the "Set up Trord right" command to execute a right turn maneuver.

When the variable flag_T reaches 3, marking the third T-junction encounter, employ the "Set up Trord stop" command to pause the car's line-following operation.

2)Crossroad Judgment (Intersections 2 and 3)

Similarly, for the first crossroad encounter, use the "Set up intersection left" command under the "UNIHIKER K10 On Start" section to execute a left turn.

For the second crossroad encounter, within the "Forever" program, evaluate the "Intersection detecting" command. When the "Intersection detecting" command returns a value of 1, use the "Set up intersection straight" command to maintain straight movement.

3)Left-Turn-with-Straight Intersection (Intersection 5)

This intersection type appears only once. Under the "UNIHIKER K10 On Start" section, use the "Set up left or straight straight" command to maintain straight movement through this junction.

The complete program is as follows:

2. Program Execution

Before running the program, ensure the UNIHIKER K10 is properly connected to your computer via USB cable. After verification, click the "Run" button in the software. Place the car on the line-following map and power it on to initiate line tracking according to the predefined path.

3. Hands-on Practice

The materials folder contains a sample route map. Can you display this map on the UNIHIKER K10 screen? Give it a try!

Tip: Simply use the "Cache local image" command to achieve this!

Knowledge Corner

1. What is a "Road Network"?

A road network refers to an interconnected system of various roads within a specific area, forming a web-like distribution of pathways. In our daily lives, whether in urban streets, campuses, factories, or warehouses, these can all be seen as networks composed of roads and intersections - what we call a "road network."

1. Definition and Composition of Road Networks

A road network is an interconnected system of roads at various levels that form a web-like transportation structure. In different regions, road networks may consist of various types of roads such as highways, urban roads, and rural roads.

2. Classification of Road Networks

Highway Networks: Primarily composed of roads at different levels, connecting cities, villages, and major transportation hubs, serving as the main component of regional transportation.

Urban Road Networks: Networks formed by various roads within urban areas, constituting the fundamental infrastructure for city transportation.

3. Functions and Roles of Road Networks

Road networks serve as the framework of urban transportation, providing pathways for various vehicles. They ensure safe, efficient, economical, and comfortable travel for transportation means. The design and optimization of road networks are crucial for alleviating traffic congestion and improving transportation efficiency.

2. What Role Does Path Planning Play in Future Transportation?

Imagine a future city where cars drive autonomously through intelligent systems without human intervention. Here, path planning acts as the vehicle's "brain," helping them determine optimal routes through complex road networks.

The functions of path planning can be summarized as follows:

1. Time Efficiency & Traffic Reduction

Autonomous vehicles select the fastest routes based on real-time traffic conditions, avoiding congestion to reach destinations quicker.

2. Safety Enhancement & Accident Prevention

It proactively detects obstacles and hazards, automatically adjusting routes to prevent collisions.

3. System-Wide Traffic Optimization

When multiple vehicles intelligently plan routes, urban traffic flows more smoothly with reduced idle waiting time.

4. Reliable Autonomous Delivery

Delivery robots and unmanned logistics vehicles rely on path planning to navigate cities and warehouses precisely, enabling efficient parcel delivery with minimal human intervention.

In essence, path planning serves as an invisible navigation map, empowering future vehicles and robots to "see" routes intelligently—ensuring safe, swift arrivals. The smart transportation systems of tomorrow will depend fundamentally on this “intelligent brain.”

Challenge Yourself

Imagine placing our car in an intricate maze—could it use its "intelligence" to find the path to freedom? Doesn't that sound both fascinating and challenging? Now, let's explore how to design such a maze-solving robot, enabling it to automatically recognize paths, avoid obstacles, and ultimately reach the destination successfully!

icon program.zip 522KB Download(0)

 

Want to keep learning? Continue your learning journey with our other lessons.

Lesson 2: Design a Personalized Digital Pet

Lesson 3: Set Pet Interaction Mode

Lesson 4: Intelligent Environmental Monitoring Robot

Lesson 5: Autonomous Line-Following Robot

License
All Rights
Reserved
licensBg
0