A versatile web-based control system for a gantry robot simulation. This project features a modern web interface for robot control, a Node.js WebSocket server for real-time communication, and a Python controller that integrates with the Webots robotics simulation environment.
The main objective of this project is to create a control system that:
- Provides intuitive remote control of a gantry robot simulation
- Enables real-time communication between the user interface and robot
- Offers precise control over multiple robot components
- Works seamlessly across different devices and platforms
demo1.mp4
- Gantry movement (left/right)
- Bridge movement (forward/backward)
- Lift control (up/down)
- Turret rotation
- Gripper operation (open/close)
- WebSocket-based instant response
- Continuous state updates
- Automatic reconnection handling
- Emergency stop functionality
- Movement deadzone for stability
- Speed limitations for controlled operation
- Position clamping for lift mechanism
- Touch-friendly mobile design
- Visual feedback for button states
- Connection status indicator
- Intuitive control layout
- Network disconnection recovery
- Motor fault protection
- Invalid command filtering
- Comprehensive error reporting
- HTML5
- CSS3 (with responsive design)
- Vanilla JavaScript (ES6+)
- WebSocket API
- Node.js
- Express.js
- ws (WebSocket library)
- Compression middleware
- Python 3.x
- websockets library
- Webots Controller API
- asyncio for asynchronous operations
- Python 3.x
- Node.js and npm
- Webots robotics simulator
- A modern web browser
Clone the repository: git clone https://github.com/your-username/gantry-controller.git cd gantry-controller
Install server dependencies: cd server npm install
Start the WebSocket server: npm start
Ensure you're in the project root: cd gantry-controller
Install Python dependencies: pip install websockets
Note: The controller will be loaded by Webots automatically when you run the simulation
- Local development: Open http://localhost:3000 in your browser
- Deployed version: Visit the Railway-hosted URL (when deployed)
- Start the Webots simulation with the gantry robot
- Launch the WebSocket server
- Open the web interface in your browser
- Use the control buttons to operate the robot:
- Left/Right arrows for gantry movement
- Forward/Back for bridge control
- Up/Down for lift operation
- Rotation controls for turret
- Open/Close buttons for gripper control
The system can be configured through various parameters:
- CONTROL_STEP: Response time for robot updates (ms)
- MAX_SPEED values for different components
- DEADZONE: Minimum input threshold
- WebSocket connection settings
Contributions are welcome! Please feel free to:
- Fork the repository
- Create a feature branch
- Make your improvements
- Submit a pull request
- The WebSocket server implements basic security measures
- Client input validation prevents invalid commands
- Error handling protects against malformed data
- The system is designed for controlled network environments
- Add authentication for remote access
- Implement custom control profiles
- Add motion recording and playback
- Create a virtual robot position display
- Add support for multiple simultaneous connections
- Implement emergency stop broadcasting
This project was developed as part of a robotics control system demonstration, showcasing the integration of web technologies with robotic simulation. The system demonstrates real-time control capabilities, robust error handling, and responsive user interface design.
The project emphasizes practical aspects of robotics control, including:
- Real-time communication architecture
- Safety-first design principles
- Cross-platform compatibility
- User-friendly interface design