# Loading Robot into Slicer

**URL:** <https://discourse.slicer.org/t/loading-robot-into-slicer/36798>\
**Category:** Support\
**Tags:** robotics\
**Created:** [June 15, 2024, 3:37am UTC](https://discourse.slicer.org/t/loading-robot-into-slicer/36798 "2024-06-15T03:37:33Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 21, 2024, 6:34pm UTC](https://discourse.slicer.org/t/loading-robot-into-slicer/36798/4 "2024-06-21T18:34:21Z")

</div>

> [@Jeff\_Boker](#):
>
> Basically I want to just drag and drop a file and instead of using the mouse and sliders to adjust the joint values, I want to do this automatically using OpenIGTLink.

Slicer can do exactly this. The file that you drag-and-drop is a Slicer scene file that contains models, transforms, and OpenIGTLink configuration.

> [@Jeff\_Boker](#):
>
> I am a little confused about converting my urdf file into the mrb file where the joint values can be controlled with the sliders as you do in the video. So I can convert the urdf into surface meshes, but how will slicer know all the joints and how to set the sliders to actuate the joints?

You can build the transform tree from information in the urdf file. To make this very easy, I’ve implemented an automatic importer script. You can download it from here:

> <https://gist.github.com/lassoan/e174e853cd78ad93a1cd54b32debdac8>

The script does not support all possible features (e.g., I’ve only added “revolute” joint types), but can be easily extended as needed.

All you need is to copy-paste the script into Slicer’s Python console in a recent Slicer Preview Release (Slicer-5.7.x; Slicer Stable Release is not compatible, as it does not support selective display of transform rotation handles):

---

_[View the full topic](https://discourse.slicer.org/t/loading-robot-into-slicer/36798)._
