Setup
Dependencies
Model-Prime’s rqt_metadata
plugin for ROS 1 has the following runtime dependencies that can all be installed via the APT package manager:
- libcurl
- roscpp
- rqt_gui
- rqt_gui_cpp
- rosbag
Please note that Model-Prime distributes in its rqt_metadata
binaries its own rqt_bag
fork in which modifications expose the following three ROS services. These ROS services enable two-way communication between the rqt_bag
fork and the rqt_metadata
plugin to provide some convenient functionality when using both plugins together.
- get_bag_filename
- get_current_time
- set_current_time
Installation
The install
folder contained in the zip file provided to you contains binaries for both our rqt_bag
fork and rqt_metadata
plugins unless otherwise specified.
Follow these steps to get the plugins installed and running on your machine. These steps assume that your system already has the aforementioned dependencies installed - except for rqt_bag
- which is typically provided to you within our binaries. Please see the troubleshooting section below if you encounter issues while attempting to run the plugin.
-
Unzip the provided
rqt_metadata-ros-$ROS_DISTRO-$ARCH-install
folder and place the containedinstall
folder in the location you desire. This folder contains the necessary launch file and binaries for therqt_metadata
that we’ve written in C++, along with .py files for ourrqt_bag
fork. -
Source the provided
install/setup.bash
file withsource install/setup.bash
after having sourced the ROS underlay (ex./opt/ros/${ROS_DISTRO}/setup.bash
) -
Run
roslaunch rqt_metadata rqt_metadata.launch
to launch therqt_metadata
plugin. Alternatively, you can launchrqt
and select the plugin from the Plugins dropdown menu. -
(Optional) Run
roslaunch rqt_bag rqt_bag.launch
to launch therqt_bag
plugin, or load it from therqt
Plugins dropdown menu.
Authentication
You will be prompted for a PAT (personal access token) once the rqt_metadata
plugin is running. You can get this PAT from our pat-service by making a POST /create request from our Swagger page’s PAT service section.
Troubleshooting
DISCLAIMER: Many of the following troubleshooting tips involve installing missing dependencies using apt-get. Please check with your system administrator if you are unsure of whether installing additional dependencies is allowed. Model-Prime assumes no responsibility for broken ROS builds or systems that might result from attempting to resolve these or other issues related to the metadata plugin.
Here are a number of common issues that you might encounter when launching the plugin and ways to resolve them:
Missing rqt module
Issue: Upon running roslaunch rqt_metadata rqt_metadata.launch
, you encounter the following error:
Traceback (most recent call last):
File "./rqt_metadata", line 5, in
Solution: Note: The following commands provided assume the ROS_DISTRO env variable is appropriately set (ex. melodic, noetic). Install all rqt plugins and dependencies by running apt-get update && apt-get install ros-${ROS_DISTRO}-rqt*
.
rqt_bag ROS service not available
Issue: While using the rqt_metadata
plugin you perform some action involving metadata value interval start or stop time such as right clicking on an extrinsic value’s Time Start or Time Stop cells and selecting “Set to current playback time” and observe the following error:
[ERROR] [1683233876.764088688]: the service: /rqt_bag/get_current_time does not appear to be available
Solution: If you are sure that you are using binaries provided to you by Model-Prime that include the rqt_bag
fork then it’s possible that the rqt_bag
plugin is simply not running or no bag is loaded within it. Alternatively, it might be possible that your system already had the official rqt_bag
installed (i.e. not our fork). The official rqt_bag
plugin does not implement any of the ROS services that the rqt_metadata
plugin expects and you must therefore make sure to use our forked version instead.
Additionally, it’s possible that you have the official rqt_bag
and rqt_bag_plugins
packages installed in your ROS underlay. Remove those by running apt-get remove ros-${ROS_DISTRO}-rqt-bag*
.
Logging is too verbose or not verbose enough
Issue: Logs produced by the rqt_metadata
plugin are either too verbose or not verbose enough.
Solution: You are free to modify the rqt_metadata
plugin’s log level by modifying install/share/rqt_metadata/config/custom_rosconsole.conf
. Please note that our binaries enable logging at the INFO level and above.
PAT token invalid error
Issue: You encounter the Invalid or expired access token - please try again with a different token
error when initially prompted for a PAT in the rqt_metadata
UI.
Solution: Make sure that the provided PAT was generated from our Swagger page or equivalent CURL/HTTP call to the pat-service /create endpoint using a POST request. Additionally, make sure your account administrator has at the very least granted you read permissions.
API domain name error
Issue: You are sure you’ve entered a valid PAT token, but continue to see a Invalid or expired access token - please try again with a different token
error.
Solution: It is likely that the API domain name being used by the plugin for HTTPS requests to our web services is invalid. The default domain name is api.model-prime.com
, but, using the ROS 1 version of the plugin, this domain name can be changed via the roslaunch param api_domain_name
. Only change this if you intend on interfacing with a Model-Prime service deployment other than production.
Plugin not showing up in rqt plugins dropdown
Issue: After sourcing the install/setup.bash you encounter the following CLI error from running either the rosrun
(ROS 1) or ros2 run
(ROS 2) command, or you’ve launched rqt
and don’t see the plugin listed in the Plugins dropdown menu:
user@localhost# ros2 run rqt_metadata rqt_metadata QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root' qt_gui_main() found no plugin matching "rqt_metadata/MetadataPlugin" try passing the option "--force-discover"
Solution: Simply re-run the appropriate ROS run command for the version of ROS that you are using and make sure to include the --force-discover
option. After this, the run command should work without the qt_gui_main() error, and the plugin will appear in the rqt
dropdown menu.