Welcome to ROSMASTER M3 repository
4.Intention estimation
Intent Understanding
1. Course Content
- Master the ability to customize unique user intent understanding using the RAG knowledge base.
[!IMPORTANT]
- Intent understanding is designed to increase the synergy between the robot and the human, allowing the robot to understand the user more uniquely. This function should not be used to perform "strange" or "illogical" tasks.
2. Starting the Agent
Note: If it is already started, it does not need to be started again.
Enter the command on the vehicle terminal:
xxxxxxxxxxstart_agent
The terminal will print the following information, indicating a successful connection:

2.1 Configuring the Intent Mapping File
- This file is used to store the user's vague intent and the corresponding task operation desired by the robot.
- Open the example file in this tutorial folder. Following the reference format, you can add multiple customized intents. Here's a simple example:
| query | answer |
|---|---|
| I'm thirsty | 1. Navigate to the kitchen, 2. Check if there's bottled water or a drink, 3. If a drink is available, return to the starting location and inform the user. |
2.2 Configuring the Knowledge Base
- Next, we need to upload our edited intent mapping file to the
RAGknowledge base inDify.
[!NOTE]
- For detailed instructions on operating the RAG knowledge base, please refer to the tutorial in
[04.AI Model Development]—[06.Deploy the RAG knowledge base].
- Dify comes with a default
Intent mappingreference knowledge base to demonstrate how to use intent understanding features.

- You can modify the
Intent mapping.xlsxtemplate, or you can delete it and add your own file.

[!TIP] It's worth noting: To ensure optimal intent understanding performance, it's recommended to set the
Intent mappingintent understanding knowledge base to high-quality mode, as intent understanding often requires retrieving relevant fragments between similar semantic cues.
3. Running Examples
3.1 Starting the Program
- On the vehicle's infotainment system, open the terminal and enter the command to start the AI agent function:
xxxxxxxxxxros2 launch m3_bringup llm_agent_control.launch.py text_chat_mode:=True- On the vehicle's infotainment system, start the navigation function:
(ORIN & PI5 mainboard)
xxxxxxxxxxros2 launch m3_bringup nav2.launch.py(RDK mainboard) Step-by-step execution, visualized on the accompanying virtual machine Rosmaster-M3-Ubuntu22.04:
xxxxxxxxxx#Virtual machine siderviz2 -d /home/yahboom/yahboomM3_ws/user_ws/src/m3_bringup/rviz/nav2.rviz#Host sideros2 launch m3_bringup nav2.launch.py gui:=FalseThen, follow the navigation startup process to initialize positioning. This will open the rviz2 visualization interface. Click 2D Pose Estimate in the top toolbar to enter selection mode. Roughly mark the robot's location and orientation on the map. After initializing positioning, the preparation is complete.

3.2 Test Case
- Running the text interaction node
xxxxxxxxxxros2 run m3_common_demo text_chatHere is a reference test case; users can create their own dialogue commands.
- I'm currently in the master bedroom, and I'm feeling a bit thirsty.
Enter the test case in the text-based interactive terminal:

The steps for the decision-making layer model planning task are:

Following the task steps of the decision-making layer large model planning, execute them sequentially:

4. Effect Debugging
4.1 Visual Workflow
- Open the corresponding language version of the multi_brains application, then click preview. You can input test content to view the data flow.

- You can also open the workflow to view the time taken for each step and the input and output content of each process.

- If the task routing module here is inaccurate in certain contexts and is not categorized into
Category 3: Personal Intent, you can add restrictions on personal intent or supplement the context description here.

- Additionally, the recall effect of the intent understanding statement to be tested in the knowledge base of the intent mapping can also be tested separately.
