Skip to content

tokjun/ros2_igtl_bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROS-IGTL-Bridge

Author:Tobias Frank, Junichi Tokuda (Brigham and Women's Hospital)

This ROS-Node provides an OpenIGTLink bridge to exchange data with ROS2. It supports sending and receiving Transformations, Images, Strings, PolyData, Points and Pointclouds.

For the OpenIGTLink bridge for ROS1, please refer to:

For further information regarding the OpenIGTLink protocol please see:


Build Instruction

The following steps were tested on:

  • Ubuntu 20.04 + ROS2 Foxy

First, install OpenIGTLink in your local computer. A detailed instruction can be found at http://openigtlink.org/. In the following instruction, we assume that the build directory for the OpenIGTLink library is located at: ~/igtl/OpenIGTLink-build

$ cd <your OpenIGTLink directory>
$ git clone https://github.com/openigtlink/OpenIGTLink.git
$ mkdir OpenIGTLink-build
$ cd OpenIGTLink-build
$ cmake -DBUILD_SHARED_LIBS:BOOL=ON ../OpenIGTLink
$ make

Install ROS 2 following the ROS 2 Documentation. Then create your ROS workspace following the documentation as follows:

$ source /opt/ros/foxy/setup.bash
$ mkdir -p ~/dev_ws/src
$ cd ~/dev_ws/
$ rosdep install -i --from-path src --rosdistro foxy -y # Make sure to resolve dependency

Then download the ros_igtl_bridge package from GitHub:

$ cd ~/dev_ws/src
$ git clone https://github.com/openigtlink/ros2_igtl_bridge

and execute catkin_make in your workspace directory:

$ cd ~/dev_ws/
$ colcon build --cmake-args -DOpenIGTLink_DIR:PATH=<your OpenIGTLink directory>/OpenIGTLink-build

Note that you may need to use the absolute path, when setting the OpenIGTLink_DIR cmake variable.

To run the bridge, type:

$ . install/setup.bash
$ ros2 run ros2_igtl_bridge igtl_node

If the bridge is set up, you can launch the test procedure for communication with [3D Slicer] (https://www.slicer.org/):

$ ros2 run ros_igtl_bridge igtl_test_publisher

It is possible to edit the launch files and set your IP & Port in the file. Run the node as server or client by adjusting the parameter RIB_type. Open the file and uncomment the lines:

$ <!--param name="RIB_server_ip" value="111.111.111.111" type="str"/-->
$ <!--param name="RIB_port" value="18944" type="int"/-->
$ <!--param name="RIB_type" value="client" type="str"/-->

The node can be run as server or client. If you executed the test procedure, the node will send a "ROS_IGTL_Test_Transform" with random translation.

References

  1. Frank T, Krieger A, Leonard S, Patel NA, Tokuda J. ROS-IGTL-Bridge: an open network interface for image-guided therapy using the ROS environment. Int J Comput Assist Radiol Surg. 2017 May 31. doi: 10.1007/s11548-017-1618-1. PubMed PMID: 28567563.

About

OpenIGTLink bridge node for ROS2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published