Skip to content

A voice-controlled robot with Amazon Alexa to help users solve daily trifles

Notifications You must be signed in to change notification settings

yahsiuhsieh/alexabot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Alexabot

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.

Getting Started

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.

Hardware & Software Prerequisites

Experimental Process

layout

Mapping

Build a map in an unknown environment using keyboard teleoperation.

For detailed implementation, see this tutorial.

MQTT Connection

Connect ROS with AWS using MQTT protocol.

layout

  1. Go through this tutorial.

  2. 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

Amazon skills

Use the Alexa skills console to build a skill for Alexa.

  1. Read this tutorial and go through all steps in it.

  2. 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.

  3. To access the variables we stored, we use the AWS Lambda function to connect with the Alexa skill. Look here for more details.

Code organization

.
├── 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

Running the test

  1. Run the mosquitto
sudo mosquitto -c /etc/mosquitto/conf.d/bridge.conf
  1. Bring up the Turtlebot
roslaunch turtlebot_bringup minimal.launch
  1. Launch the amcl and specify your map file
roslaunch turtlebot_navigation amcl_demo.launch map_file:=/tmp/XXX.yaml
  1. Launch the Rviz and set the initial robot pose
roslaunch turtlebot_rviz_launchers view_navigation.launch
  1. Modify line 23 to your ip address and run voice_command.py
python voice_command.py
  1. Run controller.py, you may change the xy-coordinate of your interested points in the file
python controller.py

Results

  • You can find the result on Youtube.

Authors

About

A voice-controlled robot with Amazon Alexa to help users solve daily trifles

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published