This ROS-Teaching-GUI was created to have a user-friendly solution for teaching robots during a robotics project in the masters course of UAS Technikum Vienna. Written in C++, ROS-Distro: Noetic, GUI-Framework: Qt5
The robots in the project have Makeblock Smart-Servos which are connected to a Arduino Mega. The Arduino-program publishes the current angle-values from the servos to a rostopic.
The Teaching-GUI subscribes to this topic, stores the values in a vector. The user can decide if the current pose has an active or ineffective endeffector.
If all poses are saved with the designated buttons the vector is saved in a txt-File, ready to be read. The teached routine can be executed with the "Load and Execute" button.
I want to share this project because I think that there are not many GUI examples for ROS (written in C++) out there. Adapt the code so it fits your needs.
Install ROS: http://wiki.ros.org/noetic/Installation/Ubuntu
Clone the repository into the source folder of your catkin workspace
Clone catkin_simple as well: https://github.com/catkin/catkin_simple
Build with:
catkin_make
Start with "Start"-Button
Bring the robot in the designated position
Save poses with "Save Pose with Endeffector OFF" or "Save Pose with Endefector ON"
Repeat until the routine is completed
Save the poses to a txt-File, change the name if you want
The txt-File is saved in the packages /path/ folder and can be loaded and executed with the "Load and Execute" Button
Template made with: http://wiki.ros.org/qt_create/Tutorials/Qt%20App%20Templates
Also based on: https://github.com/WelinLee/ROS_QT_GUI