src/conntact/assembly_tools.py
def create_wrench(self, force:list, torque:list) -> WrenchStamped:
        """Composes a standard wrench object from human-readable vectors.
        :param force: (list of floats) x,y,z force values
        :param torque: (list of floats) torques about x,y,z
        :return: (geometry.msgs.WrenchStamped) Output wrench.
        """
        wrench_stamped = WrenchStamped()
        wrench = Wrench()

        # create wrench
        wrench.force.x, wrench.force.y, wrench.force.z = force
        wrench.torque.x, wrench.torque.y, wrench.torque.z = torque 
        
        # create header
        # wrench_stamped.header.seq = self._seq

        wrench_stamped.header.stamp = rospy.get_rostime()
        wrench_stamped.header.frame_id = "base_link"
        # self._seq+=1

        wrench_stamped.wrench = wrench

        return wrench_stamped
Composes a standard wrench object from human-readable vectors.
        :param force: (list of floats) x,y,z force values
        :param torque: (list of floats) torques about x,y,z
        :return: (geometry.msgs.WrenchStamped) Output wrench.
        
Composes a standard wrench object from human-readable vectors.
Composes a standard wrench object from human - readable vectors .
def create_wrench(self, force:list, torque:list) -> WrenchStamped:
        wrench_stamped = WrenchStamped()
        wrench = Wrench()
        wrench.force.x, wrench.force.y, wrench.force.z = force
        wrench.torque.x, wrench.torque.y, wrench.torque.z = torque 
        wrench_stamped.header.stamp = rospy.get_rostime()
        wrench_stamped.header.frame_id = "base_link"
        wrench_stamped.wrench = wrench
        return wrench_stamped
def create_wrench ( self , force : list , torque : list ) -> WrenchStamped : wrench_stamped = WrenchStamped ( ) wrench = Wrench ( ) wrench . force . x , wrench . force . y , wrench . force . z = force wrench . torque . x , wrench . torque . y , wrench . torque . z = torque wrench_stamped . header . stamp = rospy . get_rostime ( ) wrench_stamped . header . frame_id = "base_link" wrench_stamped . wrench = wrench return wrench_stamped
Composes a standard wrench object from human-readable vectors.
Composes a standard wrench object from human - readable vectors .
"""Composes a standard wrench object from human-readable vectors.
        :param force: (list of floats) x,y,z force values
        :param torque: (list of floats) torques about x,y,z
        :return: (geometry.msgs.WrenchStamped) Output wrench.
        """ # create wrench # create header # wrench_stamped.header.seq = self._seq # self._seq+=1
(geometry.msgs.WrenchStamped) Output wrench.
( geometry . msgs . WrenchStamped ) Output wrench .
self
force
list
(list of floats) x,y,z force values
( list of floats ) x y z force values
torque
list
(list of floats) torques about x,y,z
( list of floats ) torques about x y z