A web-based tool for monitoring and inspecting Lightweight Communications and Marshalling (LCM) messages in real-time. This system offers functionality similar to LCM Spy, utilizing web technologies for enhanced usability and accessibility.
The web-based LCM Monitor depends on the MBot Bridge Server and API. The server must be running in subscribe-all mode in order to display all the messages.
Note: If the MBot Bridge Server is configured to only subscribe to certain channels, only those will be displayed on the LCM Monitor.
This installation assumes that you have already installed the MBot Web App, and that it is accessible by going to http://[MBOT_IP] in your browser.
You can install the LCM Monitor so that it is accessible at the address http://[MBOT_IP]/spy, where [MBOT_IP] is replaced with your robot's IP address.
First, download the tar file from the latest release, then do:
tar -xvzf mbot_lcm_monitor-[VERSION].tar.gz
cd mbot_lcm_monitor-[VERSION]/
./deploy_app.sh --no-rebuildFollow the printed instructions (or the ones in mbot_lcm_monitor-[VERSION]/README.txt) to configure with NGINX.
If this is your first time setting up the LCM monitor, you must configure Nginx to find it. Open the configuration file:
sudo nano /etc/nginx/nginx.confThen, edit the server block within the http block, at the end of the file, to add the following location configuration:
location /spy {
alias /data/www/spy/;
index index.html index.htm;
try_files $uri $uri/ =404;
}The whole server block (at the end of the http block) looks like this:
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name localhost home.bot www.home.mbot;
location / {
root /data/www/mbot;
index index.html index.htm;
try_files $uri $uri/ =404;
}
# Spy application location block
location /spy {
alias /data/www/spy/;
index index.html index.htm;
try_files $uri $uri/ =404;
}
# Other configurations...
}To see the changes, restart NGINX:
sudo systemctl restart nginx.serviceTo install from source, you will need to install NPM on the Raspberry Pi.
- Clone MBot Bridge. Then do:
cd mbot_bridge/mbot_js
npm install
npm link- In this repo, do:
npm install
npm link mbot-js-apiTo run in development mode, you can do:
npm run devTo build and install the app, do:
./scripts/deploy_app.sh [--bridge-path PATH/TO/BRIDGE --no-rebuild]If the --bridge-path argument is not provided, this will grab the latest compatible release of the MBot Bridge. If you want to use a local version of the Bridge API, pass the path to your copy of the MBot Bridge repository. Use --no-rebuild if you want to skip rebuilding the app and just install.
Then, follow the same steps to configure Nginx as above.
To generate a new release, do:
./scripts/generate_release.sh -v vX.Y.Z [-b PATH/TO/BRIDGE]Substitute the correct version for vX.Y.Z. Save the generated file mbot_lcm_monitor-vX.Y.Z.tar.gz to upload to the release.
The -b argument is optional, and lets you pass a path to a local version of the MBot Bridge to compile against. By default, the latest compatible release of the MBot Bridge will be downloaded from source.
The current maintainer of this project is Jana Pavlasek. Please direct all questions regarding support, contributions, and issues to the maintainer.