parameters: (self, target_frame, ps)
return_statement: return r
docstring: :param target_frame: the tf target frame, a string
          :param ps: the geometry_msgs.msg.PoseStamped message
          :return: new geometry_msgs.msg.PoseStamped message, in frame target_frame
          :raises: any of the exceptions that :meth:`~tf.Transformer.lookupTransform` can raise
  
          Transforms a geometry_msgs PoseStamped message to frame target_frame, returns a new PoseStamped message.
docstring_summary: :param target_frame: the tf target frame, a string
          :param ps: the geometry_msgs.msg.PoseStamped message
          :return: new geometry_msgs.msg.PoseStamped message, in frame target_frame
          :raises: any of the exceptions that :meth:`~tf.Transformer.lookupTransform` can raise
docstring_tokens: : param target_frame : the tf target frame a string : param ps : the geometry_msgs . msg . PoseStamped message : return : new geometry_msgs . msg . PoseStamped message in frame target_frame : raises : any of the exceptions that : meth : ~tf . Transformer . lookupTransform can raise
function: def transformPose(self, target_frame, ps):
          """
          :param target_frame: the tf target frame, a string
          :param ps: the geometry_msgs.msg.PoseStamped message
          :return: new geometry_msgs.msg.PoseStamped message, in frame target_frame
          :raises: any of the exceptions that :meth:`~tf.Transformer.lookupTransform` can raise
  
          Transforms a geometry_msgs PoseStamped message to frame target_frame, returns a new PoseStamped message.
          """
          # mat44 is frame-to-frame transform as a 4x4
          mat44 = self.asMatrix(target_frame, ps.header)
  
          # pose44 is the given pose as a 4x4
          pose44 = numpy.dot(xyz_to_mat44(ps.pose.position), xyzw_to_mat44(ps.pose.orientation))
  
          # txpose is the new pose in target_frame as a 4x4
          txpose = numpy.dot(mat44, pose44)
  
          # xyz and quat are txpose's position and orientation
          xyz = tuple(transformations.translation_from_matrix(txpose))[:3]
          quat = tuple(transformations.quaternion_from_matrix(txpose))
  
          # assemble return value PoseStamped
          r = geometry_msgs.msg.PoseStamped()
          r.header.stamp = ps.header.stamp
          r.header.frame_id = target_frame
          r.pose = geometry_msgs.msg.Pose(geometry_msgs.msg.Point(*xyz), geometry_msgs.msg.Quaternion(*quat))
          return r
function_tokens: def transformPose ( self , target_frame , ps ) : # mat44 is frame-to-frame transform as a 4x4 mat44 = self . asMatrix ( target_frame , ps . header ) # pose44 is the given pose as a 4x4 pose44 = numpy . dot ( xyz_to_mat44 ( ps . pose . position ) , xyzw_to_mat44 ( ps . pose . orientation ) ) # txpose is the new pose in target_frame as a 4x4 txpose = numpy . dot ( mat44 , pose44 ) # xyz and quat are txpose's position and orientation xyz = tuple ( transformations . translation_from_matrix ( txpose ) ) [ : 3 ] quat = tuple ( transformations . quaternion_from_matrix ( txpose ) ) # assemble return value PoseStamped r = geometry_msgs . msg . PoseStamped ( ) r . header . stamp = ps . header . stamp r . header . frame_id = target_frame r . pose = geometry_msgs . msg . Pose ( geometry_msgs . msg . Point ( * xyz ) , geometry_msgs . msg . Quaternion ( * quat ) ) return r