Setting Up Custom Media Display

Revision as of 06:40, 11 October 2021 by Sdkuser (talk | contribs) (Note)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation , search

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.


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)

  1. Confirm that no task is running.
  2. Click the Insights panel (1) in Intera Studio.
    Insight Panel Static URL.png
  3. On the Insights panel, under the URL section, press the “EDIT” button (2) to edit the URL address.
  4. 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”
  5. Click “SAVE”.
    Insight Panel Static URL Save.png
  6. Confirm that the URL box signed with an “X”.
    Insight Panel Static URL Section.png
  7. Run the task.
  8. Now you are able to watch the image from the static URL on the head screen.
    Notes
    • The URL is refreshed on start and every 1 hour. If the content is changed on that same URL it will refreshed within an hour.
    • Using this method let you choose only one URL address at a time. In case you would like to change the URL address you should repeat this process.
    • 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 an image from a local server (static URL)

  1. First you should create and run a server. You can use our example for testing:
    1. Install node js on your computer (windows, linux).
    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.
  2. 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.
  3. Perform all the steps in section B above.
    Notes
    • The URL is refreshed on start and every 1 hour. If the content is changed on that same URL it will refreshed within an hour.
    • Using this method let you choose only one URL address at a time. In case you would like to change the URL address you should repeat this process.
    • There is an option for a dynamic URL setting (ONLY for video files), for more details please see section D below.
    • 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)

  1. First you should perform all the steps in section C above.
    IMPORTANT note: The static URL must be a video file (MP4 or OGG) and NOT an image file.
  2. Define a TCP/IP signal
    1. Confirm that no task is running.
    2. Click the Device Gallery (figure 1: A) in Intera Studio.
      Device Panel.png
    3. On the Device Gallery, click the “+DEVICE” button (figure 1: B) to add a new device.
    4. On the Device Editor, click “TCP/IP” button.
      Device Panel TCP IP.png
    5. 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
    6. In “Sawyer will” field, on the right side, click “⌄” to change to “receive connections” (figure 2: B).
    7. Click the “SET” button (figure 2: C).
    8. Click “EDIT” button for “DEFINE INPUT SIGNALS”.
      Device Panel TCP IP Edit.png
    9. In “Start Delimiter” field, on the right side, click “⌄” to change to “semicolon” (figure 3: A).
      Device Panel TCP IP Set.png
    10. Type a name for your signal (figure 3: B) for example “media_link”.
    11. Click the “SET” button (figure 3: C).
  3. Create and run a TCP/IP sender.
    You can download and use our example script from this link
    How to run the script:
    1. Install python 3 on the computer (Link to a guide)
    2. Download and extract the script to a folder
    3. Execute the script.
    4. The script will ask you to type the IP addresses of the sawyer and the media server and their ports.
    5. Type the filename of a media file that you know the server have and press enter. For example: video.mp4.
    6. 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"
  4. 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”.
  5. 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
  6. On the Insights panel, under the “Signal Name” section, press the “EDIT” button (figure 4: A) to edit the signal name.
    Insight Panel Signal Name.png
  7. Type the signal name as you have typed in section 2.j.
  8. Click “SAVE”
  9. Run the task.
  10. Click Signal Name box, and confirm that it signed with an “X”.
    Insight Panel Signal Name Set.png
  11. 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.


Additional Resources