🐍 Inside the dVRK: The Secret Snake Robot Origins of the da Vinci Research Kit

DOI

This repository preserves the original da Vinci Research Kit (dVRK) motion controller FPGA code. Active development has migrated to the Johns Hopkins University mechatronics-firmware repository beginning from commit a38917c.

Rather than being designed from scratch, the dVRK controller was ported from a completely separate robotic system: a high-degree-of-freedom surgical snake robot.

1. The Snake Robot Cabling Crunch

Under a conventional control architecture, robot joints are wired directly to the workstation bus for processing, resulting in a complex cabling scenario. The original snake robot actuation unit also suffered from cable drag.

More Motors, More Problems

During the early days of the LCSR, the lab was making strides in dexterity with a snake robot designed for remote telesurgery of the upper airways. However, standard control strategies involved running bulky wiring bundles from every control axis to a centralized electronics rack. The dozens of sensors and actuators needed to articulate such a high-dof robot created a physical bottleneck. The system became increasingly error prone and problematic.

To solve this, we designed a motion control architecture optimized for high-dof systems:

To top it all off (so to speak), we built a brand new snake robot to pair with the brand new controller, leading to exciting results.

Next-gen surgical snake robot with a FireWire-based motion controller.

2. Porting the Snake Robot Controller to the dVRK

When Intuitive Surgical provided retired first-generation da Vinci systems for research, labs faced a similar engineering hurdle: The donated manipulators needed new motion control electronics. Because the communication protocols and packet definitions implemented in SnakeFPGA-rev2 were neatly decoupled from robot kinematics, porting it to the da Vinci interface boards was relatively seamless, if a bit arduous—it is firmware after all. The boards themselves were designed and fabricated in a matter of weeks as a result of a firmware-first design philosophy.

First-generation da Vinci Research Kit controller pictured on the left in late 2011, next to its predecessor the snake robot controller on the right from 2008 The da Vinci Research Kit and snake robot controllers were developed in parallel so changes in one could be tested on the other immediately. This was at an advanced stage where robotic mechanisms and motors were being integrated and it was getting real.

The Big Port

The migration from SnakeFPGA-rev2 to daVinci1394FPGA and the inventive steps taken to generalize a common architecture across both (aka The Big Port) took place between late 2010 and 2011; further details are in this patch and the corresponding writeup. The port went from the Altera-based snake robot controller to the Xilinx-based da Vinci Research Kit controller. Rather than a one-shot port, the two controllers benefited from continued parallel development to ensure cross-platform consistency, generalizability, and refinement.

The generalized multi-axis data distribution design allowed the first functional systems to be brought up with little fanfare. The snake robot version became the first robot-integrated demo of the controller at ROBIO in December 2011. Bugfixes and refinements carried into 2012 before the firmware went live as JHU mechatronics-firmware in September 2012, supporting the official dVRK announcement.

First known recorded power-on of the da Vinci Research Kit (dVRK) motion controller, June 2013

3. Digital Archaeology: Tracing the dVRK Firmware Origins

Version control allows us to retrace the evolution from SnakeFPGA-rev2 to daVinci1394FPGA to its open source release as JHU's mechatronics-firmware.

🔍 Migration Artifacts: History Hiding in the Headers

Like a primitive cave painting, there's an old-school revision log etched in the header comments of the official FireWire.v source code, chronicling how it was initially written for the snake robot in 2008 (SnakeFPGA-rev2), ported to the Xilinx-based da Vinci robot between 2010 and 2011 (daVinci1394FPGA), receiving sporadic updates until eventually moving to the dVRK repository in 2012 (JHU mechatronics-firmware):

/*
 * ...
 * Revision history
 *     04/24/08    Paul Thienphrapa    Initial revision
 *     10/13/10    Paul Thienphrapa    Copied from SnakeFPGA-rev2 and tweaked
 *                                       for Xilinx
 *     10/31/11    Paul Thienphrapa    React to rx packets only when addressed
 *     11/11/11    Paul Thienphrapa    Happy 111111!!11!
 *                                     Fixed mixed blocking/non-blocking issues
 * ...
 */

BoardRegs.v also started off under SnakeFPGA-rev2 in 2008. It was later adapted for the FPGA1394_QLA boards under daVinci1394FPGA in 2011, then touched up before migrating to JHU mechatronics-firmware in 2012.

/*
 * Revision history
 *     07/17/08    Paul Thienphrapa    Initial revision - SnakeFPGA-rev2
 *     12/21/11    Paul Thienphrapa    Adapted for FPGA1394_QLA
 *     02/22/12    Paul Thienphrapa    Minor fixes for power enable and reset
 */

The dVRK controller featured some notable hardware changes versus the snake, including the digital-to-analog converters (LTC2601), analog-to-digital converters (LTC1864), and temperature sensor (MAX6576). While the physical layout prompted some high-level restructuring of the firmware, its modular design made the process efficient. The Verilog modules written for them trace a tantalizing tale of the timeline. Header comments show that the controller boards were manufactured in July 2010, and the accompanying manufacturer test scripts (denoted by MfgTest) became bona fide modules in late 2011.

