[IGSTK-Users] EM tracking giving the same readings

Jain, Ameet ameet.jain at philips.com
Fri Jul 22 15:52:46 EDT 2011


Hi all,

I am having an issue in trying to use IGSTK for EM tracking a large tool with multiple 5DOFs. It starts to track the sensors alright, but then after some point it starts giving me the same tracked information for all sensors - i.e. it repeats the previous value continuously for hours. My feeling is that it gets a 'bad fit' at some point and then the sensor location does not get updated after that.

The code where I update the tracking info for each tool is below. Do you think this is not the correct way to implement the update?

auroraTrackerTool[i]->RequestGetTransformToParent();
while(!TransformObserver[i]->GotTransform());
igstk::Transform transform = TransformObserver[i]->GetTransform();
igstk::Transform::VectorType t = transform.GetTranslation();
igstk::Transform::VersorType r = transform.GetRotation();

Your help is much appreciated,
Thanks a lot in advance,
Ameet Jain


PS: The code for initialization of the Aurora is below, in case you see some error there
igstk::SerialCommunication::PortNumberType AURORAPORT = (igstk::SerialCommunication::PortNumberType)6;
igstk::SerialCommunication::Pointer serialCommAurora;
igstk::AuroraTracker::Pointer  tracker;
igstk::AuroraTrackerTool::Pointer auroraTrackerTool[16];
igstk::TransformObserver::Pointer TransformObserver[16];

void openauroraport()
{
                serialCommAurora = igstk::SerialCommunication::New();
                serialCommAurora->SetPortNumber( AURORAPORT );
                serialCommAurora->SetParity( igstk::SerialCommunication::NoParity );
                serialCommAurora->SetBaudRate( igstk::SerialCommunication::BaudRate115200 );
                serialCommAurora->SetDataBits( igstk::SerialCommunication::DataBits8 );
                serialCommAurora->SetStopBits( igstk::SerialCommunication::StopBits1 );
                serialCommAurora->SetHardwareHandshake( igstk::SerialCommunication::HandshakeOff );
                serialCommAurora->OpenCommunication();

                tracker = igstk::AuroraTracker::New();
                std::cout << "SetCommunication()" << std::endl;
                tracker->SetCommunication( serialCommAurora );

                std::cout << "RequestOpen()" << std::endl;
                tracker->RequestOpen();

                for (int count_port = 0; count_port < 4; count_port++){
                                auroraTrackerTool[2*count_port] = igstk::AuroraTrackerTool::New();
                                auroraTrackerTool[2*count_port]->RequestSelect5DOFTrackerTool();
                                auroraTrackerTool[2*count_port]->RequestSetPortNumber( count_port );
                                auroraTrackerTool[2*count_port]->RequestSetChannelNumber( 0 );
                                auroraTrackerTool[2*count_port]->RequestConfigure();
                                auroraTrackerTool[2*count_port]->RequestAttachToTracker( tracker );

                                auroraTrackerTool[2*count_port + 1] = igstk::AuroraTrackerTool::New();
                                auroraTrackerTool[2*count_port + 1]->RequestSelect5DOFTrackerTool();
                                auroraTrackerTool[2*count_port + 1]->RequestSetPortNumber( count_port );
                                auroraTrackerTool[2*count_port + 1]->RequestSetChannelNumber( 1 );
                                auroraTrackerTool[2*count_port + 1]->RequestConfigure();
                                auroraTrackerTool[2*count_port + 1]->RequestAttachToTracker( tracker );

                                std::cout << "Initialized Port" << count_port << std::endl;
                }



                for (int count_port = 0; count_port < 4; count_port++){
                                TransformObserver[2*count_port] = igstk::TransformObserver::New();
                                TransformObserver[2*count_port]->ObserveTransformEventsFrom(auroraTrackerTool[2*count_port]);

                                TransformObserver[2*count_port + 1] = igstk::TransformObserver::New();
                                TransformObserver[2*count_port + 1]->ObserveTransformEventsFrom(auroraTrackerTool[2*count_port + 1]);

                                std::cout << "Assigned Observer" << count_port << std::endl;
                }

                tracker->RequestStartTracking();
                std::cout << "Requested Tracking" << std::endl;

}

________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/igstk-users/attachments/20110722/c1b2fa58/attachment.html>


More information about the IGSTK-Users mailing list