A real-time control interface for the Anveshak Mars Rover with WiFi command dispatching.
- 🕹️ Joystick Control - Analog movement control
- 🔧 Science Operations - Drill, collection system, sample analysis
- 📊 System Monitoring - Battery, power, temperature
- 📡 Data Transmission - Camera feed controls
- 🎯 Individual Wheel Control - Precise movement
- 🤖 Autonomous Mode - GPS-based navigation
- 📶 WiFi Command Dispatch - Real-time WebSocket communication
- Install dependencies:
npm install- Run development server:
npm run dev- Open browser at
http://localhost:5173
- Install Python WebSocket library:
pip install websockets-
Copy
rover_server.pyto your rover -
Run the server:
python rover_server.py- Note the IP address shown (e.g.,
192.168.1.100)
- Ensure both devices are on the same WiFi network
- In the web interface, enter the rover's IP address in the "Rover Connection" panel
- Click "Connect"
- Status will show "CONNECTED" when link is established
- All commands will now be transmitted to the rover in real-time
Commands are sent as JSON over WebSocket:
{
"id": "uuid",
"command": "JOYSTICK_MOVE",
"data": {
"x": 0.5,
"y": -0.3
},
"timestamp": "2025-12-01T12:00:00.000Z",
"status": "sent"
}JOYSTICK_MOVE- Movement control (x, y coordinates)STEERING_MODE- Ackerman/Independent steeringDRILL_SPEED- Drill speed control (0-100%)DRILL_TOGGLE- Enable/disable drillLINEAR_ACTUATOR- Collection system actuatorSUCTION_SYSTEM- Suction on/offWATER_DISPENSE- Water sprinklerTEST_TUBE_ROTATE- Sample carousel rotationWHEEL_SPEED- Individual wheel speedWHEEL_DIRECTION- Individual wheel directionCAMERA_FEED- Toggle camera streamsAUTONOMOUS_MODE- GPS navigation- And more...
- Use rover's local IP (e.g.,
192.168.1.100) - Default port:
8080
- Set up port forwarding on rover's router
- Use public IP or domain name
- Consider VPN for security
Edit rover_server.py to implement your specific rover hardware control:
- Motor controllers
- Sensor interfaces
- Camera systems
- Drill mechanisms
- etc.
Connection Failed:
- Check both devices are on same network
- Verify rover server is running
- Check firewall settings
- Confirm IP address is correct
Commands Not Working:
- Check browser console for errors
- Verify WebSocket connection status
- Check rover server logs
- Frontend: SvelteKit, Tailwind CSS, Lucide Icons
- Communication: WebSocket
- Backend: Python (websockets library)
MIT