======Enhanced Surgical Simulation Sandbox for the daVinci System======
===(CONFIDENTIAL and bounded by NDA with Intuitive Sutrgical Inc.)===
**Last updated: 5th February 2011 2:38pm**
======Summary======
This project involves two entities - [[http://www.intuitivesurgical.com/ | Intuitive Surgical Inc. (ISI)]] and [[https://www.cisst.org/ | ERC-CISST ]] (Computer Integrated Surgical Systems and Technology) at Johns Hopkins University (JHU). We are developing a simulation sandbox using //**open source**// libraries which would allow developers to create new object models and applications using the daVinci System. Currently, we would be focusing our sandbox to work with the daVinci S Surgeon Console present in the Swirnow Mock Operating Room at JHU.
* **Students:** Anand Malpani
* **Mentor(s):** Anton Deguet (JHU), Prof. Taylor (JHU), Simon Dimaio (ISI), Ashwinram Suresh (ISI)
======Background, Specific Aims, and Significance (CONFIDENTIAL)======
* **Background**
* Currently, ISI have three generations of daVinci robotic systems ''viz.'' [[http://www.intuitivesurgical.com/products/davinci_surgical_system/davinci_surgical_system_standard/ | STANDARD]], [[http://www.intuitivesurgical.com/products/davinci_surgical_system/davinci_surgical_system_s/ | S]] (system in Hackerman 134 - Mock OR), and [[http://www.intuitivesurgical.com/products/davinci_surgical_system/davinci_surgical_system_si/ | SI]]. Additionally, they have a [[http://www.intuitivesurgical.com/products/skills_simulator/ | Skills Simulator]] system which serves the purpose of reducing training time spent on the actual robot and provides the add-on features of repeatability and structured task environments.
* Such a platform for simulating robotic surgical tasks could have wide applications in the fields of skill evaluation, surgical planning, task modeling, and so on. However, at present, the simulation tasks of the daVinci Skills Simulator are outsourced to [[http://www.mimicsimulation.com/ | Mimic Technologies Inc. ]]. The Mimic Simulation engine performs the graphics and physics rendering of the environment as well as the interacting objects. This engine appears as a black-box talking to the master console of the daVinci Si System over an Ethernet and DVI connection (as seen below). The master manipulator kinematics are passed over from the console to the simulator core which performs the state management and sends the target kinematics of the virtual slaves (being simulated) to the Mimic engine. The engine in-return passes the 3D rendering of the scene over the DVI connection to the stereo viewer on the master console. Due to the black box nature of the Mimic engine the developers do not have access to the rendering pipeline, and, our project aims to overcome this problem.
{{ :courses:446:2013:446-2013-06:project-skills-sim-block.png?600 | daVinci Skills Simulator System Block Diagram }}
* **Aims**
* We want to create a //**simulation sandbox**// that uses open source dependencies (except the ISI API - available on an agreement with ISI - for talking to the robot). This platform would allow researchers to create their own simulations for a number of possible uses like training exercises, intra-operative path planning, testing learning and vision algorithms on a structured environment, etc.
* ISI has already created a couple of exercises using H3DAPI, an open source Haptics library. At first, we would be testing their code on our daVinci Skills Simulator. Later, we would be creating the sandbox framework using the ISI-API, the CISST-SAW framework, and the H3D libraries.
* The simulation system with our sandbox would look something like the figure below. (Notice: changes in the blocks as compared to the figure above showing the daVinci Skills Simulator system blocks).
{{ :courses:446:2013:446-2013-06:project-sim-sandbox-block.png?600 | Simulation Sandbox System Block Diagram }}
* **Significance**
* Once in place, this framework would:
- Enable researchers to design their own environments (simulation tasks) using the graphics, physics models present in the sandbox
- Enable developers to create and add new object models to the existing library of models and develop newer applications using the same
- Allow simulating patient specific anatomical data to enable procedural planning - e.g. a surgeon can create a road-map of the procedure to be performed and look at any difficulty arising and perform the actual procedure in the operating room after reviewing the plan.
- Prove to be a rapid prototyping platform for new user interfaces, surgical procedures, image guidance methods, new instruments for the robot and so on.
- Be the testing ground for learning approaches like modeling a surgical task performance, performing tool tracking before applying them in the real world
======Deliverables======
* **Minimum:** (Expected by 14th April)
- Extend and develop the existing CISST-SAW component for interfacing with the ISI-BBAPI to include additional functions related to setup of the console for use as a stand alone simulator console.
- //Create a simple virtual slaves "Core" for emulating the actual "Core" of the slave side of the robot.// **[NEW]**
- Create a new CISST component for interfacing to the simulation library (H3D).
- Demonstrate the sandbox using a basic example with basic features.
- Demo the
* **Expected:** (Expected by 28th April)
- Extend the virtual slave "Core" to incorporate other features of the daVinci console e.g. clutching, swapping instruments, camera control, etc.
- Mimic the existing sandbox sample tasks from ISI to interface to the CISST components (modifying according to available features in the sandbox)
- Demonstrate the modified task developed by ISI using this extended sandbox on the daVinci S console in the Mock OR.
* **Maximum:** (Expected by 9th May) **(Will be pursued after the CIS course during summers)**
- Develop a new application involving new models using the extended simulation sandbox, perhaps demonstrating the implications of this framework.
- Extend the sandbox for including features needed in the new applications developed.
======Technical Approach======
The project aims to create a framework for slave side simulation of the daVinci system using open source
dependencies (except for the ISI-BBAPI [4], which is used to communicate back and forth with the robot. The ISI-BBAPI was available to us due to an agreement between ISI and JHU. This is binary package so that people do not tamper with the robot.)
ISI has already created a "Sandbox" containing some object models and a couple of training tasks using H3D[5], an open source scene graph API. Currently, the sandbox communicates directly to the Skills Simulator (which is a computer as shown above in the block diagram attached to the console) using the ISI-SIM-API and can be used only with the Skills Simulator, which is compatible with the specific Si consoles only. However, we would like to build this sandbox using the CISST libraries and the SAW framework [2, 3] as it would allow us to create a component based application which can have any master device on one end sending commands driving the simulated tools on the other end.
{{ :courses:446:2013:446-2013-06:project-system-block.png?450 | System Block Diagram for proposed Sandbox}}
As seen in the figure above, the PC running the simulation sandbox would be communicating back and forth with the master console via the CISST-SAW wrapper of the ISI BB API via a network connection. Additionally, the sandbox would be rendering stereo simulation (based on the H3D library) on the stereo viewer of the console via DVI cables. The flow of information within the sandbox is shown below.
* **H3DViewer:** This is a GUI-based loader distributed along with the H3DAPI. It is able to load X3D files containing the scene graph information.
* **X3D File(s):** X3D is an xml-based file format to describe the different nodes within the scene-graph. H3DAPI has X3D nodes which can be used in the x3d file to specify their relationship with the other nodes in the graph. Nodes can have different functions like graphic models, collision models, rigid body models, etc. These nodes can be routed (connected) to each other to pass and update their **field** members as per changes in the scene.
* **Graphics Nodes:** These describe the different objects in the scene and their rendering properties. X3D files for models can be developed from CAD files using some conversion softwares. These X3D files can then be used in the definition of the graphics nodes.
* **Python Script:** This node is to load python scripts and pass variable and make function calls to the python script.
* **H3DPhysics Nodes:** These nodes are present in the physics toolkit distributed with the H3DAPI. Physics rendering is achieved using these nodes like collision models, rigid body models, joints, PID control, etc.
* **Virtual Slaves node:** This is the custom node that we have created for our sandbox. It is used to pass information about the desired joint positions to the PID nodes which then drive the simulation. This node is also a CISST component so that it can communicate with the other components for getting updated target joint values.
{{ :courses:446:2013:446-2013-06:project-system-flow.png?600 | System Flow Diagram for proposed Sandbox}}
The following components have been developed for this project:
* **cisstDaVinci(cdv)ReadWrite (//mtsTaskPeriodic//):**
* Existing cisst multitask component built using isi-bbapi to communicate to and from the robot
* Added methods to it so as to disengage the real slaves from the masters during the use of the console as a simulator.
* Provides interfaces to send master manipulator's cartesian positions and console user events.
* **mtsTeleOperation (//mtsTaskPeriodic//):**
* Developed to bridge between any master and simulated slave component for information passing.
* Requires interfaces to receive information from master(s)
* Provides interfaces to send information to slave(s) (their desired cartesian positions)
* Manages state of the system like "Clutched", "CameraControl", etc.
* **mtsVirtualSlavesCore (//mtsTaskPeriodic//):**
* Developed to emulate the core on the slave side of the daVinci robot
* Requires interfaces to receive desired slave cartesian pose
* Provides interfaces to send desired slave joint positions
* Performs inverse kinematics using the cisstRobot library and known DH-parameters
* **VirtualSlaves (//X3DChildNode, mtsComponent//):**
* Developed this H3DNode as well as mtsComponent to pass information to and from the rendering engine
* Requires interfaces to receive the desired slave joint positions
* Instantiates all the above classes as well as the component manager to manage these components
* "Routes" the target joint values to the PIDCollection nodes in H3D
* **ISI Nodes (//H3D Nodes//):**
* Developed by Ashwin for the Sim Sandbox
* SevenDOF: data structure for storing the seven joint values
* PIDCollection, JointPID, PrismaticJointPID, RevoluteJointPID: PID controllers moving the joints to the target positions
{{ :courses:446:2013:446-2013-06:project-code-flow.png?750 | System Flow Diagram for proposed Sandbox}}
======Dependencies======
describe dependencies and effect on milestones and deliverables if not met
- Initial work from ISI on the simulation platform **[DONE]**
* get access to the existing sample exercise written by Ashwin (ISI) and guide on using it
- Access to the H3DAPI svn repository **[DONE]**
* sending request to the admin for the same
* awaiting access priveleges
* in conversation with the admin people to get the svn repository check-out
* struggling to get the svn checkout (weird errors occurring, only partial check-outs!!)
* network security hasn't been able to resolve this either (works fine from outside hopkins) **[RESOLVED]**
- Availability of daVinci in the mock OR **[DONE]**
* scheduling it in time for experimentation
* finding the budget or funding for the daVinci usage
- [[http://www.h3dapi.org/ | H3D (Open Haptics Library)]] **[DONE]**
* Registration and access to the H3DAPI
- Workstation to host the simulator and related hardware and software **[DONE]**
* Have received information regarding computer specs on which ISI has tested
* co-ordinate with Prof. Taylor to use an existing workstation with processing power and graphics for the required capabilities
* order for hardware has been placed (02/15) awaiting delivery (expected 02/19)
* maintaining correspondence with ISI to make sure compatibility issues do not arise
- cisst daVinci BB API wrapper in shape **[DONE]**
* contact Anton so that he remembers to do this sooner
* setup meeting to understand the component and its properties
- Bug fix for cisstRobot by Simon Lenard (developer) **[DONE]**
- Test 3D tilepro input to the console **[PENDING]**
======Milestones and Status ======
* Below is a rough timeline for achieving the milestones mentioned in the first column and marked by the red dots.
{{:courses:446:2013:446-2013-06:project-timeline-ver5.png?750 | Project Timeline}}
- Milestone name: **Test ISI examples from existing sandbox on Skills Simulator**
* Planned Date: 19th Feb
* Expected Date: 25th Feb
* Status: Ongoing (compiling the H3D library on the simulator backpack, partial success (02/18), code revision issues (simulation works but model doesn't work perfectly)
- Milestone name: **Cleaning and updating the cisst daVinci isi-bbapi wrapper**
* Planned Date: 7th March
* Completed Date: 21st March
* Status: DONE
- Milestone name: **Extending the isi-bbapi component for simulation**
* Planned Date: 14th April
* Expected Date: 23rd April
* Status: DONE
- Milestone name: **Implementing the virtual slave "Core" and tele-operation CISST component with basic features**
* Planned Date: 14th April
* Expected Date: 5th May
* Status: IN PROGRESS
- Milestone name: **Create and test a simple simulation on the daVinci S console**
* Planned Date: 21st April
* Expected Date: 7th May
* Status: Futuristic
- Milestone name: **Extend CISST components for additional features**
* Planned Date: 28th April
* Expected Date: 7th May
* Status: IN PROGRESS
- Milestone name: **Mimic the ISI sandbox example to use with the extended sandbox**
* Planned Date: 5th May
* Expected Date: 13th May
* Status: Futuristic
- Milestone name: **Develop additional models for application related to port placement, etc.**
* Planned Date: 25th April
* Expected Date: xxx
* Status: REMOVED
- Milestone name: **Extend the sandbox further for these applications and test on the S console**
* Planned Date: 10th May
* Expected Date: xxx
* Status: REMOVED
======Reports and presentations======
* All of the following documents can be found in this {{:courses:446:2013:446-2013-06:group06.zip | zip file}}
* Project Plan (due Thursday, February 14th)
* {{:courses:446:2013:446-2013-06:project_proposal_presentation.pdf| Project plan presentation}}
* {{:courses:446:2013:446-2013-06:project_proposal.pdf|Project plan proposal}}
* Project Background Reading
* See Bibliography below for links.
* Project Checkpoint
* {{:courses:446:2013:446-2013-06:checkpoint_presentation.pdf | Project Checkpoint presentation (pdf)}}
* Project Mini-Checkpoint
* {{:courses:446:2013:446-2013-06:mini_checkpoint_presentation.pdf | Project Mini Checkpoint presentation (pdf)}}
* Paper Seminar Presentations
* {{:courses:446:2013:446-2013-06:seminar_review.pdf| Seminar Critical Review (pdf)}}
* {{:courses:446:2013:446-2013-06:seminar_review_presentation.pdf| Seminar Presentation (pdf)}}
* Papers reviewed:
* [[http://online.liebertpub.com/doi/abs/10.1089/end.2011.0371 | Robotic Surgery Training with Commercially Available Simulation Systems in 2011: A Current Review and Practice Pattern Survey from the Society of Urologic Robotic Surgeons]]
* [[http://onlinelibrary.wiley.com/doi/10.1111/j.1464-410X.2012.11270.x/pdf | Current status of validation for robotic surgery simulators – a systematic review]]
* Project Teaser Slide
* {{:courses:446:2013:446-2013-06:poster_teaser.pdf | Teaser PDF file}}
* {{:courses:446:2013:446-2013-06:poster_teaser.pptx | Teaser PPT file}}
* Project Final Presentation
* {{:courses:446:2013:446-2013-06:poster_presentation.pdf | PDF of Poster}}
* Project Final Report
* {{:courses:446:2013:446-2013-06:final_report.pdf| Final Report}}
======Project Bibliography=======
- S. DiMaio and C. Hasser, //The da Vinci Research Interface//, MICCAI Workshop on Systems and Arch. for Computer Assisted Interventions, Sep. 2008
- A. Deguet and R. Kumar and R. Taylor and P. Kazanzides, //The cisst libraries for computer assisted intervention systems//, MICCAI Workshop on Systems and Arch. for Computer Assisted Interventions, Sep. 2008
- V. Balazs and D. Simon and D. Anton and K. Peter and K. Rajesh and H. Christopher and T. Russell, //The Surgical Assistant Workstation//, MICCAI Workshop on Systems and Arch. for Computer Assisted Interventions, Sep. 2008
- Intuitive Surgical Inc., //ISI API User Guide//
- Intuitive Surgical Inc., //daVinci S System User Manual//
- Intuitive Surgical Inc., //daVinci Skills Simulator Manual//
======Other Resources and Project Files======
* Source Code for the project
* Under version control: [[https://svn.lcsr.jhu.edu/robotorium/trunk/apps/sawVirtualSlaves/ | SVN repository for source code]]
* H3DAPI
* [[http://www.h3dapi.org/modules/PDdownloads/viewcat.php?cid=14 | Download page]]
* [[https://www.h3dapi.org:8090/H3DAPI/trunk/H3DAPI/ | Latest source]]
* [[http://www.h3dapi.org/modules/mediawiki/index.php/What_you_can_do_with_H3DAPI | Wiki page]]
* H3DPhysics Toolkit - H3D implementation on common physics engines
* [[http://www.h3dapi.org/modules/PDdownloads/viewcat.php?cid=20 | Download page]]
* [[https://www.h3dapi.org:8090/H3DPhysics/trunk/H3DPhysics/ | Latest source]]
* [[http://www.h3dapi.org/modules/mediawiki/index.php/RigidBodyPhysics | Wiki page]]
* CISST: libraries for computer assisted interventions and SAW: Surgical Assistant Workstation, platform to enhance a surgeon's capabilities
* [[https://trac.lcsr.jhu.edu/cisst | Home Page]]
* [[https://svn.lcsr.jhu.edu/cisst/ | Latest Source]]