Skip to content

Connecting with Multiple Open Haptic Devices #793

Description

@z6zou

Hello,
I'm currently working with two open haptic devices, which I would like to send the stylus and button transformation matrices to Slicer. Following Multimodel tracking examples online, I generated the configuration files as following:

<PlusConfigurationversion="2.1">
<DataCollection StartupDelaySec="1.0">
<DeviceSet Name="PlusServer: Open Haptics device tracking 2 Devices" Description="Broadcasting device stylyus tracking data through OpenIGTLink." />
<Device
Id="TrackerDeviceLeft"
Type="OpenHaptics"
AcquisitionRate="5"
ToolReferenceFrame="BaseLeft"
DeviceName="Left Device" >
<DataSources>
<DataSource Type="Tool" Id="StylusLeft" PortName="Stylus" />
<DataSource Type="Tool" Id="ButtonsLeft" PortName="Buttons" />
</DataSources>
<OutputChannels>
<OutputChannel Id="NeedleStreamLeft">
<DataSource Id="StylusLeft" />
<DataSource Id="ButtonsLeft" />
</OutputChannel>
</OutputChannels>
</Device>

<Device
Id="TrackerDeviceRight"
Type="OpenHaptics"
AcquisitionRate="5"
ToolReferenceFrame="BaseRight"
DeviceName="Right Device" >
<DataSources>
<DataSource Type="Tool" Id="StylusRight" PortName="Stylus" />
<DataSource Type="Tool" Id="ButtonsRight" PortName="Buttons" />
</DataSources>
<OutputChannels>
<OutputChannel Id="NeedleStreamRight">
<DataSource Id="StylusRight" />
<DataSource Id="ButtonsRight" />
</OutputChannel>
</OutputChannels>
</Device>

</DataCollection>
<PlusOpenIGTLinkServer
MaxNumberOfIgtlMessagesToSend="1"
MaxTimeSpentWithProcessingMs="50"
ListeningPort="18944"
OutputChannelId="NeedleStreamLeft" >
<DefaultClientInfo>
<MessageTypes>
<Message Type="TRANSFORM" />
</MessageTypes>
<TransformNames>
<Transform Name="StylusLeftToBaseLeft" />
<Transform Name="ButtonsLeftToBaseLeft" />
</TransformNames>
</DefaultClientInfo>
</PlusOpenIGTLinkServer>
<PlusOpenIGTLinkServer
MaxNumberOfIgtlMessagesToSend="1"
MaxTimeSpentWithProcessingMs="50"
ListeningPort="18889"
OutputChannelId="NeedleStreamRight" >
<DefaultClientInfo>
<MessageTypes>
<Message Type="TRANSFORM" />
</MessageTypes>
<TransformNames>
<Transform Name="StylusRightToBaseRight" />
<Transform Name="ButtonsRightToBaseRight" />
</TransformNames>
</DefaultClientInfo>
</PlusOpenIGTLinkServer>
</PlusConfiguration>

To listen to the two ports, I created two connectors in 3D Slicer. However, it seems like only the transformations in the first device is updating. I tried to swap the order of the devices and confirmed that. I'm wondering if there is anything wrong with my configuration file, and would like to hear any valuable suggestions to achieve this from you.

Best Regards,
Zoe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions