5.3.4. Utilities

5.3.4.1. qlacommand

Program that broadcasts messages to all the dVRK controller found on the FireWire or UDP bus. Commands include reboot, reset-encoder-preload, close-relays, open-relays

5.3.4.2. dvrk-io-config-generator.py

Usage is described in the configuration generators section.

5.3.4.3. dvrk-system-config-wizard

Usage is described in the configuration generators section.

5.3.4.4. dvrk-remove-logs.py

Script used to locate and delete log and backup files. Every time a cisst/SAW based application (like the dVRK main system program) is started, a log file is created (named cisstLog-xxx.txt). After a while, you will find that your home directory is cluttered with these log files, and it would be nice to remove them. The script dvrk-remove-logs.py can be used to locate all the log files in the current directory (and subdirectories) and delete them. This script also looks for backup files created by some dVRK calibration applications. By default, the script displays the list of files found and prompts the user to confirm deletion. With the -f (force) option, files are automatically deleted without any prompt. For example:

# remove every log/backup file in your user directory
cd ~/
dvrk-remove-logs.py -f

5.3.4.5. dvrk_reset_teleoperation.py

This scripts will stop the teleoperation components (see dVRK system), move the MTMs at their zero position, move the PSM’s shaft rotation to zero and restart the teleoperation. The goal of the script is to “reset” the kinematic for both the MTMs and PSMs. This is useful when the arms get into odd poses after a bit of teleoperation.:

usage: dvrk_reset_teleoperation.py [-h] -m {MTML,MTMR} [{MTML,MTMR} ...] [-p {PSM1,PSM2,PSM3} [{PSM1,PSM2,PSM3} ...]]

5.3.4.6. hrsv_widget

This application creates two small widgets which display the current state of the dVRK system. It will show if the operator is present, if the clutch or camera pedal is pressed as well as which PSM is teleoperated by which MTM. ROS is used to track the system’s state. The two widgets can be dragged on top of the left and right views in the stereo display. This is a poor man’s version of the UI in a clinical system, but it can still help users who are not familiar with the system.

5.3.4.7. dvrk-sd-card-updater.py

Script used to download, uncompress and copy the latest firmware files for the DQLA and dRAC based controllers as well as the ESPM programmers. The script waits for an SD card to be inserted in the PC. It will then mount it, copy the files and unmount, so the user can safely remove the card. The user can insert all their SD cards one after another without restarting the script.

Usage described in dVRK firmware section.

5.3.4.8. dvrk_teleoperation.py

Script for Python/ROS-based teleoperation, useful as an example/template of how the dVRK teleoperation can be customized. See also derived components for an example of customizing the C++ teleoperation component directly. The script is given ROS namespaces for an MTM and PSM to begin teleoperation with, which could be an actual dVRK MTM and PSM, or the MTM could instead be a haptic device such as a ForceDimension. When running, teleoperation works very similarly to the built-in dVRK teleoperation.

To run teleoperation, first start a dVRK system for the arms you want to teleoperate. This should be a system that doesn’t include a built-in teleoperation component, such as:

ros2 run dvrk_robot dvrk_system -j system-MTML-PSM2.json

Next, start the teleoperation script with your chosen arms:

ros2 run dvrk_python dvrk_teleoperation.py -m <MTM> -p <PSM>

If you don’t have dVRK foot pedals, you can use the -c <cluch topic> and -o <operator pedal> topics to use a different source (these topics should each provide sensors_msgs/msg/Joy with one button). Alternatively, you can set -o to disable the operator pedal, note however that in this mode teleoperation will begin as soon as any MTM activity is detected, so please be careful.

If you are using a haptic device (e.g. ForceDimension/Falcon) as your MTM which has an un-actuated wrist, the teleoperation script will not be able to align the MTM to match the PSM orientation. In this case, you must use the -n option to skip alignment.