T-Motor Controller
A Fast, Easy, and User Friendly way to control Robotics Actuators.
View Demo · Report Bug · Request Feature
Table of Contents
About The Project
This project provides an easy to use GUI to control the T-Motor brand Robotic Actuators (motors) with feedback Plotting and close to Real-time Control. The Web app uses a Remote Procedure Call module (RPC). This module connects to a server running on your local or remote linux machine. That machine is connected to the motor over CAN bus. For more explanation on the technical terms please read the Glossary or view the Documentation to understand more about the architecture of the software.
The GUI provides:
- Easy motor communication setup.
- Easily stop motor operation.
- Manual desired position input.
- An Easy way to Visualize Motor Angles, Velocities, and Torques.
- Visualize Desired values for Angles, Velocities, and Torques.
- Save session plots as PNG for further analysis.
- Set control parameters dynamically.
- CSV desired position input (planned for future).
Project Motivation
Working with hardware is usually a very daunting task and it involves debugging both your software and hardware simultaneously, Roboticists usually have to spend a ton of time just to get the actuators to work which sometimes even include writing their own libraries for the actuators instead of focusing on the research at hand AFTER the motor starts working. This is what sparked the idea for this project, for now we will be working with the T-motor brand of motors only since they are quite popular in robotics. Future plans will include expanding to other models/brands and motor types. The end goal is to help Roboticists focus on what matters in their research.
Built With
Getting Started
The Server side should be running on your desired remote (for example a raspberry pi) or local machine. and the client side can run from anywhere (even on windows).
Install Prerequisites
First you need to install Python 3.6 or higher, then you can install the requirements from the command below on both your remote and local machines.
the command should run in the same folder as the requirements.txt file, otherwise provide file path (i.e. "path/to/file/requirements.txt")
pip install -r requirements.txt
Installation
Clone the repo from the terminal if you have git, or simply click the "download ZIP" from github.
git clone https://github.com/SeifAbdElrhman/T-Motor-Controller.git
Server Initialization
Copy the Server side folder to your desired remote (or local) machine, and run the ServerHandler.py file using the following command.
python ./ServerHandler.py <ip_address> <port#>
Don't forget to substitue "<ip_address>" and "<port#>" with your actual IP and Port for the remote machine (for local machine you can use "127.0.0.1" without quotes as the IP)
GUI Initialization
Now you can run the client.py file on your client machine (this machine doesn't have to be linux) with the following command.
streamlit run client.py
if your terminal is open on the full project folder please provide the path as "./src/Clien\ side/client.py". if you have a different directory structure provide your own path to the client.py file.
Usage
To use the interface you can easily
- add IP and port of your server
- connect to your CAN interface
- send command to your motor
- plots will be updated automatically
A simple Gif of the operation steps is shown below, along with the photage of the physical motor (here the motor is attached to a manipulator to show the movement more clearly)
UI.mp4
Demo.mp4
Roadmap
Currently we are working on multiple variants of a specific model of T-motors (the QDD AK80-6T, AK80-9T, AK45, and the AK30). Later we will expand to more models of T-motor. and Eventually fork to other brands.
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated and will boost the development of the Robotics community.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
For any bugs, issues, additional features, please open an issue on github with a detailed description and a proper Tag. Or feel free to contact the developers of the project directly
License
Distributed under the MIT License. See LICENSE.txt
for more information.
Contact
Seif Farag - @FaragSeif - [email protected]
Nabila Adawy - @NabilaAdawy - [email protected]
Sherif Nafee- @Sh1co - [email protected]
Project Link: https://github.com/SeifAbdElrhman/T-Motor-Controller
Acknowledgements
- Thanks to Simeon Nedelchev for his amazing control Library - rPyControl