Setting Up Custom Media Display (new in Intera 5.5)

Created by Rico Stodt, Modified on Tue, 16 Aug, 2022 at 2:07 PM by Rico Stodt

This page provides a detailed tutorial about how to set up a custom media display. 


Contents


Overview


This tutorial shows how to create and display media on the Robot’s head screen with the Intera Insight panel using:

  • Uploaded Image: Load an image or gif to intera studio. During task execution, the loaded media is displayed continuously in a similar fashion to Sawyer’s eyes.
  • Static source: Fetch an image or gif from a local or remote source. The loaded media is static and cannot be changed during task execution.
  • Dynamic source: Fetch a video file from a string parameter that’s received from a TCP “device” connection. 

Prerequisites



Uploading Image

  1. Confirm that no task is running, and click the Insights panel (1) in Intera Studio.
  2. On the Insights panel, press the pencil mark icon (2) to load a file from your PC.
  3. Confirm that the SET box signed with an “X”.
  4. Run the task.
  5. Now you are able to watch the image you have uploaded on the head screen.


Insight Panel.png


Notes

  • Only one image can be loaded at a time. If you want to change the image, please repeat section 2.
  • The supported file types are only PNG & GIF (animated and still).
  • The file size should be less than 85 KB.
  • The recommended dimensions of the image to fit the screen are 1024x600 pixels.

Image from Static URL


Using an Image from a Remote Server (Static URL)


  • Confirm that no task is running.
  • Click the Insights panel (1) in Intera Studio.


Insight Panel Static URL.png


  • On the Insights panel, under the URL section, press the “EDIT” button (2) to edit the URL address.
  • In the URL field type the URL address leading to the image.

For example: “https://upload.wikimedia.org/wikipedia/commons/a/ae/ClickSmart_6.jpg”

  • Click “SAVE”.


Insight Panel Static URL Save.png


  • Confirm that the URL box signed with an “X”.


Insight Panel Static URL Section.png


  • Run the task.
  • Now you are able to watch the image from the static URL on the head screen.

 

Notes:

 

  • The supported file types are only PNG & GIF (animated and still).
  • The recommended dimensions of the image to fit the screen are 1024x600 pixels.

 

Using a Video or Image from a Local Server (Static URL)


  • First you should create and run a server. You can use our example for testing:
    1. Install node js on your computer (Windows, Linux).
      1. For Windows: 
        1. in a Powershell install Chocolatey
        2. Use Chocolatey to install nodist and nodejs 
          choco install nodist nodejs -y

      2. For Linux:
        1. Install nodejs
    2. Download archive file (link).
    3. Extract the archive file to a dedicated folder.
    4. Copy the images or videos to that same folder where the “server.js” file is located.
    5. Open a terminal or command prompt in the same folder as the files and the “Server.js”
    6. Type: “npm install” and press enter.
    7. Type: “node server.js” and press enter.


  • Confirm that the video or image are uploaded and available on the server:
    1. Open a new terminal or command prompt .
    2. Type: “ipconfig” (in windows) or “ifconfig” (in linux).
    3. Copy the ip address (example: “IPv4 Address: 172.20.30.90”).
    4. Open a browser.
    5. In the address type: “http://<IP address>:3005/<media filename>”  - For example: “http://172.20.30.90:3005/gif1.gif”
    6. Now you able to watch the video or image in the browser.
    7. Perform all the steps in section B above.

Notes


  • The supported file types are only PNG & GIF (animated and still) for images and MP4 & OGG for videos.
  • The recommended dimensions of the image or video to fit the screen are 1024x600 pixels. Videos were successfully tested with 25 & 30 FPS.

Dynamic URL


Using a Video from a dynamic URL (Using TCP/IP Signals)


  • First you should perform all the steps above.


IMPORTANT note: The static URL must be a video file (MP4 or OGG) and NOT an image file.

  • Define a TCP/IP signal
    • Confirm that no task is running.
    • Click the Device Gallery (figure 1: A) in Intera Studio.


Device Panel.png


  • On the Device Gallery, click the “+DEVICE” button (figure 1: B) to add a new device.
  • On the Device Editor, click “TCP/IP” button.


Device Panel TCP IP.png


  • On the new window Device Editor, type a name for your device for example “media_server” (figure 2: A).


Device Panel TCP IP Setting.png


  • In “Sawyer will” field, on the right side, click “⌄” to change to “receive connections” (figure 2: B).
  • Click the “SET” button (figure 2: C).
  • Click “EDIT” button for “DEFINE INPUT SIGNALS”.


Device Panel TCP IP Edit.png


  • In “Start Delimiter” field, on the right side, click “⌄” to change to “semicolon” (figure 3: A).


Device Panel TCP IP Set.png


  • Type a name for your signal (figure 3: B) for example “media_link”.
  • Click the “SET” button (figure 3: C).
  • Create and run a TCP/IP sender.

You can download and use our example script from this link

How to run the script:

  • Install python 3 on the computer 
  • Download and extract the script to a folder
  • Execute the script.
  • The script will ask you to type the IP addresses of the sawyer and the media server and their ports.
  • Type the filename of a media file that you know the server have and press enter. For example: video.mp4.
  • watch the sawyer change the head display to your file.


Note: In order to change the default values, open the script in a text editor and change the values in this section:

start_delimiter = ";" # Sawyer signal start delimiter

DEFAULT_SAWYER_IP = "172.20.30.188"

DEFAULT_SAWYER_PORT = "4000"

DEFAULT_SERVER_IP = "172.20.30.90"

DEFAULT_SERVER_PORT = "3007"

  • The signal is coming from a TCP/IP device that can be defined by using this guide.


Notice that

  • The Sawyer is set to receive connections on port 4000 by default
  • The signal to Sawyer as a string has to start with a semicolon,

for example: “;http://172.20.30.90/3007/video.mp4”.

  • If the connection with the signal sender is ok you will see a green dot to the right of the device name. If there is a problem, please check the following:
    • The signal sender is activated.
    • The correct robot IP is updated in the signal sender script.


Device Panel TCP IP Active.png


  • On the Insights panel, under the “Signal Name” section, press the “EDIT” button to edit the signal name.


Insight Panel Signal Name.png


  • Type the signal name as you have typed in section 2.j.
  • Click “SAVE”
  • Run the task.
  • Click Signal Name box, and confirm that it signed with an “X”.


Insight Panel Signal Name Set.png


  • Now, on the head screen, you are able to watch the video sent by the signal sender.


Note:

  • In this mode, when a task is started, the static URL video is the first video displayed; ensure that the first video URL signal sent through TCP/IP corresponds to the static URL.
  • There are limitations on resolution and FPS (Frames-per-second) rate on the media files. The recommendation is to use 1024x600 resolution files or less and 30 FPS max rate.
  • There are restrictions on media file types: The supported file types are only PNG & GIF (animated and still) for images and MP4 & OGG for videos.

 

 



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article