- Launch Slicer 4.8.1
- Go OpenIGTLinkIF extension
- Create a connection with Slicer as the server on port 18944
- Check that the current status is set to "WAIT"
- Start the VM (if using one. I run this on Ubuntu, so it was not required) with the ap-propriate configuration for two-way communication
- Launch the bridge file of the ros_igtl_bridge
- Choose to run as client
- Set IP to the appropriate IP found by writing “ifconfig” in your terminal. The IP is expected to be set in the bridge.launch file but you can comment this part out if you want to change it everytime
- Set port to 18944. The IP is expected to be set in the bridge.launch file but you can comment this part out if you want to change it everytime
- If you check Slicer, the status should have changed to "ON"
A connection should be now established.
- In Slicer 4.8.1
- Go to Markups
- Create two new MarkupFiducials called “Entry” and “Target”
- Place a point in the workspace (I did this the other way around. I manually moved the robot in RVIZ and those coordinates instead)
- Launch a new terminal
- Go to your workspace and source it
- Enter “roslaunch ismr19_moveit demo.launch”
- Launch a new terminal
- Go to your workspace and source it
- Enter “rosrun robot_control igtl_importer.py”
- Launch a new terminal
- Go to your workspace and source it
- Enter “rosrun robot_control igtl_exporter.py”
- Go back to slicer
- Go to IGT -> IGTLinkIF
- Scroll down to I/O Configuration
- Click send for both “Entry” and “Target”
- The robot should now move to the entry point and you should be prompted to click "enter" on the terminal to proceed to the target point.
Note: You need to send both points for the robot to begin the operation
The whole pipeline is a multistep process. Most parts require some manual observations, and this serves to provide extra safety/protection, assuming this would be translated to a real-life scenario. The steps required to run it are as follows:
- We launch Slicer and load all our volumes (critical structures, cortex and entry-target points)
- We convert the critical structures from “.vtk” format to labelMaps/markupFiducials using Slicer’s “Model to Label Map” module using as reference volumes the labelMaps given from the previous coursework.
- We run our PathPlanner algorithm in order to calculate and save the best entry-target pair. Our scene should now resemble figures 2-4 (without the yellow background on the entry-target points)
- We then initialise the connection and launch our robot in RVIZ as described previously.
- We then start the calibration process as mentioned in the Calibration (to translate points between ROS and Slicer) section of the report.
- Then using the resulting transformation matrix, we transform the critical structures, cortex and entry-target points of Slicer to match the workspace of ROS.
- We use the ‘harden’ functionality on Slicer to have a correct representation of the structures/points and send the correct entry-target points to ROS.
- We load the cortex (converted to .stl format using Slicer) as a marker node to RVIZ through RVIZ’s interface, using a scale factor of 0.001 to match Slicer’s and ROS’ measurements.
- The cortex’s origin point in RVIZ is set according to the bounding box created during the calibration step. Once we ensure that the robot is placed correctly around the structure, we can start sending our entry and target point.
- We go again to IGT in Slicer and click “Send” on the “Entry” and "Target" points. We should now be able to see the robot’s end effector moving to the entry point in RVIZ. The “Entry” point is loaded as a cyan marker. The robot will not move unless both points are sent.
- At the same time, we can check the Slicer scene to confirm that the end effector is at the correct entry point. This is shown by the yellow background around the optimal entry position.
- There should now be a prompt in the terminal to press "enter" to proceed to the target point. After doing this, we should be able to see the robot’s end effector moving to the target point from the entry point in a straight line . The “Target” point is loaded as a blue marker.
- At the same time, we can check the Slicer scene to confirm that the end effector is at the correct target point. This is shown by the yellow background around the optimal target position.
These should be all the steps required to perform the whole pipeline. Scenes of these steps and saved models can be found within the repository under the “models and scenes” folders
You can check the report for a more detailed explanation on how the different parts of the pipeline work.