Anatomical Mesh-Based Virtual Fixtures for Surgical Robots (IROS 2020). Repo contains code for interactive demo and dvrk demo.
This is the official repo for our work Anatomical Mesh-Based Virtual Fixtures for Surgical Robots accepted in IROS 2020. We present a framework to automatically generate arbitrary complex virtual fixtures for any geometries given a polygon mesh (STL) file. The framework is integrated with core CISST-SAW libraries, thus supports all CISST-based robots with a few lines of change, including but not limited to dVRK and UR. To apply virtual fixture to your robot, there are very few lines needed to change in your control code. This repo contains an interactive demo as well as example code of the virtual fixture working with dVRK.
Presentation is available on YouTube:
If you find our work relevant, please cite
@article{li2020anatomical,
title={Anatomical Mesh-Based Virtual Fixtures for Surgical Robots},
author={Li, Zhaoshuo and Gordon, Alex and Looi, Thomas and Drake, James and Forrest, Christopher and Taylor, Russell H},
journal={arXiv preprint arXiv:2006.02415},
year={2020}
}
Slicer
to run 3D Slicer.make install
after compiling the code.SlicerIGT
extension in 3D Slicer. Please see here for how to do so.
sudo apt install libxml2-dev libraw1394-dev libncurses5-dev qtcreator swig sox espeak cmake-curses-gui cmake-qt-gui git subversion gfortran libcppunit-dev libqt5xmlpatterns5-dev python-wstool python-catkin-tools
sudo apt install libxml2-dev libraw1394-dev libncurses5-dev qtcreator swig sox espeak cmake-curses-gui cmake-qt-gui git subversion gfortran libcppunit-dev libqt5xmlpatterns5-dev python3-wstool python3-catkin-tools python3-osrf-pycommon
Please follow the following system command
source /opt/ros/melodic/setup.bash # or use whatever version of ROS is installed!
mkdir ~/catkin_ws # create the catkin workspace
cd ~/catkin_ws # go in the workspace
wstool init src # we're going to use wstool to pull all the code from github
catkin init
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release # all code should be compiled in release mode
cd src # go in source directory to pull code
git clone https://github.com/mli0603/PolygonMeshVirtualFixture.git dvrk_mesh_vf # clone the code in a folder called dvrk_mesh_vf
wstool merge dvrk_mesh_vf/scripts/dvrk_mesh_vf.rosintall # add required repos
wstool up # now wstool knows which repos to pull, let's get the code
catkin build # ... and finally compile everything
Launch 3D slicer and load the demo scene.
Load the demo scene. Click on File
, then Add Data
.
Select Choose File(s) to Add
and select the scene file located at scene/Demo-Scene.mrml
.
Connect to IGTL-Bridge.
Navigate to Modules->IGT->OpenIGTLink IF
. Select the IGTL connector.
Check Active
box.
This interactive demo runs a simple teleoperation “robot” where the robot position (blue sphere) is controlled by the red sphere. Drag the red sphere to move the robot around. The robot is subject to the mesh virtual fixture, thus it cannot penatrate the skull.
source ~/catkin_ws/devel/setup.bash
roscore
.rosrun dvrk_mesh_vf simpleTeleop
.Transform the skull into robot coordinate frame by navigating to Modules->IGT->OpenIGTLink IF
in 3D Slicer. In I/O Configuration
, select Skull to PSM
transformation and click on Send
.
To control the robot position (blue sphere), drag the red sphere.
source ~/catkin_ws/devel/setup.bash
roscore
.share/console-MTMR-PSM2Derived-TeleopDerived.json
, create a configuraiton file that matches your MTMR and PSM2 (or MTML and PSM1) serial number.rosrun dvrk_robot dvrk_console_json -j share/console-MTMR-PSM2Derived-TeleopDerived.json
. Transform the skull into robot coordinate frame by navigating to Modules->IGT->OpenIGTLink IF
in 3D Slicer. In I/O Configuration
, select Skull to PSM
transformation and click on Send
.
source ~/catkin_ws/devel/setup.bash
roscore
.rosrun dvrk_robot dvrk_console_json -j share/console-MTMR_KIN_SIMULATED-PSM2Derived_KIN_SIMULATED-TeleopDerived.json.
Optionally, you can visualize the PSM by roslaunch dvrk_robot dvrk_arm_rviz_only.launch arm:=PSM2.
rostopic pub -1 /PSM2/set_simulation std_msgs/Bool "data: true"
In the console, first setup teleoperation
Direct Control
Operator
Home
the robotStart
teleoperation.Move the second joint of MTM such that its value is 20. This step moves the tip above the skull.
Direct Control
in MTMR
tab.Move
.Transform the skull into robot coordinate frame by navigating to Modules->IGT->OpenIGTLink IF
in 3D Slicer. In I/O Configuration
, select Skull to PSM
transformation and click on Send
.
Special thanks to Anton Deguet for helping open-sourcing the code :)