Tutorial on MRI-Guided Robot-Assisted Prostate Biopsy
Step 7: Send a robot command using SlicerROS2 publishers
- In the python console, create a publisher for
/desired_command
topic:
pubCommand = rosNode.CreateAndAddPublisherNode('String', '/desired_command')
- Send “RETRACT” message and observe the robot fully retract the needle:
pubCommand.Publish('RETRACT')
- Send “HOME” message and observe the robot go to its initial position:
pubCommand.Publish('HOME')
⬅️ Previous: Read needle position | Back to Table of Contents ↩️ |