Skip to content

StetroF/rmf-web

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nightly Dashboard End-to-End react-components dashboard api-server rmf-auth ros-translator api-client codecov

RMF Web

Open-RMF Web is a collection of packages that provide a web-based interface for users to visualize and control all aspects of Open-RMF deployments.

Getting started

Prerequisites

We currently support Ubuntu 22.04, ROS 2 Humble and Open-RMF's 22.09 release. Other distributions may work as well, but is not guaranteed.

Install pnpm and nodejs

curl -fsSL https://get.pnpm.io/install.sh | bash -
pnpm env use --global 20

Install pipenv

pip3 install pipenv

For Debian/Ubuntu systems, you may need to install python3-venv first.

sudo apt install python3-venv

Installing Open-RMF

Refer to the following documentation for either building from source or installing released binaries:

Note Simulation demos are not part of the released binaries, and therefore a built workspace with at least the demos repository would be required for trying out the web dashboard with simulation.

Install dependencies

Run

pnpm install

You may also install dependencies for only a subset of the packages

pnpm install -w --filter <package>...

Launching

Source Open-RMF and launch the dashboard in development mode,

# For binary installation
source /opt/ros/humble/setup.bash

# For source build
source /path/to/workspace/install/setup.bash

cd packages/dashboard
pnpm start

This starts up the API server (by default at port 8000) which sets up endpoints to communicate with an Open-RMF deployment, as well as begin compilation of the dashboard. Once completed, it can be viewed at localhost:3000.

If presented with a login screen, use user=admin password=admin.

Ensure that the fleet adapters in the Open-RMF deployment is configured to use the endpoints of the API server. By default it is http://localhost:8000/_internal. Launching a simulation from rmf_demos_gz for example, the command would be,

ros2 launch rmf_demos_gz office.launch.xml server_uri:="http://localhost:8000/_internal"

Optimized build

The dashboard can also be built statically for better performance.

cd packages/dashboard
pnpm run build

# Once completed
npm install -g serve
serve -s build

This only serves the frontend, the API server can be started manually to work with an Open-RMF deployment on another terminal instance,

# source Open-RMF before proceeding
cd packages/api-server
pnpm start

Contribution guide

  • For general contribution guidelines, see CONTRIBUTING.
  • Follow typescript guidelines.
  • When introducing a new feature or component in react-components, write tests and stories.
  • When introducing a new feature in dashboard, write tests as well as e2e test whenever possible.
  • When introducing API changes with api-server,
    • If the new changes are to be used externally (outside of the web packages, with other Open-RMF packages for example), make changes to rmf_api_msgs, before generating the required models using this script with modified commit hashes.
    • Don't forget to update the API client with the newly added changes with these instructions.
  • Check out the latest API definitions here, or visit /docs relative to your running server's url, e.g. http://localhost:8000/docs.
  • Develop the frontend without launching any Open-RMF components using storybook.

Configuration

See the rmf-dashboard docs.

Troubleshooting

  • If a feature is missing or is not working, it could be only available in an Open-RMF source build, and not in the binaries. Try building Open-RMF from source and source that new workspace before launching the API server. rmf-web may use in-development features of Open-RMF.

  • Creating tasks from the web dashboard when running a simulated Open-RMF deployment will require the task start time suit simulation time, which starts from unix millis 0. Try creating the same task with a start date of before the year of 1970.

  • Check if the issue has already been reported or fixed.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 75.9%
  • Python 18.6%
  • JavaScript 4.5%
  • Jinja 0.5%
  • Shell 0.4%
  • HTML 0.1%