robot-log-visualizer implements a python visualizer to display the data logged with
YarpRobotLoggerDevice application.
Please follow one of the following methods to use the software
Assuming that you have conda installed, you can create a new environment and install the robot-log-visualizer with the following commands:
conda create -n visualizer-env
conda activate visualizer-envand you can install the robot-log-visualizer with the following command
conda install -c robotology robot-log-visualizerYou can also run the application using pixi:
pixi run robot-log-visualizerSee the pixi homepage: pixi.
Install python3, if not installed (in Ubuntu 20.04):
sudo apt install python3.8 python3-virtualenv swigCreate a virtual environment and activate it. For example:
python3 -m venv visualizer-env
. visualizer-env/bin/activateInside the virtual environment, install the application from pip:
pip install robot-log-visualizerIf you want to use the latest feature of the robot-log-visualizer you can install it with the
following command
python -m pip install git+https://github.com/ami-iit/robot-log-visualizer.gitOnce you have installed the robot-log-visualizer you can run it from the terminal.
robot-log-visualizer.webm
You can navigate the dataset thanks to the slider or by pressing Ctrl-f and Ctrl-b to move
forward and backward.
Important
robot-log-visualizer only supports reading .mat file version 7.3 or newer.
robot-log-visualizer reads the logs created by the YarpRobotLoggerDevice of bipedal-locomotion-framework, or by any other software writing the same format. The format is specified in the log format specification, and it is versioned independently of the software that created the log: the version is stored in the version variable of the .mat file, and it is printed in the log of the visualizer when the file is opened.
| Format | Created by | Robot model |
|---|---|---|
v0.1.0 |
bipedal-locomotion-framework v0.29.0 or newer |
Loaded automatically from the URI stored in the log. |
v0.0.1 (no version variable) |
bipedal-locomotion-framework up to v0.28.0 |
Not loaded automatically, it can be set manually. |
Starting from the format v0.1.0, the log stores the robot model as a URI (e.g., package://ergoCub/robots/ergoCubSN001/model.urdf) that is resolved with resolve-robotics-uri-py. The packages are searched in the folders listed in the environment variables supported by resolve-robotics-uri-py, e.g., GAZEBO_MODEL_PATH, GZ_SIM_RESOURCE_PATH, ROS_PACKAGE_PATH and AMENT_PREFIX_PATH. Please remember to add the folder containing your model to one of these environment variables, e.g.
export GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:~/my-modelsThe model and the folder of its package can also be set manually from the GUI before opening the file. This is the only way to visualize the robot of a log in the format v0.0.1.
When a .mat file is opened, the videos saved by the logger in the same folder (<file name>_*.mp4 and <file name>_*.mkv) are opened in a tab next to the robot.
- Synchronization. For the logs in the format
v0.1.0, the time of each image is stored in the channelcamera::<camera>::<rgb|depth>, and the videos are synchronized with the time of the other signals, even if some images have been dropped or the video starts after the beginning of the log. Otherwise, the video is assumed to span the entire log. - Depth videos. The 16 bit depth videos (
<file name>_<camera>_depth.mkv) are displayed with theturbocolormap in the range0.2 mto5.0 m(the depth is assumed in millimeters, i.e., the defaultrgbd_cameras_depth_scaleof the logger). The pixels without depth are black, and a colorbar is shown below the image. - Images streamed as signals. An image streamed as a numerical vector by an exogenous application (e.g., the scaled depth image seen by a policy, streamed with a
VectorsCollectionServer) can be displayed as an image: right click on the signal in the variables tree and selectRender as image. The option is available if the name of the signal containsimageorimg, and either its elements are namedr<row>_c<col>(the size of the image is obtained from the names), or the number of elements is a perfect square (a square image stored row by row is assumed). The values are displayed with the same colormap of the depth videos, in the range0to1enlarged to include the minimum and maximum values of the signal, and0is displayed in black. This works both with.matfiles and in real-time mode.
See the visualization section of the format specification for the details.
All types of issues are welcome.
Materials in this repository are distributed under the following license:
All software is licensed under the BSD 3-Clause License. See LICENSE file for details.
- Giulio Romualdi (@GiulioRomualdi)