Close
0%
0%

STS-PiLot Robotics Remote Control

Remote control web interface with live video for Raspberry Pi Robots

Similar projects worth following
STS-PiLot provides a remote control web interface with live video for rovers using the Pimoroni Explorer HAT / pHAT interface or other IO hardware. Thanks to the availability of generic webcam support via OpenCV and a dummy IO interface it is now possible to run the application on most Linux computers and without or different IO hardware - not just Raspberry Pis.
The interface is responsive and works with Desktops / Laptops, Tablets and Phones both in portrait and landscape screen orientation.
Sensor readouts from I/O ports are provided in a HUD style overlay.
This is an educational application with the focus on keeping the code simple and understandable. The live streaming part is based on the example code provided by Miguel Grinberg https://github.com/miguelgrinberg/flask-video-streaming. For better stability and performance network connectivity is provided by the

Main features of the software:

  • Responsive (portrait and landscape mode) AJAX interface for use on desktops, laptops, tablets and phones.
  • Designed for Pimoroni STS-Pi and Explorer Hat Pro as hardware interface, but can be adapted to run without IO hardware or using other boards.
  • Frontend requires only HTML, Javascript and CSS - no proprietary plugins needed.
  • Works without modification when no Raspberry Pi camera is detected - But you are missing something!
  • Easy web-API to control the robot from your own application.
  • API provides JSON readout of analog and digital inputs.
  • API provides both "tank track" style (Y-Y) and joystick style (X-Y) interface.
  • Robot stops automatically when connection is lost.
  • Data and video connection is automatically reestablished after connection loss.
  • Example client application to control STS-PiLot with a Joystick or Gamepad from a remote computer.

The code with installation instructions can be downloaded / cloned from https://github.com/mark-orion/STS-PiLot

A video showing STS-PiLot in action. The user interface has been updated both in design and functionality since this video was recorded:

Here are some screenshots of the actual design in both portrait and landscape mode:
Portraid mode on an Android phone (Fairphone 2):

Landscape mode:

  • 1 × Raspberry Pi 3 or Zero (W)
  • 1 × STS-Pi rover kit (or any other 2 wheel robot kit)
  • 1 × Explorer HAT Pro (interface board)
  • 1 × Cylindrical USB battery
  • 1 × Raspberry Pi camera module

  • Client program for Joystick and Gamepad support

    Mark Dammer04/25/2017 at 19:04 0 comments

    I have added the "client" folder to the github repo. This folder will contain example client programs to control or communicate with STS-PiLot from another computer.

    The first program joystick.py allows you to control your STS-Pi or other two wheeler running STS-PiLot with a joystick or gamepad.

  • PiWifiCam: Use your Raspberry Pi as a simple IP camera

    Mark Dammer04/22/2017 at 11:57 0 comments

    I have created a "video only" version of STS-Pilot that allows a Raspberry Pi to be used as a simple IP camera: PiWifiCam

  • Bugfix: No more caching problems on some (mobile) browsers

    Mark Dammer04/22/2017 at 11:53 0 comments

    Some (mainly mobile) web browsers did not update the video when the slower, single threaded video interface was used. This was caused by the browser caching the jpeg image instead of reloading it. The problem is now solved.

  • Live video from Pi Zero (W) with non-threaded video capture

    Mark Dammer03/24/2017 at 12:10 0 comments

    Pi Zero W with camera and Explorer pHAT

    It is now possible to run STS-PiLot on a Pi Zero (W) with live video. The latest software version contains an additional non-threaded video feed that puts less strain on systems with lower CPU specs.

    Use the following URL syntax to use it:

    http://[your pi's ip]:5000/?video=[msecs]
    [msecs] sets the minimum delay between frame captures in milliseconds. Example:
    http://192.168.1.23:5000/?video=100 will provide a video display with about 10 frames per second.

    How does it work:

    http://[your pi's ip]:5000/single_frame.jpg provides a single JPEG frame on every call to the URL.

    The javascript program that runs within your browser calls this URL every [msecs].

    This functionality is available in both the Pi Camera and the OpenCV generic camera interface.

    You still get the threaded, high framerate, low latency, higher CPU interface when using the base URL without arguments: http://[your pi's ip]:5000

    And this is the Polulu ZUMO chassis featuring a Pi Zero W with live camera feed and Explorer pHAT that had its first public appearance at Moray Coder Dojo yesterday:

  • io_wrapper.py and io_wrapper_dummy.py

    Mark Dammer03/15/2017 at 21:20 0 comments

    All native Explorer HAT calls have been moved to io_wrapper.py. This makes adapting the program for other hardware easier.

    io_wrapper_dummy.py uses no specific hardware at all and can be used for testing and playing around on any Linux computer. Instead of interacting with hardware calls to the motors and outputs are logged to STDOUT. The dummy "inputs" just return random numbers or logic levels that are displayed on the HUD overlay.

  • Generic Webcam support via OpenCV

    Mark Dammer03/15/2017 at 21:17 0 comments

    I have added a file camera_cv.py. This module uses OpenCV to connect any V4L compatible camera (like webcams) to STS-PiLot.

  • Successful tests with Pi Zero W

    Mark Dammer03/06/2017 at 10:33 0 comments

    I have done some successful tests with the new Pi Zero W and the Explorer pHAT interface over the weekend.

    All works well and despite the missing LEDs and touchpads the Explorer pHAT works out of the box without any needs to modify the software.

    Still waiting for the Pi Zero camera to arrive this week :-)

  • Successful tests with Pi Zero W

    Mark Dammer03/06/2017 at 10:32 0 comments

    I have done some successful tests with the new Pi Zero W and the Explorer pHAT interface.

    All works well and despite the missing LEDs and touchpads the Explorer pHAT works out of the box without any needs to modify the software.

    Still waiting for the Pi Zero camera to arrive this week :-)

View all 8 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates