Closed ayamada0614 closed 11 years ago
Please use transform as a message type for connecting Slicer and ROS.
Please tell me the method to transmit a message from Slicer. I have been for only the receiving in Slicer.
Did this repository change a private?
You can see how to use OpenIGTLink module to send transformation matrix from Slicer to IGT device and your own software from http://www.slicer.org/slicerWiki/index.php/Slicer_3.6:Training
Please see OpenIGTLink tutorial.
OpenIGTLInk tutorial is shown in only the receiving. ( Slicer <- Tracker Client )
Is it TrackerServer.cxx not TrackerServer2.cxx to use Transform massage ?
Is the allotment of Joint angle to Transform massage all right in follows?
igtl::Matrix4x4& matrix
float orientation[4];
orientation[0]=base_angle;
orientation[1]=joint1_angle;
orientation[2]=joint2_angle;
orientation[3]=joint3_angle;
//igtl::Matrix4x4 matrix;
igtl::QuaternionToMatrix(orientation, matrix);
You can use TrackerServer.cxx and TrackerServer2.cxx. There is no limitation. You should use elements (0,3), (1,3) and (2,3) to send target angles for each joint.
I made SimpleSenderClient first of all. It can send a joint angles from the terminal.
example :
$ ./SimpleSenderClient 127.0.0.1 18944
Input angle [joint1,joint2,joint3] > 10, 20, 30
Sent Transform.
=============
0, 0, 0, 10
0, 0, 0, 20
0, 0, 0, 30
0, 0, 0, 1
=============
Input angle [joint1,joint2,joint3] >
Good!
It is the confirmation of the method of rosmake
including OpenIGTLink.
Is it right in the following procedure?
Insert the following text to CMakeLists.txt
find_package(OpenIGTLink REQUIRED)
include(${OpenIGTLink_USE_FILE})
execute following command in SlicerROSIntegrationTraining/build.
$ ccmake ../
execute following command in _ROSWORKSPACE.
$ rosmake SlicerROSIntegrationTraining
Were you able to execute make command without errors following the procedure you mentioned?
You should insert a line as follows:
target_link_libraries(OpenIGTLinkPluginForROS OpenIGTLink)
I succeeded in rosmake
by received advice.
I add a reception function of target position by OpenIGTLink. I push the changed code. Please check my code.
But, I have not yet added the transmission function.
Please keep updating the code.
I add a send function of joint angles by OpenIGTLink. and, I confirmed that I could receive joint angles in Slicer.
Please check my code.
I read OpenIGTLinkPluginForROS.cpp, but there are some points that I cannot understand.
I think that _targetposition is fixed with the following source code. line 116 - 117 in OpenIGTLinkPluginForROS.cpp.