[IGSTK-Developers] CylinderSpatialObjectRepresentation

David Gobbi dgobbi at atamai.com
Tue Dec 20 18:43:22 EST 2005


Hi Patrick,

My intent is that the tip of the pointer should point towards the +Z
direction, not -Z.  I think that +Z makes more sense.  The tip of the
cylinder should be at (0,0,0) and the other end at (0,0,-h).

 - David


--- Patrick Cheng <cheng at isis.georgetown.edu> wrote:

> I guess David meant the Pointer is pointing towards the -Z direction.
> But anyway, only when I remove the '-' sign, that the cylinderObject 
> will be on the right side.
> 
> The PrincipalAxisCalibration is taking the known principal axis of the 
> Spatial Object(cylinder) and Tracker Tool(pointer) in their own 
> coordinate system. eg. By default, the cylinder is along it's Y axis, 
> and pointer is along its Z axis. The PrincipalAxisCalibration then take 
> the two principal axis, and figure out what rotation we need to take to 
> align the cylinder with the pointer (in another word, transform the 
> cylinder's coordinate system to the pointer's coordinate system).
> 
> Julien, I have questions about your approach (add an transform to actor)
> 
> 1. The final CylinderSpatialObject is actually not carrying the correct 
> transform. Only when we visualize it, we add another transform to make 
> the actor look right. I believe we should have the CylinderSpatialObject 
> transform right instead of altering the actor's transform. suppose we 
> need to do path planing or collision detection, we are working with the 
> SpatialObject's transform, not the actor's transform.
> 
> 2. This will conflict with the PrincipalAxisCalibration, as people get 
> confused what is the real principal axis is. Here the principal axis for 
> the cylinder is still Y, and Pointer is Z. But since we are going to 
> have a rotation when we visualize it, we don't need the 
> PrincipalAxisCalibration here.
> 
> 3. maybe we can move the rotation and shift of origin in the 
> CylinderSpatialObject class.
> 
> Patrick
> 
> Julien Jomier wrote:
> > Hi Patrick,
> > 
> > David told me that the cylinder should be located in the [-Z,0], 
> > therefore the cylinder should be translated by 
> > -m_CylinderSpatialObject->GetHeight()/2.0
> > 
> >  > One quick question: If we can just change the transform when we create
> >  > the actor, what do we need the PrincipalAxisCalibration for?
> > 
> > I don't know what the PrincipalAxisCalibration class is actually doing, 
> > but the user cannot change the actor, so we need a way to calibrate the 
> > tool anyway.
> > 
> > Julien
> > 
> > Patrick Cheng wrote:
> >> Hi Julien,
> >>
> >> I checked out your recent change in the 
> >> CylinderSpatialObjectRepresentation class. Now without setting the 
> >> rotation part of the CalibrationTransform, the orientation of the 
> >> CylinderObject will be correct, but with one little bug, in line 152 
> >> (igstkCylinderObjectRepresentation.cxx)
> >> cylinderActor->SetPosition(0,0,-m_CylinderSpatialObject->GetHeight()/2.0); 
> >>
> >> There should be no '-' sign. I tested it in the application.
> >>
> >> One quick question: If we can just change the transform when we create 
> >> the actor, what do we need the PrincipalAxisCalibration for?
> >>
> >> Patrick
> >>
> > 
> > 
> 




More information about the IGSTK-Developers mailing list