src/conntact/assembly_tools.py
def publish_wrench(self, input_vec):
        """Publish the commanded wrench to the command topic.
        :param vec: (list of Floats) XYZ force commands
        :param vec: (list of Floats) XYC commanded torque.
        """
        # self.check_controller(self.force_controller)
        # forces, torques = self.com_to_tcp(result[:3], result[3:], transform)
        # result_wrench = self.create_wrench(result[:3], result[3:])
        # result_wrench = self.create_wrench([7,0,0], [0,0,0])
        result_wrench = self.create_wrench(input_vec[:3], input_vec[3:])

        transform_world_to_gripper:TransformStamped = self.tf_buffer.lookup_transform('target_hole_position', 'tool0', rospy.Time(0), rospy.Duration(1.25))

        offset =Point( -1*self.tool_data[self.activeTCP]["transform"].transform.translation.x, -1*self.tool_data[self.activeTCP]["transform"].transform.translation.y, -1*(self.tool_data[self.activeTCP]["transform"].transform.translation.z - .05))

        transform_world_to_gripper.transform.translation = offset

        #Execute reinterpret-to-tcp and rotate-to-world simultaneously:
        result_wrench.wrench = AssemblyTools.transform_wrench(transform_world_to_gripper, result_wrench.wrench) #This works

        self._wrench_pub.publish(result_wrench)
Publish the commanded wrench to the command topic.
        :param vec: (list of Floats) XYZ force commands
        :param vec: (list of Floats) XYC commanded torque.
        
Publish the commanded wrench to the command topic.
Publish the commanded wrench to the command topic .
def publish_wrench(self, input_vec):
        result_wrench = self.create_wrench(input_vec[:3], input_vec[3:])
        transform_world_to_gripper:TransformStamped = self.tf_buffer.lookup_transform('target_hole_position', 'tool0', rospy.Time(0), rospy.Duration(1.25))
        offset =Point( -1*self.tool_data[self.activeTCP]["transform"].transform.translation.x, -1*self.tool_data[self.activeTCP]["transform"].transform.translation.y, -1*(self.tool_data[self.activeTCP]["transform"].transform.translation.z - .05))
        transform_world_to_gripper.transform.translation = offset
        result_wrench.wrench = AssemblyTools.transform_wrench(transform_world_to_gripper, result_wrench.wrench) 
        self._wrench_pub.publish(result_wrench)
def publish_wrench ( self , input_vec ) : result_wrench = self . create_wrench ( input_vec [ : 3 ] , input_vec [ 3 : ] ) transform_world_to_gripper : TransformStamped = self . tf_buffer . lookup_transform ( 'target_hole_position' , 'tool0' , rospy . Time ( 0 ) , rospy . Duration ( 1.25 ) ) offset = Point ( - 1 * self . tool_data [ self . activeTCP ] [ "transform" ] . transform . translation . x , - 1 * self . tool_data [ self . activeTCP ] [ "transform" ] . transform . translation . y , - 1 * ( self . tool_data [ self . activeTCP ] [ "transform" ] . transform . translation . z - .05 ) ) transform_world_to_gripper . transform . translation = offset result_wrench . wrench = AssemblyTools . transform_wrench ( transform_world_to_gripper , result_wrench . wrench ) self . _wrench_pub . publish ( result_wrench )
Publish the commanded wrench to the command topic.
Publish the commanded wrench to the command topic .
"""Publish the commanded wrench to the command topic.
        :param vec: (list of Floats) XYZ force commands
        :param vec: (list of Floats) XYC commanded torque.
        """ # self.check_controller(self.force_controller) # forces, torques = self.com_to_tcp(result[:3], result[3:], transform) # result_wrench = self.create_wrench(result[:3], result[3:]) # result_wrench = self.create_wrench([7,0,0], [0,0,0]) #Execute reinterpret-to-tcp and rotate-to-world simultaneously: #This works
self
input_vec
vec
(list of Floats) XYC commanded torque.
( list of Floats ) XYC commanded torque .