CHAI3DCHAI3D

normal Displaying the reference Frames

More
14 Apr 2016 23:19 #1

Hi

I am trying the display all the reference frames/co-ordinate axis present in my simulation/scene.

In example-1,2 and 3. Reference frame is displayed using

cShapeSphere* cursor;
cursor->setShowFrame(true);
cursor->setFrameSize(0.05);

and by using haptics update function , we kept on updating the cursor with the haptic device.


Now i want to display all the reference frames of the objects present in Example:22 Chrome
1. world reference frame
2. Tool reference frame
3. Object(chrome) reference frame.

I am successful only up to displaying the world frame by using the above piece of code.
I tried using
tool->setShowFrame(true);
object->setShowFrame(true); But unable to to display them.

How can i display both tool and object reference/co-ordinate frame (in general all objects)present in the scene ?

Please Log in or Create an account to join the conversation.

More
17 Apr 2016 23:28 #2

Rendering reference frames requires enabling their display and optionally setting their size.
These settings can also been propagated to their children.

Here is an example:

    // enable display of reference frames and apply option to all children in scenegraph
    world->setShowFrame(true, true);

    // set reference frame size and apply option to all children in scenegraph
    world->setFrameSize(0.1, true);

The reference frame of a tool only represents the position and orientation of the workspace center of the haptic device. If you want to render the reference frame of the device and proxy position, then the following code should be called for each haptic point:
    // display frame of proxy
    tool->m_hapticPoint->m_sphereProxy->setShowFrame(true);
    tool->m_hapticPoint->m_sphereProxy->setFrameSize(0.2);

    // display frame of haptic device (goal position)
    tool->m_hapticPoint->m_sphereGoal->->setShowFrame(true);
    tool->m_hapticPoint->m_sphereGoal->setFrameSize(0.2);

Please Log in or Create an account to join the conversation.

More
16 Aug 2016 20:15 #3

Hi,

Thanks for the reply.

I tried the above code.
tool->m_hapticPoint->m_sphereProxy->setShowFrame(true);
tool->m_hapticPoint->m_sphereProxy->setFrameSize(0.2);

The reference frame's position is updated along with the m_sphereProxy/m_sphereGoal.
But the orientation is not getting updated. What ever the be the rotation of the haptic device (i have omni phantom) the axis remains in same orientation.

Attachment chrome.JPG not found

Attachments:

Please Log in or Create an account to join the conversation.