Class MobileDevice


  • public class MobileDevice
    extends Device
    Provides a differential controlled mobile device

    The MobileDevice class provides a differential controlled mobile device
    with non-holonomic constraints. The x direction is defined as
    straight forward and z vertically up. The wheels are assumed to be
    positioned summetrically around the base and have 0 x
    component.

    When using setQ it takes 2 parameters, which corresponds to the distances
    travelled by the wheels. Based on this input and the current pose of the
    device it calcualtes a new pose as.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      JacobianCalculatorPtr baseJCframes​(FrameVector frames, State state)

      Not implemented.
      Jacobian baseJend​(State state)
      Calculates the jacobian matrix of the end-effector described
      in the robot base frame ^{base}_{end}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

      Jacobian baseJframe​(Frame frame, State state)

      Not implemented.
      Jacobian baseJframes​(FrameVector frames, State state)

      Not implemented.
      void delete()  
      Q getAccelerationLimits()
      Returns the maximal acceleration of the joints
      \mathbf{\ddot{q}}_{max}\in \mathbb{R}^n

      It is assumed that \ddot{\mathbf{q}}_{min}=-\ddot{\mathbf{q}}_{max}

      Frame getBase()
      a method to return the frame of the base of the device.
      PairQ getBounds()
      Returns the upper \mathbf{q}_{min} \in \mathbb{R}^n and
      lower \mathbf{q}_{max} \in \mathbb{R}^n bounds of the joint space

      static long getCPtr​(MobileDevice obj)  
      long getDOF()
      Returns number of active joints
      Frame getEnd()
      a method to return the frame of the end of the device
      Q getQ​(State state)
      Gets configuration vector \mathbf{q}\in \mathbb{R}^n

      Q getVelocityLimits()
      Returns the maximal velocity of the joints
      \mathbf{\dot{q}}_{max}\in \mathbb{R}^n

      It is assumed that \dot{\mathbf{q}}_{min}=-\dot{\mathbf{q}}_{max}

      void setAccelerationLimits​(Q acclimits)
      Sets the maximal acceleration of the joints
      \mathbf{\ddot{q}}_{max}\in \mathbb{R}^n

      It is assumed that \ddot{\mathbf{q}}_{min}=-\ddot{\mathbf{q}}_{max}

      void setBounds​(PairQ bounds)
      Sets the upper \mathbf{q}_{min} \in \mathbb{R}^n and
      lower \mathbf{q}_{max} \in \mathbb{R}^n bounds of the joint space

      void setDevicePose​(Transform3Dd transform, State state)
      Sets the position and orientation of the base

      This operation moves the base of the robot, without considering
      the non-holonomic constraints of the device
      void setQ​(Q q, State state)
      Sets configuration vector \mathbf{q} \in \mathbb{R}^n

      void setVelocityLimits​(Q vellimits)
      Sets the maximal velocity of the joints
      \mathbf{\dot{q}}_{max}\in \mathbb{R}^n

      It is assumed that \dot{\mathbf{q}}_{min}=-\dot{\mathbf{q}}_{max}

      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MobileDevice

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

        public MobileDevice​(MovableFrame base,
                            RevoluteJoint wheel1,
                            RevoluteJoint wheel2,
                            State state,
                            java.lang.String name)
        Constructs a mobile device
        Parameters:
        base - [in] the base of the device
        wheel1 - [in] the left wheel
        wheel2 - [in] the right wheel
        state - [in] the state of the device
        name - [in] name of device
    • Method Detail

      • getCPtr

        public static long getCPtr​(MobileDevice obj)
      • delete

        public void delete()
        Overrides:
        delete in class Device
      • setDevicePose

        public void setDevicePose​(Transform3Dd transform,
                                  State state)
        Sets the position and orientation of the base

        This operation moves the base of the robot, without considering
        the non-holonomic constraints of the device
        Parameters:
        transform - [in] new base transform
        state - [in] state to write change to
      • setQ

        public void setQ​(Q q,
                         State state)
        Description copied from class: Device
        Sets configuration vector \mathbf{q} \in \mathbb{R}^n

        Overrides:
        setQ in class Device
        Parameters:
        q - [in] configuration vector \mathbf{q}
        state - [in] state into which to set \mathbf{q}

      • getQ

        public Q getQ​(State state)
        Description copied from class: Device
        Gets configuration vector \mathbf{q}\in \mathbb{R}^n

        Overrides:
        getQ in class Device
        Parameters:
        state - [in] state from which which to get \mathbf{q}
        Returns:
        configuration vector \mathbf{q}
      • getBounds

        public PairQ getBounds()
        Description copied from class: Device
        Returns the upper \mathbf{q}_{min} \in \mathbb{R}^n and
        lower \mathbf{q}_{max} \in \mathbb{R}^n bounds of the joint space

        Overrides:
        getBounds in class Device
        Returns:
        std::pair containing (\mathbf{q}_{min}, \mathbf{q}_{max})
      • setBounds

        public void setBounds​(PairQ bounds)
        Description copied from class: Device
        Sets the upper \mathbf{q}_{min} \in \mathbb{R}^n and
        lower \mathbf{q}_{max} \in \mathbb{R}^n bounds of the joint space

        Overrides:
        setBounds in class Device
        Parameters:
        bounds - [in] std::pair containing
        (\mathbf{q}_{min}, \mathbf{q}_{max})
      • getVelocityLimits

        public Q getVelocityLimits()
        Description copied from class: Device
        Returns the maximal velocity of the joints
        \mathbf{\dot{q}}_{max}\in \mathbb{R}^n

        It is assumed that \dot{\mathbf{q}}_{min}=-\dot{\mathbf{q}}_{max}

        Overrides:
        getVelocityLimits in class Device
        Returns:
        the maximal velocity
      • setVelocityLimits

        public void setVelocityLimits​(Q vellimits)
        Description copied from class: Device
        Sets the maximal velocity of the joints
        \mathbf{\dot{q}}_{max}\in \mathbb{R}^n

        It is assumed that \dot{\mathbf{q}}_{min}=-\dot{\mathbf{q}}_{max}

        Overrides:
        setVelocityLimits in class Device
        Parameters:
        vellimits - [in] rw::math::Q with the maximal velocity
      • getAccelerationLimits

        public Q getAccelerationLimits()
        Description copied from class: Device
        Returns the maximal acceleration of the joints
        \mathbf{\ddot{q}}_{max}\in \mathbb{R}^n

        It is assumed that \ddot{\mathbf{q}}_{min}=-\ddot{\mathbf{q}}_{max}

        Overrides:
        getAccelerationLimits in class Device
        Returns:
        the maximal acceleration
      • setAccelerationLimits

        public void setAccelerationLimits​(Q acclimits)
        Description copied from class: Device
        Sets the maximal acceleration of the joints
        \mathbf{\ddot{q}}_{max}\in \mathbb{R}^n

        It is assumed that \ddot{\mathbf{q}}_{min}=-\ddot{\mathbf{q}}_{max}

        Overrides:
        setAccelerationLimits in class Device
        Parameters:
        acclimits - [in] the maximal acceleration
      • getDOF

        public long getDOF()
        Description copied from class: Device
        Returns number of active joints
        Overrides:
        getDOF in class Device
        Returns:
        number of active joints n
      • getBase

        public Frame getBase()
        Description copied from class: Device
        a method to return the frame of the base of the device.
        Overrides:
        getBase in class Device
        Returns:
        the base frame
      • getEnd

        public Frame getEnd()
        Description copied from class: Device
        a method to return the frame of the end of the device
        Overrides:
        getEnd in class Device
        Returns:
        the end frame
      • baseJend

        public Jacobian baseJend​(State state)
        Description copied from class: Device
        Calculates the jacobian matrix of the end-effector described
        in the robot base frame ^{base}_{end}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

        Overrides:
        baseJend in class Device
        Parameters:
        state - [in] State for which to calculate the Jacobian

        Returns:
        the 6*ndof jacobian matrix: {^{base}_{end}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

        This method calculates the jacobian relating joint velocities ( \mathbf{\dot{q}} ) to the end-effector velocity seen from
        base-frame ( \nu^{ase}_{end} )

        \nu^{base}_{end} = {^{base}_{end}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}


        The jacobian matrix {^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})
        is defined as:

        {^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}

        Where:
        {^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \left[ \begin{array}{cccc} {^{base}_1}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) {^{base}_2}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) \cdots {^b_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) \\ \end{array} \right]
        where {^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) is defined by
        {^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \begin{array}{cc} \left[ \begin{array}{c} {^{base}}\mathbf{z}_i \times {^{i}\mathbf{p}_n} \\ {^{base}}\mathbf{z}_i \\ \end{array} \right] \textrm{revolute joint} \end{array}
        {^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \begin{array}{cc} \left[ \begin{array}{c} {^{base}}\mathbf{z}_i \\ \mathbf{0} \\ \end{array} \right] \textrm{prismatic joint} \\ \end{array}

        By default the method forwards to baseJframe().
      • baseJframe

        public Jacobian baseJframe​(Frame frame,
                                   State state)

        Not implemented.
        Overrides:
        baseJframe in class Device
        Parameters:
        frame - [in] Frame for which to calculate the Jacobian
        state - [in] State for which to calculate the Jacobian

        Returns:
        the 6*ndof jacobian matrix: {^{base}_{frame}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

        This method calculates the jacobian relating joint velocities ( \mathbf{\dot{q}} ) to the frame f velocity seen from base-frame
        ( \nu^{base}_{frame} )

        \nu^{base}_{frame} = {^{base}_{frame}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}


        The jacobian matrix {^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})
        is defined as:

        {^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}

        By default the method forwards to baseJframes().
      • baseJframes

        public Jacobian baseJframes​(FrameVector frames,
                                    State state)

        Not implemented.
        Overrides:
        baseJframes in class Device
        Parameters:
        frames - [in] the frames to calculate the frames from
        state - [in] the state to calculate in
        Returns:
        the jacobian