An Open MCT and Yarp based iCub telemetry visualizer.
The Yarp-OpenMCT tool is meant for visualizing and plotting telemetry data from iCub sensors, published over a Yarp network. It collects sensor data published on a predefined set of Yarp output ports opened by the Yarp Robot Interface and exposes that data on predefined telemetry nodes within the visualizer interface as vectors or scalar signals. The pipeline can be summarized as follows:
All telemetry nodes exposing sensor measurements shall appear under the folder "iCub Telemetry". They can then be combined in workspace layouts at the user convenience.
The visualizer implementation is based on the Open MCT (Open Mission Control Technologies), open source, next-generation mission control framework for the visualization of data on desktop and mobile devices. It is developed at NASA's Ames Research Center, and is being used by NASA for data analysis of spacecraft missions, as well as planning and operation of experimental rover systems.
In addition, the Yarp-OpenMCT tool provides a Control Console implementing a web interface to two RPC Yarp server devices:
/wholeBodyDynamics/rpc
port) through which you can run the FT sensors calibrator,The Control Console GUI displays a series of buttons which trigger the same commands usually sent through the RPC interface running on a terminal. These commands are implemented with the most common options, which can be set through editable text input forms.
npm
package manager when installing the repository main modules (steps 7 and 8).npm
), they need to be manually installed.The scope of this installation guide addresses only the modules required for running the Yarp-OpenMCT tool. You won't need additional modules if you are connecting your machine to a local robot network up and running.
As a reference, the bring up of such setup (out of scope of this installation guide) requires installing the robotology-superbuild and enabling specific profiles...
yarprobotinterface
, YARP and its devices,whole-body-estimators
and walking-controllers
.The following instructions assume you are installing the software as a non-root user. Make sure that you have Git installed in your platform. The tool installation and execution have been tested on MacOS Catalina 10.15.7 and Vanilla Ubuntu 20.04.
:warning: The tool installation has not been tested on Windows. On top of that, the installation of dependencies YARP, CMake and C/C++ compiler toolchain binaries rely on the use of the conda
package manager, which is still not fully supported on Windows PowerShell (https://github.com/robotology/robotology-superbuild/issues/890), and was not tested on Git Bash.
The installation was tested on Windows Subsystem for Linux V1 (WSL,Ubuntu on WSL), but the full support on this platform is not guaranteed. Use of WSL V2 is discouraged due to a memory issue.
⚠️ Run the installation steps 1 and 2 from a new terminal without any conda
package manager environment enabled.
If you're not already using NVM, a Node.js Version Manager by MIT, install it. NVM safely handles the installation of multiple versions of Node.js and easy switching between them. As mentioned in later steps, two different versions of Node.js versions are required for installing and running the visualization tool. Follow the NVM installation instruction steps in https://github.com/nvm-sh/nvm, recapped below. NVM v0.38.0 is the latest version used in the visualization tool installation procedure described in the subsequent sections.
a. Run the command below which downloads and runs the one-line installer
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
b. After restarting the terminal, the following lines were added to the ~/.bashrc
(~/.bash_profile
on MacOS)
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
c. List available Node.js releases
nvm ls-remote
Install Node.js and npm from the same terminal. Currently, the latest tested Node.js LTS version compatible with YarpJS and Open MCT is the LTS-Fermium release version Node.js v14.17.0.
nvm install 14.17.0 --latest-npm // installs latest LTS:Fermium version v14.17.0 and latest respective supported npm (v6.14.13)
nvm alias default v14.17.0 // updates the default alias
nvm ls // lists available and active nodejs and npm versions
⚠️ It is recommended to install the YARP, CMake and C/C++ compiler toolchain binaries using the Conda package manager and installing the respective packages from the Robotology Conda channel, as described in the following steps.
If you are not already using the conda
package manager, install the conda
mambaforge distribution following https://github.com/robotology/robotology-superbuild/blob/master/doc/install-mambaforge.md#linux. Remember to restart your shell session or run source ~/.bashrc
(~/.bash_profile
on MacOS) for the conda init
command to take effect.
conda create -n icubtelemenv
conda activate icubtelemenv
To read more about installing robotology package binaries refer to https://github.com/robotology/robotology-superbuild/blob/master/doc/conda-forge.md#binary-installation.
All the following steps shall be run within the activated conda
icubtelemenv environment. It is critical that you haven't any Node.js package installed through conda
(nodejs) in that same environment since you will be using the Node.js package from NVM.
Install YARP from the Robotology Conda channel
mamba install -c robotology yarp
To read more about installing robotology
package binaries refer to https://github.com/robotology/robotology-superbuild/blob/master/doc/conda-forge.md#binary-installation.
Install the compilers
and cmake
packages from the Robotology Conda channel (in case a specific CMake version meeting specific YarpJS requirements is maintained in that channel. Otherwise, mamba
falls back to its default channel)
mamba install -c robotology compilers cmake
For most users, the one line installation procedure is recommended, directly installing the remote repository URL via the npm package manager:
npm install https://github.com/ami-iit/yarp-openmct.git --global-style true
This command clones the repository with the protocol git+http
, installs all the source files (without the .git
, .gitignore
nor other version control files) under the folder ./node_modules/yarp-openmct
and installs the dependencies following the manifest ./node_modules/yarp-openmct/package.json
.
Always make sure you are selecting the proper node.js version (v14.17.0) before running an npm command.
Note: The option --global-style
causes the installation dependency tree to have more duplicates, but makes it easier for npm to find the direct and indirect package dependencies.
Alternatively, if you wish to contribute as a developer or switch between unreleased versions of the software (git branches or tags), you need the version controlled repository content. For that purpose:
Clone the yarp-openmct
repository in a location of your choice
git clone https://github.com/ami-iit/yarp-openmct.git
Install the visualizer: go to the repository folder (we shall refer to this folder as <yarp-openmct-root-folder>
) and install the application via npm:
cd yarp-openmct
npm install
Always make sure you are selecting the proper node.js version (v14.17.0) before running an npm command.
For testing the visualization tool along with its control console, you can run a simulation on Gazebo with iCubGazeboV2_5
or icubGazeboSim
model. For that you need first to install the modules listed in Section #simulation-dependencies, as follows:
icubtelemenv
used in previous steps.mamba install -c conda-forge -c robotology gazebo-yarp-plugins icub-models whole-body-estimators walking-controllers
If you wish to check the battery state visualization handling on the telemetry visualization tool, you need to install the fake battery device which publishes a fake battery state (voltage, current, temperature, charge level, ...) on the /icubSim/battery/data:o
port.
yarp-openmct
root folder.build
, run CMake, and run ccmake
for editiong the CMake variables
mkdir buid
cd build
cmake ..
ccmake .
CMAKE_INSTALL_PREFIX
to your $ROBOTOLOGY_SUPERBUILD_INSTALL_PREFIX
if you're using the superbuild, or any other location at your convenience.ICUB_MODELS_TO_INSTALL
, which is by default set to iCubGazeboV2_5
.INSTALL_FAKE_BATTERY_DEVICE_CONFIG_FILES
on. Actually, the CMake configuration in the repository is for installing any device of additional module to build through the CMake system. In such case, installing the fake battery device can still be optional.make install
node -v
and npm -v
.Install one of the browsers listed in the client dependencies.
If you wish to test the features of the installed tool, and installed #additional-modules-for-testing on Gazebo, run the simulation as follows:
icubtelemenv
environment
conda activate icubtelemenv
icubGazeboSim
or iCubGazeboV2_5
):
export YARP_ROBOT_NAME="iCubGazeboV2_5"
yarpserver --write
icubGazeboSim
or iCubGazeboV2_5
):
gazebo -slibgazebo_yarp_clock.so
YARP_CLOCK=/clock yarprobotinterface --config launch-wholebodydynamics.xml
/wholeBodyDynamics/rpc
is available./wholeBodyDynamics/left_foot/cartesianEndEffectorWrench:o
and /wholeBodyDynamics/right_foot/cartesianEndEffectorWrench:o
are available.Walking Controller Logger
telemetry entry in the YarpOpenMCT visualizer).
dump_data
set to 0 in https://github.com/robotology/walking-controllers/blob/master/src/WalkingModule/app/robots/iCubGazeboV2_5/dcm_walking_with_joypad.ini.WalkingModule
RPC server and make sure it opens the RPC port /walking-coordinator/rpc
. :warning: If the data dumping is not deactivated in the previous step, the Walking Module tries to connect to /logger/data:i
and fails when not finding the destination port, with the output error
[ERROR] Unable to connect the ports /walking-coordinator/logger/data:o and /logger/data:i
dump_data
to 1 in https://github.com/robotology/walking-controllers/blob/master/src/WalkingModule/app/robots/iCubGazeboV2_5/dcm_walking_with_joypad.ini.WalkingLoggerModule
and make sure it opens the log data input port /logger/data:i
.
YARP_CLOCK=/clock WalkingLoggerModule
WalkingModule
RPC server and make sure it opens the RPC port /walking-coordinator/rpc
.
YARP_CLOCK=/clock WalkingModule
The port /walking-coordinator/logger/data:o
is also created by default, and automatically connected to /logger/data:i
.
fakeFrameGrabber
and grabberDual
1 devices, streaming image data on the respective ports /icubSim/camera/left
and /icub/camera/right
.
YARP_CLOCK=/clock yarpdev --device fakeFrameGrabber --name /icubSim/camera/left
YARP_CLOCK=/clock yarpdev --device fakeFrameGrabber --name /icubSim/camera/right
fakeBattery
and batteryWrapper
2 device and make sure it opens the port /icubSim/battery/data:o
:
YARP_CLOCK=/clock yarprobotinterface --config battery/icub_battery.xml
(1) http://www.yarp.it/git-master/note_devices.html#note_devices_example, http://www.yarp.it/git-master/yarpview.html, http://www.yarp.it/git-master/yarpdev.html, grabberDual device parameters described in the grabberDual device page.
(2) batteryWrapper device parameters described in the Device implementation -> Network Wrapper -> batteryWrapper device page.
If you wish to visualize iCub telemetry data from a robot setup already running on its local network under a given namespace \<yarpRobotNamespace> (e.g. /icub
, /myNameSpace
), follow the steps below:
(We assume that a yarprobotinterface
is running on the robot iCub head, and a Yarp Name Server is running on the robot network)
iCubGenova04
, iCubGenova09
, ...):
export YARP_ROBOT_NAME="<robotModel>"
yarp namespace <yarpRobotNamespace>
yarp detect --write
Depending on which robot data you wish to visualize or operation you wish to run from the Control Console, the respective applications should be running and the respective output YARP ports should be available in the robot network.
Open a terminal on the same or any other machine connected to the network.
If you have used conda
package manager to install the dependencies as described in Section #server-installation, activate the conda
environment where you installed these dependencies, otherwise skip to next step.
conda activate icubtelemenv
Open the default configuration file <yarp-openmct-root-folder>/conf/servers.json
. This JSON formatted file holds the ports configuration, the ports prefix and the servers configuration.
Run npm start
from folder <yarp-openmct-root-folder>
. You should get on the terminal standard output something like:
[OPEN-MCT STATIC SERVER] stdout: Visualizer Console Server (Open MCT based) listening on http://127.0.0.1:8080
...displaying the visualizer console server URL (Uniform Resource Locator), i.e. http://<IP-address>:<socket-number>
. In this example we had set its address to localhost
. In general, we shall refer to the server URL as <server-URL>
.
The Visualizer Client is a GUI based on the Open MCT framework, displaying a set of iCub Telemetry data elements which plot the data received from the telemetry server.
Run a browser on any other machine connected to the same network and open the link <server-URL>
. If you run the browser on the same machine as the telemetry server (server address is localhost
), just click directly on the address displayed on the terminal output.
In the above example, the iCub head IMU measurements read on the port /icubSim/inertial
and sent to the visualization tool client are exposed as the telemetry node "IMU sensor measurements". The telemetry node wraps all the 12 measurement components:
The measurement components can be exclusively selected for plotting as shown in the picture.
The Control Console provides a web interface to the FT sensors calibrator from the wholeBodyDynamics RPC device and the walking coordinator (WalkingModule
) RPC device.
On the same browser or on any browser running on another machine connected to the same network open the link <server-IP-address>:3000
. If your browser is running on the same machine as the telemetry server, just open the link localhost:3000
.
If you run the browser on the same machine as the telemetry server, instead of manually entering the link address, look for the respective links in the terminal output of the server run command (npm start
), hover over the links and hit \<CTRL>+\<mouse left button> (on MacOS, \<Meta> instead of \<CTRL>).
listening on http://localhost:3000
[OPEN-MCT STATIC SERVER] stdout:
> openmctStaticServer@1.0.0 start <user-home>/dev/yarp-openmct/openmctStaticServer
> . ${NVM_DIR}/nvm.sh; nvm use v14.17.0; node server.js
[OPEN-MCT STATIC SERVER] stdout: Now using node v14.17.0 (npm v6.14.13)
[OPEN-MCT STATIC SERVER] stdout: iCub Telemetry Visualizer (Open MCT based) hosted at http://localhost:8080
1: The Socket.IO connection wraps a Websocket protocol. The client tries to establish a websocket connection whenever possible, and falls back to HTTP long polling otherwise. :arrow_up: