https://github.com/ami-iit/shinobi-robotics-research

Files and documentation on how to use the Shinobi Open-Source Video Management Software for Robotics Research.

https://github.com/ami-iit/shinobi-robotics-research

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.1%) to scientific vocabulary

Keywords

research robotics robotics-resources shinobi shinobicctv
Last synced: 11 months ago · JSON representation

Repository

Files and documentation on how to use the Shinobi Open-Source Video Management Software for Robotics Research.

Basic Info
  • Host: GitHub
  • Owner: ami-iit
  • License: bsd-3-clause
  • Language: MATLAB
  • Default Branch: main
  • Homepage:
  • Size: 17.6 KB
Statistics
  • Stars: 6
  • Watchers: 3
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
research robotics robotics-resources shinobi shinobicctv
Created about 5 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License

README.md

shinobi-robotics-research

Files and documentation on how to use the Shinobi Open-Source Video Management Software for Robotics Research.

This documentation are meant for installing a Shinobi instance on a private network, and do not convert the security implication of exposing a Shinobi instance on the public web.

Table of Contents

Install Shinobi

First of all, select a machine that will act as a NVR (Network Video Recorder). As Shinobi is quite an invasive software as it requires to install custom dependencies at the system level, it is extremly recommended to use a dedicated machine, and to start from a vanilla installation of Ubuntu 20.04. To install Ubuntu 20.04 on a new machine, please check the docs in https://ubuntu.com/tutorials/install-ubuntu-desktop .

Once you installed Ubuntu 20.04 on the machine, install Shinobi following the docs in https://shinobi.video/docs/start . The recommended installation strategy ("The Ninja Way") involve downloading and executing a script from the network, so make sure that the script is not doing anything dangerous from the safety and the security point of view. For all options, choose the default choice.

Access Shinobi and add Cameras

Once you installed Shinobi you should be able to access it on http://<ip_address>:8080 if you used the default settings, and you can access the admin interface at http://<ip_address>:8080/super. At this point, you can add to Shinobi all the cameras (that are called monitors, in Shinobi/CCTV jargon) that you want to use, following the official Shinobi docs at https://shinobi.video/docs/configure . If you correctly added two cameras and you enabled them, you should see something like this in Shinobi interface:

shinobi_example

Once you setup your cameras in Shinobi, you can then configure the Shinobi API to enable remote control of recording of the camera.

Automatic Start and Stop of Video Recording through Shinobi HTTP API

The Shinobi API is documented in https://shinobi.video/docs/api . It is a standard HTTP API, that can be access by any system with a working HTTP client, so basically any programming language. It can be used to start and stop recording of the video camera

To access the Shinobi API of a given Shinobi instance, you need the following info: * IP and Port in which Shinobi is available ([ADDRESS]). Example: http://10.0.0.1:8080/ * API Key ([API KEY]). Example: VwRCagLeIypSiEzp9LkKAZnCZ7rb46 * Group Key ([GROUP KEY]): Example: wuio1HKFc1

The Shinobi URL is the same one used to access Shinobi from the browser, while the API Key can be created and accessed via the API entry of Shinobi menu, while the Group Key can be found in "Settings".

Once you have this info, you can check that they are correct and get the list of active camera (aka monitors, in CCTV/Shinobi jargon) and its details in json format accessing simply from a browser: ~~~ http://[ADDRESS]/[API KEY]/monitor/[GROUP KEY] ~~~

If that it is working, you can save this info on your system by creating a shinobi-robotics-research-info.json in your Home directory (~ on Unix systems, %HOME% on Windows), with the necessary content: ~~~ { "shinobiurl": "http://10.0.0.1:8080", "shinobiapikey": "VwRCagLeIypSiEzp9LkKAZnCZ7rb46", "shinobigroup_key": "wuio1HKFc1" } ~~~

The Shinobi HTTP API can then be used with this data to automatically start and stop camera recording. While accessing HTTP servers is a capability provided in most programming languages and environments, as part of this repo we provide some helper libraries.

The helper libraries are available in the following languages:

MATLAB

Installation

First of all, clone this repo: ~~~ git clone https://github.com/dic-iit/shinobi-robotics-research ~~~

Then, add the shinobi-robotics-research/matlab directory to the MATLAB search path, using one of the available method. For example, you can simply add the directory to MATLABPATH environment variable and then launch MATLAB: ~~~ export MATLABPATH=$MATLABPATH:/shinobi-robotics-research>/matlab matlab ~~~

Example Usage

~~~matlab

Get Shinobi instance information from shinobi-robotics-research-info.json file

shinobiinfo = srr.loadinfo();

Get camera from the Shinobi server

camerasinfo = srr.getavailable_cameras();

Start camera recording

srr.startvideorecording(shinobiinfo, camerasinfo)

Do experiment

...

Stop camera recording

srr.stopvideorecording(shinobiinfo, camerasinfo) ~~~

Detailed Documentation

srr.load_info()

The information on the specific Shinobi instance can be read from the shinobi-robotics-research-info.json file in the home directory. ~~~

shinobiinfo = srr.loadinfo()

shinobi_info =

struct with fields:

      shinobi_url: 'http://10.0.0.1:8080'
  shinobi_api_key: 'VwRCagLeIypSiEzp9LkKAZnCZ7rb46'
shinobi_group_key: 'wuio1HKFc1'

~~~

The values of this structure can also be set directly in the code, even if this is tipically not recommended as this kind of metadata is setup-specific: ~~~ shinobiinfohardcoded.shinobiurl = 'http://10.0.0.1:8080'; shinobiinfohardcoded.shinobiapikey = 'VwRCagLeIypSiEzp9LkKAZnCZ7rb46'; shinobiinfohardcoded.shinobigroup_key = 'wuio1HKFc1'; ~~~

All other methods will take in input an instance of this info structure.

Access recorded video

The video recorded by Shinobi are then available directly from the Shinobi web ui, see for example (in this case, I had recorded 4 videos):

shinobi_access_video1 shinobi_access_video2 shinobi_access_video3 shinobi_access_video4

Furthermore, the video can be also accessed, downloaded and deleted via Shinobi HTTP API as well, see https://shinobi.video/docs/api#content-modifying-a-video-or-deleting-it . This can be useful to then automatically transfer videos to another location once the experiments are done, but this functionality is not provided in the helper libraries provided in this repo, as tipically the storage backend may vary from research lab to research lab. However, the already provided helper libraries can be used to understand how to access the HTTP API from the selected language.

Owner

  • Name: Artificial and Mechanical Intelligence
  • Login: ami-iit
  • Kind: organization
  • Location: Italy

GitHub Events

Total
  • Fork event: 1
Last Year
  • Fork event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 3
  • Total Committers: 1
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Silvio Traversaro s****o@i****t 3
Committer Domains (Top 20 + Academic)
iit.it: 1

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 3
  • Total pull requests: 1
  • Average time to close issues: 39 minutes
  • Average time to close pull requests: less than a minute
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 1.67
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • traversaro (3)
Pull Request Authors
  • traversaro (1)
Top Labels
Issue Labels
Pull Request Labels