Class KinematicsPtr


  • public class KinematicsPtr
    extends java.lang.Object
    Ptr stores a pointer and optionally takes ownership of the value.
    • Constructor Detail

      • KinematicsPtr

        public KinematicsPtr​(long cPtr,
                             boolean cMemoryOwn)
      • KinematicsPtr

        public KinematicsPtr()
        Default constructor yielding a NULL-pointer.
      • KinematicsPtr

        public KinematicsPtr​(Kinematics ptr)
        Do not take ownership of ptr.

        ptr can be null.

        The constructor is implicit on purpose.
    • Method Detail

      • delete

        public void delete()
      • deref

        public Kinematics deref()
        The pointer stored in the object.
      • __ref__

        public Kinematics __ref__()
        Dereferencing operator.
      • getDeref

        public Kinematics getDeref()
        Member access operator.
      • equals

        public boolean equals​(Kinematics p)
      • isShared

        public boolean isShared()
        check if this Ptr has shared ownership or none
        ownership
        Returns:
        true if Ptr has shared ownership, false if it has no ownership.
      • isNull

        public boolean isNull()
        checks if the pointer is null
        Returns:
        Returns true if the pointer is null
      • worldTframe

        public Transform3D worldTframe​(FrameCPtr to,
                                       State state)
        The transform of frame in relative to the world frame.

        If to=NULL the method returns a 4 \times 4 identify matrix

        Parameters:
        to - [in] The transform for which to find the world frame.

        state - [in] The state of the kinematics tree.

        Returns:
        The transform of the frame relative to the world frame.
      • frameTframe

        public Transform3D frameTframe​(FrameCPtr from,
                                       FrameCPtr to,
                                       State state)
        The transform of frame to relative to frame from.

        FrameTframe() is related to WorldTframe() as follows:
        frameTframe(from, to, state) == inverse(worldTframe(from, state)) * worldTframe(to, state);

        Parameters:
        from - [in] The start frame.

        to - [in] The end frame.

        state - [in] The state of the kinematics tree.

        Returns:
        The transform from the start frame to the end frame.
      • findAllFrames

        public FrameVector findAllFrames​(FramePtr root,
                                         State state)
        All frames reachable from root for a tree structure of
        state.

        This is a tremendously useful utility. An alternative would be to have an
        iterator interface for trees represented by work cell states.

        We give no guarantee on the ordering of the frames.

        Parameters:
        root - [in] The root node from where the frame search is started.

        state - [in] The structure of the tree.

        Returns:
        All reachable frames.
      • findAllFrames

        public FrameVector findAllFrames​(FramePtr root)
        All frames reachable from root for a tree structure.

        This is a tremendously useful utility. An alternative would be to have an
        iterator interface for trees represented by work cell states.

        We give no guarantee on the ordering of the frames.

        DAF are not included.

        Parameters:
        root - [in] The root node from where the frame search is started.

        Returns:
        All reachable frames.
      • worldFrame

        public Frame worldFrame​(FramePtr frame,
                                State state)
        Find the world frame of the workcell by traversing the path
        from frame to the root of the tree.

        The state state is needed to retrieve the parent frames, but the
        world frame returned is the same for any (valid) state.
      • childToParentChain

        public FrameVector childToParentChain​(FramePtr child,
                                              FramePtr parent,
                                              State state)
        The chain of frames connecting child to parent.

        child is included in the chain, but parent is not included. If
        parent is NULL then the entire path from child to the world
        frame is returned. If child as well as parent is NULL then the
        empty chain is gracefully returned.

        The state gives the connectedness of the tree.

        If parent is not on the chain from child towards the root, then
        an exception is thrown.
      • reverseChildToParentChain

        public FrameVector reverseChildToParentChain​(FramePtr child,
                                                     FramePtr parent,
                                                     State state)
        Like ChildToParentChain() except that the frames are returned
        in the reverse order.
      • parentToChildChain

        public FrameVector parentToChildChain​(FramePtr parent,
                                              FramePtr child,
                                              State state)
        The chain of frames connecting parent to child.

        parent is included in the list, but child is excluded. If
        parent as well as child is NULL then the empty chain is returned.
        Otherwise parent is included even if parent is NULL.
      • buildFrameMap

        public MapStringFrame buildFrameMap​(FramePtr root,
                                            State state)
        A map linking frame names to frames.

        The map contains an entry for every frame below root in the tree with
        structure described by state.

        Parameters:
        root - [in] Root of the kinematics tree to search.

        state - [in] The kinematics tree structure.
      • isDAF

        public boolean isDAF​(FrameCPtr frame)
        True if frame is a DAF and false otherwise.
      • isFixedFrame

        public boolean isFixedFrame​(FrameCPtr frame)
        Check if frame is fixed.
        Parameters:
        frame - [in] the frame.
        Returns:
        true if fixed, false otherwise.
      • getStaticFrameGroups

        public VectorVectorFrame getStaticFrameGroups​(FramePtr root,
                                                      State state)
        Get static frame groups.

        A static frame group consist of frames that are fixed with respect to the other frames in
        the group. A Dynamically Attachable Frame (DAF) or a MovableFrame will divide a static
        group.
        Parameters:
        root - [in] the root frame of the tree to search.
        state - [in] containing information about the current tree state and the Dynamically
        Attachable Frames (DAF).
        Returns:
        vector with the frame groups.