Wiki

Clone wiki

RCARS / Configuration

Configuration

In order to make RCARS run properly, there are different configurations that you will have to adjust.

Maximum number of tags for the estimaator

To optimize performance, RCARS' estimator needs to know the maximum number of tags that will be present in the workspace. This is an upper limit. However, you should not set this number too large since it will impair performance. The default value is 10. Depending on your hardware, you can increase this number to 20-25 while still having realtime performance. Of course, you can also decrease the value to speed up computation. To set this parameter, edit the file <catkin_ws>/src/RCARS/rcars_estimator/include/config.hpp

The line you have to edit is this one:

#!cpp
/*!
 * Number of dynamic tags (full 6DOF pose gets estimated), minimum 1
 */
const int nDynamicTags = 10;

Note: You might also find a variable called nHybridTags. This is a variable for a future feature. Unfortunately, you cannot delete or set this variable to 0 at the moment. Therefore, we recommend leaving it at its default value of 1.

Note: Please remember to recompile after making this change.

Tag size and tag family

RCARS needs to be provided with the information about the tag family and tag size that you are using. To specify these parameters, you will have to set the following ROS parameters:

  • Tag size in meters, measured along the edge of the tag from corner to corner:
#!bash
/rcars/tagSize
  • Tag family, there are different tag families for the tags
#!bash

/rcars/detector/tagFamily

Configuring the detector

The detector can be run using multi-threading. To enable multi-threading, set the parameters below

  • Enable multi-threading, enables the multi-threading option
#!bash

/rcars/detector/useMultiThreading
  • Number of threads, sets the number of threads. It is recommended to set this number to the number of physical cores not virtual threads of your CPU
#!bash

/rcars/detector/nThreads

Configuring the estimator

The estimator has several parameters that have to be set which are briefly described below

  • Filter parameter file, contains a string to the location of the configuration file containing the settings and initial values for the EKF
#!bash

/rcars/estimator/filterParameterFile

EKF Settings

The settings of the Extended Kalman Filter are saved in a .info file referenced by the filterParameterFile parameter. An example of such a file can be found in <catkin_ws>/rcars/rcars_estimator/config. If the filter does not find the file, it will create one. If the calibration file is not valid/readable, it will be overwritten. Configuring an Extended Kalman Filter is not trivial and requires some experience. Therefore, we do not explain the procedure in detail. However, the most important parameters are explained below.

Note: These are NOT ROS parameters but parameters in the according .info file

  • verbosity, enables detailed printout about the filter predictions/updates
#!bash

common/verbose
  • extrinsic calibration, allows to enable or disable camera to IMU calibration
#!bash

/common/enableExtrinsicCalibration
  • Squared pixel standard devation, defines how noisy ("accurate") the tag corner detections are.
#!bash

/Update0/PixelStd
  • Mahalonobis threshold, defining when a tag / tag measurement is considered an outlier
#!bash

/Update0/MahalanobisTh0
  • Max wait time, defining the maximum time in seconds to wait for an update before the predictions get processed.
#!bash

/Update0/maxWaitTime
  • Outlier count threshold, counter threshold after how many consecutive outlier measurements a tag is considered itself to be an outlier and gets reinitialized
#!bash

/Uodate0/outlierCountThreshold

Precalibrated workspace

If you are using a Precalibrated Workspace, there are additional options to set. These are briefly described below.

  • Overwrite workspace, specifies if a precalibrated gets overwritten (true) or appended (false)
#!bash

/rcars/estimator/overwriteWorkspace
  • Static tag initialization, specifies whether the initialization of the estimator pose is supposed to wait for a statically calibrated tag
#!bash

/rcars/estimator/initializeWithStaticTagOnly
  • View count threshold, specifies how often a tag must have been seen to include it, i.e. consider it calibrated, during saving of the workspace
#!bash

/rcars/estimator/calibrationViewCountThreshold
  • Workspace file name, string specifying the name and location of the workspace file for saving (does not get loaded!)
#!bash

/rcars/estimator/workspaceFilename
  • Workspace autosave, defines whether the workspace is supposed to be automatically saved when the node is shut down
#!bash

 /rcars/estimator/autosaveWorkspace

Updated