The target of Alexabot is to receive the command from humans, extract the useful information from human's response such as the destination, and move to the assigned position. It is an autonomous navigation system built on the Turtlebot ros navigation stack. This package uses voice-based control, processing verbal sequences with Alexa skills, and delivering commands via MQTT protocol.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- Ubuntu - 14.04
- ROS - Indigo
- MQTT - 1.6
- Turtlebot - Turtlebot2
- Amazon Echo Dot - Buy on Amazon
- Amazon Web Services - Create an AWS account
Build a map in an unknown environment using keyboard teleoperation.
For detailed implementation, see this tutorial.
Connect ROS with AWS using MQTT protocol.
-
Go through this tutorial.
-
Some steps in the above tutorial do not work in my situation, listed below:
-
Replace
rootCA.pem
file with this rootCA.pem file. -
Replace
private.key
file with this private.pem.key file. -
Replace
cert.crt
file with this certificate.pem.crt file. -
Modify the following lines in the configuratoin file
/etc/mosquitto/conf.d/bridge.conf
.
address XXXXXXXXXX-ats.iot.eu-central-1.amazonaws.com:8883
-----
# Path to the PEM encoded client certificate
bridge_certfile /etc/mosquitto/certs/certificate.pem.crt
# Path to the PEM encoded client private key
bridge_keyfile /etc/mosquitto/certs/private.pem.key
-
Instead of running mosquitto in the background, run this command to see the log messages.
sudo mosquitto -c /etc/mosquitto/conf.d/bridge.conf
-
if the system shows the port 1883 is already in used, try the following commands.
sudo lsof -t -i:1883
sudo kill -9 XXX
sudo services mosquitto stop
Use the Alexa skills console to build a skill for Alexa.
-
Read this tutorial and go through all steps in it.
-
Since that we need a place to store variables, it requires the Amazon S3, the service in AWS. Therefore, we need an AWS account to access these functions. For more details, visit here.
-
To access the variables we stored, we use the AWS Lambda function to connect with the Alexa skill. Look here for more details.
.
├── alexa_voice_model # Alexa Skills scripts
│ ├── lambda_function_call.py
│ ├── lambda_function_info.py
│ ├── lambda_function_template.py
│ └── lambda_rate.py
├── alexabot # Turtlebot scripts
│ ├── CMakeLists.txt
│ ├── package.xml
│ ├── src # Source scripts folder
│ │ ├── voice_command.py # Subscribe topics from MQTT broker and publish ROS service
│ │ └── controller.py # Subscribe ROS service and publish navigation goal
│ ├── srv # ROS service folder
│ └── Command.srv # command service
└── README.md
- Run the mosquitto
sudo mosquitto -c /etc/mosquitto/conf.d/bridge.conf
- Bring up the Turtlebot
roslaunch turtlebot_bringup minimal.launch
- Launch the amcl and specify your map file
roslaunch turtlebot_navigation amcl_demo.launch map_file:=/tmp/XXX.yaml
- Launch the Rviz and set the initial robot pose
roslaunch turtlebot_rviz_launchers view_navigation.launch
- Modify line 23 to your ip address and run
voice_command.py
python voice_command.py
- Run
controller.py
, you may change the xy-coordinate of your interested points in the file
python controller.py
- You can find the result on Youtube.
- Arthur Hsieh - Initial work - arthur960304
- Henry Liu - Initial work - coldhenry