Coder Social home page Coder Social logo

simgait's Introduction

simgait.org

This repository hosts the source code of simgait.org.

The SimGait project is a four year project funded by the SNSF. It aims at creating a musculoskeletal model of the human with neural control to model healthy and impaired gait, for example due to cerebral palsy. simgait.org contains a webservice allowing to run musculoskeletal simulations from the web.

Setup

simgait.org runs on a fairly powerful hardware:

  • Intel Core i7 950 @ 3.07 GHz
  • NVIDIA GeForce GTX 970

The BIOS was configured to reboot the machine after a power outage.

The following software is installed:

  • Ubuntu 18.04 Desktop with apache2, php, git and webots (from the snap store).

  • Add ServerName 127.0.0.1 at the beginning of /etc/apache2/apache2.conf.

  • Enable SSL: sudo a2ensite default-ssl, sudo a2enmod ssl, sudo systemctl restart apache2.

A letsencrypt certificate was installed to enable https. Apache was configured with rewrite rules to:

  1. Redirect all traffic from http to the https.
  2. Redirect WebSocket traffic from wss://servername/<port_number> to ws://servername:<port_number>.
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so

<VirtualHost *:80>
  ServerName simgait.org
  ServerAlias www.simgait.org
  ServerAdmin [email protected]
  ErrorLog ${APACHE_LOG_DIR}/error.log
  CustomLog ${APACHE_LOG_DIR}/access.log combined
  Redirect permanent / https://simgait.org
</VirtualHost>

<VirtualHost *:443>
  ServerName simgait.org
  ServerAlias www.simgait.org

  [ ... ]

  RewriteEngine on

  RewriteCond %{SERVER_NAME} =www.simgait.org
  RewriteRule ^ https://simgait.org%{REQUEST_URI} [END,NE,R=permanent]

  # port redirection rules (for session_server.py, simulation_server.py and webots)
  # websockets (should come first)
  RewriteCond %{HTTP:Upgrade} websocket [NC]
  RewriteCond %{HTTP:Connection} upgrade [NC]
  RewriteRule ^/(\d*)/(.*)$ "ws://%{SERVER_NAME}:$1/$2" [P,L]
  # http traffic (should come after websocket)
  RewriteRule ^/(\d*)/(.*)$ "http://%{SERVER_NAME}:$1/$2" [P,L]
  
</VirtualHost>

In addition subversion should be installed as it is used by the new version of simulation_server.py: sudo apt install subversion.

The session server should be configured with simgait.json:

  "port": 1999,
  "portRewrite": true,
  "server": "simgait.org",
  "administrator": "[email protected]",
  "mailServer": "mail.infomaniak.com",
  "mailServerPort": 587,
  "mailSender": "[email protected]",
  "mailSenderPassword": "********",
  "simulationServers": [
    "simgait.org/2000"
  ]

The simulation server should be configured with simgait.json:

{
  "port": 2000,
  "logDir": "log/",
  "portRewrite": true,
  "debug": true
}

Reference to a simulation hosted on github

In order to refer to a specific simulation hosted on a github repository, we should the following protocol:

webots://github.com/user/repo/type/name/folder/subfolder/[...]/subsubfolder/worlds/world.wbt

Examples:

Referring to the master branch: webots://github.com/cyberbotics/webots/branch/master/projects/samples/robotbenchmark/humanoid_sprint/worlds/humanoid_sprint.wbt

Referring to the R2020a-rev1 tag: webots://github.com/cyberbotics/webots/tag/R2020a-rev1/projects/samples/robotbenchmark/inverted_pendulum/worlds/inverted_pendulum.wbt

When specified this way, the whole project will be downloaded (e.g., not only the world file, but all the project folder, including controllers, protos, plugins, etc.).

Automatic git synchronization and testing website

The main web site is stored on the server in /var/www/master/html. It is synchronized automatically with the html folder of the master branch of this github repository. Similarly, the testing web site is stored on the server in /var/www/testing/html. It is synchronized automatically with the html folder of the testing branch of this github repository. The deploy.php script is called by a github webhook on the push event. It performs a git pull in the folder corresponding to the branch of the push event.

simgait's People

Contributors

omichel avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

mansurkh1999

simgait's Issues

World path with symbols not supported

When trying to add a project that contains the + symbol in path I get the error Wrong folder name.

Screenshot from 2020-09-07 09-57-25

It could be that it is just the format used for the symbol that caused issues.
I tried with the path using the symbol directly:

https://github.com/cyberbotics/webots/blob/R2020b-rev1/projects/robots/pal_robotics/tiago++/worlds/tiago++.wbt

And then with the path I get in the browser URL when opening the WBT file

https://github.com/cyberbotics/webots/blob/R2020b-rev1/projects/robots/pal_robotics/tiagoB%2B%2/worlds/tiago%2B%2B.wbt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.