From 00c69eea698473aaa431965a5b65c971784dfd65 Mon Sep 17 00:00:00 2001 From: tianb03 Date: Tue, 24 Dec 2019 15:44:56 +0800 Subject: [PATCH] Update README.md change to service and actionlib --- README.md | 58 +++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 95bd159..cce9519 100644 --- a/README.md +++ b/README.md @@ -23,18 +23,24 @@ cd ~/catkin_ws && catkin_make Make sure the power supply and usb connection are correct. ### Start ROSECHO node -When first time use, remember to setup the wi-fi connection of ROSECHO. +Launch the ROSECHO. ``` -roslaunch rosecho rosecho.launch ssid:= password:= +roslaunch rosecho rosecho.launch +``` +The default serial port is /dev/ttyUSB0, if serial open failed, pls check the port used by ROSECHO +If it is /dev/ttyUSB1, you can change the launch file or launch use the command as follows +``` +roslaunch rosecho rosecho.launch serial_port:=/dev/ttyUSB1 ``` -To enable wifi config, publish 'wifi' to /rosecho/cfg topic. Later this function may change to service. +To enable wifi config, call the wifi_cfg service. ``` -rostopic pub /rosecho/cfg std_msgs/String "data: 'wifi'" +rosservice call /rosecho/wifi_cfg "ssid: 'tianbot' password: 'www.tianbot.com'" ``` +You can use Tab to auto-complete the command and then fill in the ssid and password. -check the tts result +check the automated sound recognition result ``` rosrun rosecho asr_echo.py ``` @@ -44,10 +50,23 @@ check the answer rosrun rosecho answer_echo.py ``` -send tts to rosecho +send tts to rosecho/tts/goal ``` -rostopic pub /rosecho/tts std_msgs/String "data: '你好机器人'" +rostopic pub /rosecho/tts/goal rosecho/ttsActionGoal "header: + seq: 0 + stamp: + secs: 0 + nsecs: 0 + frame_id: '' +goal_id: + stamp: + secs: 0 + nsecs: 0 + id: '' +goal: + text: '你好机器人'" ``` +You can use Tab to auto-complete the command and then fill in the goal: text: '你好机器人' ### Simple Demo Voice command test in turtlebot stage @@ -55,7 +74,7 @@ Voice command test in turtlebot stage ``` roslaunch rosecho rosecho.launch roslaunch turtlebot_stage turtlebot_in_stage.launch -roslaunch rosecho demo.py +rosrun rosecho demo.py ``` @@ -66,16 +85,27 @@ roslaunch rosecho demo.py The answer returned by iflyos - /rosecho/asr voice recognized result -- /rosecho/status -The ROSECHO operation status - /rosecho/wakeup_pos Position of the speaker when wakeup. -### Subscribed -- /rosecho/tts +## Actions +Actionlib also use topic to transfer data. +- /rosecho/tts/feedback +- /rosecho/tts/result +- /rosecho/tts/status +The ROSECHO tts status + +- /rosecho/tts/goal The text to speech topic -- /rosecho/cfg -Config. Later will change to service. +- /rosecho/tts/cancel +Cancel goal + +## Services +- /rosecho/disable +- /rosecho/enable +- /rosecho/sleep +- /rosecho/wakeup +- /rosecho/wifi_cfg ## License