Welcome to MicroROS V2 Robot Car repository
2. Configure API KEY
Configure API-KEY
Configure API-KEY1. Course Content2. Start the Dify Service3. Configure Model Provider API-KEY4. Test API-KEY5. Configure the multi_brains Package API6. Parameter File Modification6. Start Text Interaction
1. Course Content
Use the API-KEY registered earlier to configure the robot vehicle's API-KEY.
Warning
Note: Please make sure the vehicle is connected to the internet to use the cloud model services.
2. Start the Dify Service
Tip
MicrorosV2 builds a multi-agent system through Dify, and Dify centrally manages cloud model calls. Dify starts automatically at boot by default and usually does not need to be started manually. If you need to start it manually, refer to the startup command here.
Connect to the vehicle via VNC or SSH, and enter the command in the terminal:
xxxxxxxxxxsh bringup_dify.sh

Check the IP address of the virtual machine by clicking "Robot Information" on the left side of the desktop.

Enter the vehicle IP address directly in the browser address bar to access the Dify management page. If the device is logging in for the first time, you need to use the account and password. You can select the language in the upper-left corner.
Note
Account name:
yahboom@163.comPassword:
yahboom123All account passwords, agent applications, and RAG data are stored locally.
After entering, it looks like the following figure:

3. Configure Model Provider API-KEY
Click "Settings".

Here, configuring the Bailian account API is used as an example. Click "Model Provider" —> "Configure" —> "Add API Key".

Fill in your Bailian platform API-KEY, then select whether it is an international site account, and click "Save".

4. Test API-KEY
Tip
If you need to test whether the API-KEY works, refer to this section of the tutorial. If not, you can ignore it.
Click the micorros-v2-zh application in the Studio (international customers can use the micorros-v2-en application to test).

After entering, you can see the workflow view.

Click "Preview", then input "hello" and press Enter.

You can see the agent's reply.

5. Configure the multi_brains Package API
Important
The Dify application key information is configured by default at the factory, so no further configuration is needed. When you need to configure it manually during development, refer to the following content.
You can find the current Dify key in the Dify backend.
DIFY_API_KEYis the API access credential used by the multi_brains program to access the Dify application. (Note: This is the API key for microris-v2-en )

Open the RobotManager application on the desktop, click "Host Settings" — "Dify Configuration" — "DIFY_API_KEY", and paste in the API key copied in the previous step.

6. Parameter File Modification
Important
When you have development needs to modify the default location files, refer to the following content.
Parameter file path
xxxxxxxxxx$HOME/microros_ws/src/multi_brains/config/llm_agent_config.yaml

Other parameter modifications
The LANGUAGE parameter: domestic users select zh, international users select en.
The DEBUG_MODE parameter: debug mode. When enabled, you can see logs such as Dify requests, action parsing, and action execution in the terminal.
The FEEDBACK_LOOP.max_rounds parameter: limits how many rounds of "Dify decision -> action execution -> result feedback" loop a single user instruction can perform at most, avoiding infinite loops in abnormal situations.
The NAVIGATION.map_mapping_file parameter: configures the map point mapping file path.
The FOLLOW_LINE.hsv_file parameter: configures the HSV calibration file path read for color line following.
The CAMERA.image_topic parameter: configures the camera image topic, defaulting to /camera/image_raw.
The current package uses terminal_client.py by default for text interaction and no longer configures parameters related to speech recognition, voice wake-up, or speech synthesis. User instructions are sent to llm_agent_node via /llm_text_input, and the robot's replies are returned to the terminal via /llm_text_output.
After modifying and saving, compile the current multi_brains package.
One-Click Modify and Build Command for International Users
xxxxxxxxxxsed -i 's/LANGUAGE: "zh"/LANGUAGE: "en"/g' ~/microros_ws/src/multi_brains/config/llm_agent_config.yaml && cd ~/microros_ws && colcon build --packages-select multi_brains && source install/setup.bash
6. Start Text Interaction
Start the agent core node:
xxxxxxxxxxros2 launch multi_brains llm_agent_control.launch.py
Open another terminal and start the text client:
xxxxxxxxxxros2 run multi_brains terminal_client
After the terminal client starts, you can directly input natural language instructions. Common control commands are as follows:
reset Reset the Dify conversation contextclear Clear the screenhelp Display helpexit Exit the terminal client