Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
change to service and actionlib
  • Loading branch information
tianb03 authored Dec 24, 2019
1 parent 5574c03 commit 00c69ee
Showing 1 changed file with 44 additions and 14 deletions.
58 changes: 44 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:=<wifi ssid> password:=<wifi 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
```
Expand All @@ -44,18 +50,31 @@ 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

```
roslaunch rosecho rosecho.launch
roslaunch turtlebot_stage turtlebot_in_stage.launch
roslaunch rosecho demo.py
rosrun rosecho demo.py
```


Expand All @@ -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
Expand Down

0 comments on commit 00c69ee

Please sign in to comment.