A ROS2 (Robot Operating System 2) project providing graphical user interfaces for controlling and monitoring TurtleBot3 robots.
This project contains multiple packages for interfacing with TurtleBot3 robots through ROS2:
- tb3_gui: Python-based GUI using PyQt5 for robot control and visualization
- Real-time Odometry Display: Shows current robot position (x, y coordinates)
- Velocity Control: Interactive buttons for forward/backward movement and rotation
- Speed Control: Adjustable sliders for linear and angular velocities
- Live Velocity Graphs: Real-time visualization of linear and angular velocities
- Trajectory Mapping: Interactive plot showing robot's movement path
- Dark Theme: Modern dark UI design
- ROS2 (Humble or later recommended)
- Python 3.8+
- PyQt5 (for tb3_gui)
- TurtleBot3 packages for ROS2
# For tb3_gui
pip install PyQt5 matplotlib numpy
# For ROS2
sudo apt install ros-humble-desktop
sudo apt install ros-humble-turtlebot3*-
Clone the repository:
git clone <repository-url> cd ros_tb3
-
Build the packages:
colcon build
-
Source the workspace:
source install/setup.bash
# Terminal 1: Launch TurtleBot3 simulation
ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
# Terminal 2: Run the GUI
ros2 run tb3_gui tb3_gui_node- Forward: Move robot forward at selected linear speed
- Backward: Move robot backward at selected linear speed
- Left: Rotate robot counter-clockwise at selected angular speed
- Right: Rotate robot clockwise at selected angular speed
- Stop: Immediately halt all robot movement
- Linear Speed Slider: Controls forward/backward movement speed (0-1.0 m/s)
- Angular Speed Slider: Controls rotation speed (0-1.0 rad/s)
- Velocity Graph: Shows real-time linear and angular velocity
- Trajectory Plot: Displays robot's path over time
- Odometry Display: Current position coordinates
ros_tb3/
├── src/
│ ├── tb3_gui/ # Python GUI package
│ ├── package.xml
│ ├── setup.py
│ └── tb3_gui/
│ └── tb3_gui_node.py
├── build/ # Build artifacts (ignored)
├── install/ # Installation files (ignored)
├── log/ # Log files (ignored)
├── .gitignore
└── README.md
/odom(nav_msgs/Odometry): Robot odometry information
/cmd_vel(geometry_msgs/Twist): Velocity commands to robot
# Clean build
rm -rf build/ install/ log/
colcon build --cmake-clean-cachecolcon test
colcon test-result --verbose# Python
black src/tb3_gui/
flake8 src/tb3_gui/- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the [LICENSE] - see the LICENSE file for details.
- Built for TurtleBot3 platform
- Uses ROS2 for robot communication
- PyQt5 for Python GUI development
- Matplotlib for data visualization
Note: This project is designed for ROS2 and TurtleBot3. Make sure you have the appropriate TurtleBot3 packages installed before running.