yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
Voice interaction module📖
1.Introduction
  • Introduction
2.Write the firmware
  • Write the firmware
3.PC serial port control
  • Control via PC serial port communication
4.MCU control course
  • RPI code
  • Jetsonnano code
  • Arduino code
5. ROS1 Using Tutorialsnew
  • 1、Environmental construction
  • 2、Voice control of car movement
  • 3、Voice controlled automatic driving for car line inspection
  • 4、Voice controlled car color tracking
  • 5、Voice controlled multi-point navigation
6. ROS2 Using Tutorialsnew
  • 1、Environmental constructionnew
  • 2、Voice control of car movement
  • 3、Voice controlled automatic driving for car line inspection
  • 4、Voice controlled car color tracking
  • 5、Voice controlled multi-point navigation
Download
  • MCU Course Code
  • ROS2 Code
  • ROS1 Code
  • Communication_protocol
  • Software File
Download ZIP

Welcome to Voice interaction module repository

5、Voice controlled multi-point navigation

5、Voice controlled multi-point navigation

This course needs to be combined with the hardware of the Rosmaster-X3 car, and only code analysis will be done here. Firstly, let's take a look at the built-in voice commands,

functional wordSpeech recognition resultsVoice broadcast content
Go to the point A19OK, I'm going to the point A.
Go to the point B20OK, I'm going to the point B.
Go to the point C21OK,I'm going to the point C.
Go to the point D32OK, I'm going to the point D.
Back to origianl point32OK, I'm return back.

1、Program startup

1.1、Calibration target point

Terminal input,

ros2 launch yahboomcar_nav laser_bringup_launch.py
ros2 launch yahboomcar_nav display_nav_launch.py
ros2 launch yahboomcar_nav navigation_teb_launch.py

Click on [2D Pose Estimate] in the rviz interface of the virtual machine, and then compare the pose of the car to mark the initial pose of the car on the map;;

The display after marking is as follows:

image-20230530194210728

By comparing the overlap of radar scanning points and obstacles, the initial pose of the car can be set multiple times until the radar scanning points roughly coincide with the obstacles;

Terminal input,

xxxxxxxxxx
ros2 topic echo /goal_pose

Click on [2D Goal Pose] to set the first navigation target point. At this point, the car starts navigation and the terminal will print out topic data:

image-20230530194301408

1.2、Write the target point position to the program

Edit voice_ Ctrl_ Send_ Mark. py file, the file path is as follows:~/driver_ws/src/yahboomcar_voice_ctrl/yahboomcar_voice_ctrl/voice_Ctrl_send_mark.py

Modify the pose of the first navigation point to the one printed in the terminal:

pose.pose.position.x = 2.15381097794
pose.pose.position.y = -5.02386903763
pose.pose.orientation.z = 0.726492681307
pose.pose.orientation.w = 0.687174202082

The marking results of several other points are also calibrated in the rviz according to the above steps, and the coordinates of the pose points are recorded. Then modify to the corresponding position。

1.3、Voice navigation

Terminal input,

x
ros2 launch yahboomcar_nav laser_bringup_launch.py
ros2 launch yahboomcar_nav display_nav_launch.py
ros2 launch yahboomcar_nav navigation_teb_launch.py

At this point, click on [2D Pose Estimate] in the rviz interface of the virtual machine, and then compare the pose of the car to mark the initial pose of the car on the map;

The display after marking is as follows:

image-20230530195115317

After marking, the display is as follows: Compare the overlap between the radar scanning point and the obstacle. You can set the initial pose of the car multiple times until the radar scanning point roughly coincides with the obstacle;

Terminal input,

xxxxxxxxxx
ros2 run yahboomcar_voice_ctrl voice_Ctrl_send_mark

Say "Hi Yahboom" to the voice module on the car, wake up the voice module, hear the feedback from the voice module that "it is", then continue to say "Go to the point A"; the voice module will feedback that "OK, I'm going to the point A.", and the car will start navigating to position one at the same time. Use the same method to navigate to other positions.

2、Code parsing

#Import voice library
from Speech_Lib import Speech
#Create a target topic publisher
self.pub_goal = self.create_publisher(PoseStamped, "/goal_pose", 1)
def voice_pub_goal(self):
    self.pose.header.frame_id = 'map'
    #Obtain voice commands
    speech_r = self.spe.speech_read() 
    # print("-------speech_r = ",speech_r)
    if speech_r == 19:
        print("goal to one")
        self.spe.void_write(speech_r)
        self.pose.header.stamp = Clock().now().to_msg()
        self.pose.pose.position.x = -7.1171722412109375
        self.pose.pose.position.y = -3.8613715171813965
        self.pose.pose.orientation.z = -0.6484729569092691
        self.pose.pose.orientation.w = 0.7612376922862854
        #Publish target point topic data
        self.pub_goal.publish(self.pose)
    elif speech_r == 20:
        print("goal to two")
        self.spe.void_write(speech_r)
        self.pose.header.stamp = Clock().now().to_msg()
        self.pose.pose.position.x = -5.434411525726318
        self.pose.pose.position.y = -3.575838088989258
        self.pose.pose.orientation.z = 0.041131907433507836
        self.pose.pose.orientation.w = 0.9991537250047569
        self.pub_goal.publish(self.pose)

 

Voice controlled car color tracking

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文