Class CompositeDevice


  • public class CompositeDevice
    extends JointDevice
    A device constructed from a sequence of devices.

    The configuration of a composite device is equal to the concatenation of
    the configurations of the sequence of devices.

    The devices that make up the CompositeDevice may not share joints, but
    the implementation does not check if this is actually the case.

    A composite device implements its operations of Device by querying each
    Joint in the straight-forward way of JointDevice. The notable
    exception is Device::setQ() which is implemented by forwarding the
    Device::setQ() calls to the sequence of devices. This means that
    CompositeDevice works also for example for devices of type ParallelDevice
    that have an overwritten implementation of Device::setQ().

    The devices from which the composite device is constructed must all be of
    type JointDevice. An exception is thrown by the constructor if one of
    the devices is not of this subtype.

    The computation of Jacobians of CompositeDevice is not correct in
    general, but is correct only for devices for which the standard technique
    of JointDevice is correct. We cannot in general in RobWork do any
    better currently. The implementation does not check if the requirements
    for the computation of Jacobians are indeed satisfied.

    CompositeDevice is related to TreeDevice in the sense that
    CompositeDevice has also multiple end-effectors (one end-effector for
    each device). CompositeDevice differs from TreeDevice by not requiring
    that the child-to-parent paths of the end-effectors connect to a common
    base.
    • Constructor Detail

      • CompositeDevice

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

        public CompositeDevice​(Frame base,
                               DevicePtrVector devices,
                               Frame end,
                               java.lang.String name,
                               State state)
        Constructor
        Parameters:
        base - [in] the base of the device
        devices - [in] the sequence of subdevices
        end - [in] the end (or tool) of the device
        name - [in] the name of the device
        state - [in] the kinematic structure assumed for Jacobian computations
      • CompositeDevice

        public CompositeDevice​(Frame base,
                               DevicePtrVector devices,
                               FrameVector ends,
                               java.lang.String name,
                               State state)
        Constructor
        Parameters:
        base - [in] the base of the device
        devices - [in] the sequence of subdevices
        ends - [in] the end frames (or tools) of the device
        name - [in] the name of the device
        state - [in] the kinematic structure assumed for Jacobian computations
    • Method Detail

      • setQ

        public void setQ​(Q q,
                         State state)


        The method is implemented via forwarding to the Device::setQ()
        methods of the subdevices.
        Overrides:
        setQ in class JointDevice
        Parameters:
        q - [in] configuration vector \mathbf{q}
        state - [in] state into which to set \mathbf{q}

      • baseJends

        public Jacobian baseJends​(State state)
        like Device::baseJend() but with a Jacobian calculated for all
        end-effectors (see getEnds()).
      • getEnds

        public FrameVector getEnds()
        The end-effectors of the composite device.

        The end-effectors of the composite device are the end-effectors of
        the devices from which the composite device was constructed.

        This sequence of end-effectors may or may not include the default
        end-effector returned by getEnd().