Take a look at the software overview, have an idea about how it works and start contributing.
You can also go directly to the public repository page and start looking at the code
If you already know the software, jump the the development section
ROSWeb is a web application developed using HTML, CSS and JavaScript. It is a supervisory system that groups widgets previous developed and new widgets created to improve the user experience when interacting with ROS through a Web Browser.
Its architecture was developed from the scratch, so no framework was used to create the project.
To automatize some development tasks, it was used GulpJS, which is a NPM package. It's not a problem if you are not acquainted with gulp or NPM. They must be configured before starting the development, but you won't need to change their settings, unless your objective is to improve the development workflow.
All ROSWeb supervisory system behavior and functionalities were coded in TypeScript and compiled by a gulp task. Those files are inside the /src
folder,
which is described below:
TypeScript code is divided in the following folders:
.d.ts
files. Used by TypeScript compiler
The dynamic content is rendered by Handlebars.js. Template
files are stored at /src/hbs
. They are interpreted by a gulp task and compressed into a single
javascript file, that is used by the application.
All JavaScript libraries are found at /src/js
folder. The libraries used by the core of the application
must have a .d.ts
file related, to be interpreted by a TypeScript compiler. These libraries are:
Other libraries used by widgets, written in JavaScript, or another JavaScript library, but not directly by the application (which is in TypeScript), are:
If you are developing a new widget that depends on a third library, this is the correct place to put the necessary files.
For writting the styles, it was chosen SASS extension. The
rules are in /src/sass
in separated files, in order to organize them. A gulp task is in charge
to compile them and compress into a single file. The file /src/sass/main.scss
imports the other
files.
All the images are inside the /src/img
folder. After compiling the code, a gulp task copy all images
to the /dist
folder, where the application runs. You just need to place the files here and restart
the gulp task to copy it.
Widgets are the most important part of the system. ROSWeb itself only hosts a lot of widgets that can be useful for your ROS application.
All existing widgets are placed in /src/widgets
. They are basically generated from 3 files:
index.hbs
main.scss
main.js
/main.ts
It is possible to create new files to organize your widget or even to use webworkers, like the LaserScanner Viewer Widget does. Just make sure those files will
be used by the main.js
file.
We have a tutorial for creating new widgets, you can see it here.
It is always interesting to take a look at the existing widgets to see how things work.
After creating a new widget, you need to add it to the method _initWorkspace()
at the file /src/ts/model/workspace.ts
Basically, you need to install the dependencies using NPM commands and install Gulp to run the necessary task during the development.
All the necessary steps are described in this contributing.md file, in the project repository.
This page is generated by a GitHub repository, you can submit changes here or even create an Issue and we'll fix it as soon as possible!
ROSWeb Page Repository