src/conntact/assembly_tools.py
def transform_wrench(transform: TransformStamped, wrench: Wrench, invert:bool=False, log:bool=False) -> np.ndarray:
        """Transform a wrench object by the given transform object.
        :param transform: (geometry_msgs.TransformStamped) Transform to apply
        :param wrench: (geometry_msgs.Wrench) Wrench object to transform.
        :param invert: (bool) Whether to interpret the tansformation's inverse, i.e. transform "from child to parent" instead of "from parent to child"
        :return: (geometry.msgs.Wrench) changed wrench
        """

        matrix = AssemblyTools.to_homogeneous(transform.transform.rotation, transform.transform.translation)

        if(log):
            rospy.loginfo_throttle(2, Fore.RED + " Transform passed in is " + str(transform) + " and matrix passed in is \n" + str(matrix) + Style.RESET_ALL)
        
        if(invert):
            matrix = trfm.inverse_matrix(matrix)

        return AssemblyTools.transform_wrench_by_matrix(matrix, AssemblyTools.wrenchToArray(wrench))
Transform a wrench object by the given transform object.
        :param transform: (geometry_msgs.TransformStamped) Transform to apply
        :param wrench: (geometry_msgs.Wrench) Wrench object to transform.
        :param invert: (bool) Whether to interpret the tansformation's inverse, i.e. transform "from child to parent" instead of "from parent to child"
        :return: (geometry.msgs.Wrench) changed wrench
        
Transform a wrench object by the given transform object.
Transform a wrench object by the given transform object .
def transform_wrench(transform: TransformStamped, wrench: Wrench, invert:bool=False, log:bool=False) -> np.ndarray:
        matrix = AssemblyTools.to_homogeneous(transform.transform.rotation, transform.transform.translation)
        if(log):
            rospy.loginfo_throttle(2, Fore.RED + " Transform passed in is " + str(transform) + " and matrix passed in is \n" + str(matrix) + Style.RESET_ALL)
        if(invert):
            matrix = trfm.inverse_matrix(matrix)
        return AssemblyTools.transform_wrench_by_matrix(matrix, AssemblyTools.wrenchToArray(wrench))
def transform_wrench ( transform : TransformStamped , wrench : Wrench , invert : bool = False , log : bool = False ) -> np . ndarray : matrix = AssemblyTools . to_homogeneous ( transform . transform . rotation , transform . transform . translation ) if ( log ) : rospy . loginfo_throttle ( 2 , Fore . RED + " Transform passed in is " + str ( transform ) + " and matrix passed in is \n" + str ( matrix ) + Style . RESET_ALL ) if ( invert ) : matrix = trfm . inverse_matrix ( matrix ) return AssemblyTools . transform_wrench_by_matrix ( matrix , AssemblyTools . wrenchToArray ( wrench ) )
Transform a wrench object by the given transform object.
Transform a wrench object by the given transform object .
"""Transform a wrench object by the given transform object.
        :param transform: (geometry_msgs.TransformStamped) Transform to apply
        :param wrench: (geometry_msgs.Wrench) Wrench object to transform.
        :param invert: (bool) Whether to interpret the tansformation's inverse, i.e. transform "from child to parent" instead of "from parent to child"
        :return: (geometry.msgs.Wrench) changed wrench
        """
(geometry.msgs.Wrench) changed wrench
( geometry . msgs . Wrench ) changed wrench
transform
TransformStamped
(geometry_msgs.TransformStamped) Transform to apply
( geometry_msgs . TransformStamped ) Transform to apply
wrench
Wrench
(geometry_msgs.Wrench) Wrench object to transform.
( geometry_msgs . Wrench ) Wrench object to transform .
invert
bool
(bool) Whether to interpret the tansformation's inverse, i.e. transform "from child to parent" instead of "from parent to child"
( bool ) Whether to interpret the tansformation ' s inverse i . e . transform " from child to parent " instead of " from parent to child "
log
bool