Robotics
Voice-Command Control of a ROS Wheelchair
Isolated spoken commands are recognized on a laptop microphone and converted into velocity references for the simulated wheelchair in Gazebo.

Technologies
Tags
Description
The recognizer node captures audio from the laptop microphone through linuxrec.c, samples the signal and compares it with the stored command templates. A match is published as a string on /voiceWords. The voice_cmd node (sub_word in the node graph) subscribes to that topic, maps the string to an integer command and publishes cmd_vel, which drives the wheel joints in Gazebo through the state publishers.
The vocabulary is trained for Forward, Backward, Left, Right and Stop, and a "Go" keyword activates the subscribing node. An input that does not match a stored command is rejected and the loop returns to listening, so only exact matches produce motion.
Pipeline
- Microphone: laptop mic, audio capture in C.
- Recognizer: samples the signal and matches stored commands.
/voiceWords: the recognized string, published to ROS.voice_cmd: subscriber that turns the string into an integer command.cmd_vel: the velocity command to the wheelchair in Gazebo.
What I did
- Wrote the audio-capture code (
linuxrec.c, C) that takes the voice input from the laptop microphone. - Built the recognizer node that matches the input against the stored command set and publishes the result on
/voiceWords. - Built the
voice_cmdsubscriber node that converts the recognized string to an integer command and publishescmd_vel. - Tested the commands in Gazebo with different participants and measured accuracy and response time.
Results
| Voice command | Accuracy |
|---|---|
| Robot Forward | 70% |
| Robot Left | 60% |
| Robot Right | 50% |
| Robot Stop | 80% |
- Tested with ten inputs and different participants; a command is detected independently of the speaker if it is pronounced in the trained language.
- Latency from input to wheelchair motion is about 5 s.
- Left and right fail most often, probably because of accent and pronunciation. The results come from simulation and may differ on a real wheelchair.
Future improvements
A more natural speech API (Google Voice) or NLP, and more training data.