This repository preserves the original da Vinci Research Kit (dVRK) motion controller FPGA code. Active development has migrated to the Johns Hopkins University
mechatronics-firmwarerepository beginning from commita38917c.
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.
During my early days in 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:
- Centralized Processing, Distributed I/O: Rather than routing bundles of wires from each joint to the workstation individually, sensor and actuator signals are digitized and serialized by a nearby FPGA.
- The FireWire Bus: The reformatted motor commands and sensor readings are then multiplexed over a single, high-speed IEEE 1394 (FireWire) serial bus, maintaining real-time performance.
-
The Codebase: The snake robot embodiment of this architecture formed the
SnakeFPGA-rev2codebase.
To top it all off (so to speak), we built a next-gen snake robot for the new controller and got exciting results.
When Intuitive Surgical later 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. The boards themselves were designed and fabricated in a matter of weeks as a result of a firmware-first design philosophy.
Porting the Altera-based snake robot firmware to the Xilinx-based da Vinci Research Kit took place in this very repository. Development on the two controllers continued in parallel to ensure consistency and generalizability. The generalized multi-axis data distribution design allowed the first functional dVRK systems to be brought up in no time.
First known recorded power-on of the dVRK motion controller
We can retrace the steps leading from the predecessor SnakeFPGA-rev2 to this daVinci1394FPGA to its eventual open source release as JHU mechatronics-firmware on GitHub.
Like a primitive cave painting, there's an old school revision log etched in the header comments of the official FireWire.v source code, showing how it was initially written for the snake robot in 2008, ported to the da Vinci about 2.5 years later in 2010, and received sporadic updates until moving to GitHub in Sep 2012:
/*
* ...
* 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
* 10/16/13 Zihan Chen Modified to support hub capability
* ...
*/Mechanically adding a robot axis might require a complete redesign, but adding it to the controller can be as simple as... adding. This prehistoric commit shows another step in 'transforming' the snake robot into the dVRK:
Paul Thienphrapa, 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 was hardcoded into the firmware in SnakeFPGA-rev2 and daVinci1394FPGA respectively.
The hardware + software + electronics recipe had been circulating for some time, culminating in the official dVRK publication that documented how this trinity of pillars was toppled one-by-one, leading to the final monument:
- Software became commoditized. The robot software landscape of 2014 featured multiple options. According to the paper, "open-source robot software, such as the Robot Operating System (ROS) [1], has seen widespread adoption."
- Hardware became abundant. The 2014 paper observed that, in a rare twist, clinical-grade surgical robots were becoming "increasingly available to researchers via the reuse of retired clinical systems."
- Electronics became the critical enabler. The paper notes that there were "relatively few open hardware/software platforms in widespread use within the robotics research community." Furthermore, the native da Vinci motion controllerโthe presumptive bridge between the above hardware and softwareโwas withheld to protect sensitive IP. Thus a dedicated initiative was needed to unblock the impasse and provide "complete access to all levels of control via open-source electronics and software." This was achieved through carefully engineered firmware and "an FPGA to enable a centralized computation and distributed I/O architecture" as detailed in this repository.
With the building blocks combined and the framework in place, the paper highlighted several emergent advantages:
- Firmware modularizes software. By handling FireWire transactions entirely on the FPGA, the architecture abstracted the hardware, turning software into interchangeable blocks. Users who "prefer to use a different real-time framework, such as Orocos [15]" could bypass the default software entirely.
- Frameworks accelerate development. The firmware-level hardware abstraction in turn allowed high-level control algorithms to be implemented "in a familiar development environment (Linux PC)," thereby reducing the learning curve. The framework further enabled "reduced cabling... and high flexibility in control algorithms while maintaining precise real-time hardware control. This is particularly useful for developing haptic interactions and virtual fixtures," as well as advanced capabilities such as autonomous surgery and safety features.
The dVRK article reveals the motion controller's latent emergence as a key enabler of the da Vinci Research Kit. The electronics, firmware, and architecture that went from SnakeFPGA-rev2 to daVinci1394FPGA to JHU mechatronics-firmware helped pave the way for downstream innovations in surgical robotics.
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].
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!
This repository highlights the power of modular digital system design. 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.
- Design of the motion control architecture: Centralized processing and distributed I/O for robot control
- Initial prototype for the snake robot: A distributed I/O low-level controller for highly-dexterous snake robots
- Architecture generalization and API: A scalable system for real-time control of dexterous surgical robots
- Fully integrated implementation: Design of a scalable real-time robot controller and application to a dexterous manipulator
- Running an autonomous snake robot: Guidance of a high dexterity robot under 3D ultrasound for minimally invasive retrieval of foreign bodies from a beating heart
- Evolution into to the dVRK: An open-source research kit for the da Vinciยฎ Surgical System
- The next generation of dVRK: dVRK-Si: The next generation da Vinci Research Kit