Fun fact: The first line of each module's revision history was logged with a blank entry in deference to the vendor, who wished to remain unnamed. As the first such module developed, Ltc2601x4.v also received the "Revisionist history" badge of honor, a title it held for a decade before being, ironically, revised.

/*
 * Revisionist history
 *     07/15/10                        Initial revision - MfgTest
 *     10/26/11    Paul Thienphrapa    Initial revision
 */

Likewise for Ltc1864x4.v - the "x4" suffix indicates that the module interfaced with a quadruplet of DACs or ADCs, hence the "Quad" in Quad Linear Amplifier (QLA).

/*
 * Revision history
 *     07/15/10                        Initial revision - MfgTest
 *     11/14/11    Paul Thienphrapa    Initial revision
 */

Next up, Max6576.v, the temperature sensor:

/*
 * Revision history
 *     07/15/10                        Initial revision - MfgTest
 *     11/15/11    Paul Thienphrapa    Initial revision
 */

Last but not least, FPGA1394-QLA.v. As the top-level module, this specimen exhibits another peculiar glyph: an email address, with a quaint fortification against scrapers. Leaving a contact there was a developer's way of giving future maintainers a place to ask questions and vent.

/*
 * Revision history
 *     07/15/10                        Initial revision - MfgTest
 *     10/27/11    Paul Thienphrapa    Initial revision (pault at cs.jhu.edu)
 *     02/29/12    Zihan Chen
 */

Early 2012 also heralds the arrival of Zihan! Spending years in this corner of engineering could get pretty lonely, and not just in the lab. Globally, the intersection of custom motion controllers, custom robots, and FPGA link-level FireWire was vanishingly small. Having him aboard was a game changer!

🔍 Digital DNA Testing

Checking with git diff confirms that after the SnakeFPGA-rev2 to daVinci1394FPGA migration (aka The Big Port), daVinci1394FPGA at its final commit (d8995fc) went straight into the JHU mechatronics-firmware repo's initial commit (a38917c), showing a nearly identical match:

$ git init
$ git remote add --fetch daVinci1394FPGA https://github.com/deepsurgical/dvrk-davinci1394fpga-original.git
$ git remote add --fetch mechatronics-firmware https://github.com/jhu-cisst/mechatronics-firmware.git
$ git diff d8995fc a38917c:FPGA1394_QLA --summary
 rename {simulation => Simulation}/CtrlDac.do (100%)
 rename {simulation => Simulation}/EncCtrl.do (100%)
 rename {simulation => Simulation}/EncQuad.do (100%)
 rename {simulation => Simulation}/FireWireBlock.do (100%)
 rename {simulation => Simulation}/FireWireQuad.do (100%)
 rename {simulation => Simulation}/Ltc1864x4.do (100%)
 rename {simulation => Simulation}/Ltc2601x4.do (100%)

🔍 Examining The Commit Archives

Mechanically adding a robot axis might require a complete redesign, but adding it to a scalable controller can be as simple as... adding. This prehistoric commit shows another step in 'transforming' the snake robot into the dVRK:

Paul Thienphrapa committed on Oct 16, 2012
FPGA1394_QLA: Increase maximum number of axes from 7 to 8

The fact that the snake robot had 7 control axes while the dVRK controller had 8 (2 QLA boards daisy-chained) was parameterized in the firmware of SnakeFPGA-rev2 and daVinci1394FPGA respectively.

🔍 Unearthing the Intuitive Research Kit

Before the open source rollout and rebrand to the da Vinci Research Kit (dVRK), the platform was provisionally referred to as the Intuitive Research Kit. The name can still be found in the dVRK GitHub repository and in some transient documents (pdf):

Besides enabling use of the Snake Robot (Section 3.4.2), the outcomes of this effort formed the basis for JHU Open Source Mechatronics [155, 156], which publicly hosts a set of electronics design files, FPGA code, and basic software for a FireWire-based motion controller. This in turn is a component of the Intuitive Research Kit [157,158].

4. Analyzing the Literature

The original publication outlines the dVRK as a set of donated robot hardware, robot software, and a motion controller, stating:

The original dVRK article presents the technical details of the combined package. By analyzing its components individually, we can better understand the rapid rise of the da Vinci Research Kit in 2012: (1) timely institutional donations of retired da Vinci hardware, (2) mature open source robot software, and (3) opportunistic development of a novel motion controller via The Big Port.

5. Priceless Discoveries

This historical repository celebrates the power of modular mechatronics for ageless architecture. A control architecture abstracted enough to handle multi-axis distributed I/O over a high-speed serial link can easily outlast its physical form, jumping from a bespoke miniature snake robot to a medical robotics research platform found in labs all around the world.

What started off as a modest set of .v files has expanded to support a wide array of hardware variants and technical features. These are just a few of the many interesting facts about the dVRK!

6. Publication Timeline

Fun coincidence: Both 2014 papers—the snake robot and the dVRK platform it helped spawn—were presented on the exact same day at ICRA 2014 in Hong Kong (in sessions co-chaired by the same person)!