Linuxslate.com Forums
http://linuxslate.com/cgi-bin/forum/YaBB.pl Original Projects and Builds >> Other Builds and Projects >> Telepresence Robot Build - With Code! http://linuxslate.com/cgi-bin/forum/YaBB.pl?num=1640407632 Message started by Administrator on Dec 24th, 2021, 11:47pm |
Title: Telepresence Robot Build - With Code! Post by Administrator on Dec 24th, 2021, 11:47pm My son built a Simple Telepresence Robot for a Summer / Stay-at-Home project. What follows here will be a basic description of the Design, the Finished Robot, and a Basic Description of the Code. http://linuxslate.com/IMG_TPR_Small.jpg Basic Telepresence Robot. Photo property of Linuxslate.com Design Goals for a Basic Telepresence (https://en.wikipedia.org/wiki/Telepresence) Robot:
Use Cases: What is different about a Telepresence Robot, and a "normal" Zoom Call, or other Teleconference? The main difference is that the remote user can move around an area at the remote location; much as the remote person could if they were actually present. Here are some possible scenarios to help the reader understand the difference between Telepresence and a Teleconference.
http://linuxslate.com/IMG_TPR2_Small.jpg Implementation:
In the next section, we will talk about the software implementation. |
Title: Re: Telepresence Robot Build - With Code! Post by Administrator on Dec 25th, 2021, 12:30am In this section, I will describe the Robot Control Software. A Few Words about Security: Before I begin discussing the software, I should emphasize that this is a home (hobbyist) project. It is not a commercial product nor intended to be one.
In other words: Don't implement what is described below in a secure network, or as a commercial product. Think when you build software. User Interface: As mentioned in the previous post, the Telepresence Robot may be located far away from the operator. This means that common remote control methods such as those used for a Radio Controlled (R/C) car or a connection over Bluetooth would not be applicable. However, basic Bluetooth code such as found here (https://create.arduino.cc/projecthub/samanfern/bluetooth-controlled-car-d5d9ca) was used as a starting point. It was also desired to have the Robot Control universally accessible, and not require software development on multiple platforms or operating systems. http://linuxslate.com/IMG_TPR3_Small.jpg User Interface during use of the Telepresence Robot. Image property of Linuxslate.com This means that the Robot Control is via a web app that resides on the robot. All one has to do is initiate a standard HTTP connection to the robot's address, and they will be presented with the interface shown above. Note that the person-to-person interface is provided by a Google Hangouts session in another window. Implementing the user interface in this manner was more complex than originally thought. It is implemented as a ESP8266WebServer running on the ESPDuino board. The ESPDuino web server delivers an HTML page that in turn contains CGI and Javascript. The concept of Javascript and CGI embedded in HTML, which in turn is embedded in Arduino C code was a bit much for my son to follow, and frankly a stretch for my programming skills. I'll just say that both of us got really good at reading through several levels of escape characters. Esentially, movement is controlled by starting the respective motors on a mouse down event, and the motors are stopped on a mouse up event for each button. An iFrame at the top contains the separate video connection, and another iFrame just below that serves as a basic instrument panel showing the main battery voltage and the strength of the wireless signal. In the next post: The Code. |
Title: Re: Telepresence Robot Build - With Code! Post by Administrator on Dec 25th, 2021, 1:41pm Comments on The Code. This is post #3 of this thread. The code is too large to fit in a post. A public version can be downloaded here (http://linuxslate.com/files/ESP8266_NodeMCU_WIFI_robo_car_web_Public.ino). (<---Link to be added soon)
Navigation Camera Setup: As mentioned, the Navigation Camera is implemented via an inexpensive webcam connected to an OpenWRT mini-router. If the OpenWRT router you use is not for configured for the web cam, details can be found here (https://openwrt.org/docs/guide-user/hardware/video/webcam), and will not be further covered in this thread. Deficiencies and Improvements: (No special order)
Join in the Discussion! Are you building a simiar project? Using some or all of the provided code? Suggestions for improvements? Please email "john" at this domain, and I will create an account for you. You email will not be made public. |
Title: Re: Telepresence Robot Build - With Code! Post by Administrator on Dec 29th, 2021, 10:22pm 20 x 4 LCD Display It has been mentioned previously in this thread that it would be desirable to have a simple display on the Telepresence Robot for information like the Robot's IP address, battery voltage, etc. It may also be useful to allow the remote user to display simple messages such as the remote user's name, or the organization the remote user represents. To this end, I went to Sky Craft Surplus (https://skycraftsurplus.com/) in Orlando, FL., and purchased 2 LCD displays. This post will concentrate on a 20 character x 4 line display that was inside some sort of digital audio device. The surplus device was being sold for US$ 9.95. So in addition to the display, I got the steel chassis, a small PC-like power supply, an optical drive, fan, and various other potentially useful parts. The display is very similar to the one shown here: http://linuxslate.com/20x4 display.jpg 20 x 4 Alpha-numeric LCD display removed from surplus equipment I had quite a bit of difficulty finding the Datasheet for this display, or any specific information on connecting it to common Arduino modules. So I thought I would do a simple write up on getting these boards working with Arduino.
Here is the pinout from the Datasheet and corresponding Arduino Pins and Functions: Code:
The code is equally simple. These displays work with the standard Arduino provided LiquidCrystal Library (https://www.arduino.cc/en/Reference/LiquidCrystal); however, some special characters or display functions may need changes to code to appear on the display as desired. Here is sample code to display a childish message using all 4 lines (rows) of the display: Code:
http://linuxslate.com/20x4 display_2.jpg The display connected to an Arduino Nano, and displaying a childish message. Another note on the picture: -- Yes, I tack soldered the wires directly to the Arduino Nano. Pins and connectors would have been better, but this was just for a quick test. It will be properly connected to the pins on the ESPDuino on the Robot. The holes on the Arduino NANO can be easily cleaned, and pins soldered in. -- This requires almost all of the digital I/O pins, but most of the pins used on the Robot currently are Analog pins. I don't anticipate a problem, but the actual design of connecting the LCD to the Robot has not been done yet. -- Another solution would be to leave the LCD connected to the NANO, and write a simple serial or I2C - to - parallel program, but in addition to the extra hardware, this would require maintenance of 2 sets of code. Look for an update -- and updated Robot code -- once the LCD is attached to the robot. |
Title: Re: Telepresence Robot Build - With Code! Post by Administrator on May 18th, 2022, 12:14pm There is an effort here at Linuxslate.com to make this project work more like a commercial product. What does "Work more like a commercial product" mean?
Implementing the above has proven a challenge, and we are definitely moving forward in a 3 steps forward 2 steps back fashion.
|
Linuxslate.com Forums » Powered by YaBB 2.1! YaBB © 2000-2005. All Rights Reserved. |