4.3.4. Utilities

4.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

4.3.4.2. dvrk-config-generator.py

Usage is described in the configuration generators section.

4.3.4.3. dvrk-remove-logs.py

Script used to locate and delete log and backup files. Everytime a cisst/SAW based application (like the dVRK main console 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 sub-directories) and delete them. This script also looks for backup files created by some of the 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

4.3.4.4. dvrk_reset_teleoperation.py

This scripts will stop the teleoperation components (see dVRK console), 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} ...]]

4.3.4.5. hrsv_widget

This application creates two small widgets which display the current state of the dVRK console. 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 console’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.

4.3.4.6. dvrk-sd-card-updater.py

Script used to download, uncompress and copy the latest firmwares for the DQLA and dRAC based controllers as well as the ESPM programmers. The scripts 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.

4.3.4.7. 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 console for the arms you want to teleoperate. This should be a console that doesn’t include a built-in teleoperation componenent, such as:

ros2 run dvrk_robot dvrk_console_json -j console-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 unactuated 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.