Edit this page

NA-MIC Project Weeks

Back to Projects List

Application of SlicerROS2 in Robotic Catheter Placement for Cardiac Ablation

Key Investigators

Project Description

We investigate the use of SlicerROS2 to simulate robotic catheter in the heart anatomy for cardiac ablation.

Objective

  1. We will develop a tool to configure robotic catheter and generate URDF data,
  2. Test the URDF for visualization in RViz/3D Slicer and dynamic simulation in the Gazebo simulator.

Approach and Plan

  1. Write a script to generate a URDF file to model the kinematic and visual models of the catheter.
  2. Load the model onto the Gazebo dynamic simulator
  3. Visualize the simulation outcome on 3D Slicer using SlicerROS2
  4. (Optional) Create a 3D geometric model of the cardiovascular structures on 3D Slicer, and incorporate into the scene on the Gazebo simulator.

Progress and Next Steps

Generating a URDF file

A Python script to generate a XACRO file (which can be converted to URDF) for a flexible catheter has been prototyped. The script models a flexible catheter as serial links connected via universal joints and rotary springs. The user can provide parameters to define the serial links, including N, D, L1, L2, L3, K, and M to mimic the mechanical behavior of the flexible catheter with N links and N-1 universal joints. The serial link consists of the first and the last links representing the tip and the base links, and the bending section consisting of the remaining (N-2) links. Each joint has rotary springs with a spring constant of K that generate torques to bring it back to the straight position when the joint is rotated by the external force. D is the outer diameter of the catheter. L1, L2, and L3 are the lengths of the tip link, the bending section, and the base link. The total weight of the catheter is M.

The script generate a ROS package including a XACRO file.

$ cd ~/ros2_ws/src
$ python3 <path to the script>/catheter_urdf_generator.py --N 12 --D 0.003 --L1 0.20 --L2 0.5 --L3 0.05 --K 0.2 --M 0.5 --output my_catheter

The URDF can be published in the ROS network using the following command:

$ ros2 run robot_state_publisher robot_state_publisher --ros-args -p robot_description:="$( xacro /home/junichi/ros2_ws/src/my_catheter/urdf/my_catheter.xacro )"

To visualize using RViz and control the joint angles with the joint_state_publisher_gui, open a new terminal and use the following commands:

$ source /opt/ros/jazzy/setup.bash
$ ros2 run joint_state_publisher_gui joint_state_publisher_gui 

Open another terminal and launch RViz:

$ source /opt/ros/jazzy/setup.bash
$ ros2 run rviz2 rviz2

rviz_catheter

Dynamic Simulation with Gazebo and 3D Slicer

The launch file generated by the script can run dynamic simulation on Gazebo and visualize it on RViz and 3D Slicer. Assuming that the script has already generated the package under ~/ros2_ws/src (see the previous section).

$ cd ~/ros2_ws
$ source /opt/ros/jazzy/setup.bash
$ colcon build
$ ros2 launch my_catheter my_catheter_launch.py 

The last command launches both Gazebo and RViz.

On RViz, open the Displays frame (should be on the left panel of the window if Rviz is opened for the first time) and configure it as follows:

  1. Click the Add button at the bottom. A dialog box should show up.
  2. Under Create visualization, click Robot Model under rviz_default_plugins
  3. Click OK to close the dialog box.
  4. Under Robot Model, click the right column for Description Topic and choose /robot_description.
  5. Under Global Options, click the right column for Fixed Frame and choose base_link.

3D Slicer with SlicerROS2 can import the robot description from the ROS network and display the catheter model with the following steps:

  1. Open the SlicerROS2 module.
  2. Click Add new robot.
  3. Click Load robot (use default parameters).
  4. The catheter model should appear on the 3D viewer.

Illustrations

dynamic simulation (NOTE: The screen video is slow because of the recording, but it was smooth when running without screen recording)

Background and References

  1. SlicerROS2 Repository: https://github.com/rosmed/slicer_ros2_module
  2. SlicerROS2 Documentation: https://slicer-ros2.readthedocs.io/en/v1.0/
  3. SlicerROS2 Tutorials: https://rosmed.github.io/tutorials/

Acknowledgements

This work is supported in part by NIH (R01EB020667, R01EB034359, R01EB036015, R01CA235134, P41EB028741).