/// <summary> /// Writes an attachment to the .URDF file /// </summary> /// <param name="att"> Attachment to be written </param> /// <param name="parentLink"> The Link that contains this attachment </param> /// <param name="writer"> The writer that will be used to write the URDF</param> private void WriteAttachment(Attachment att, Link parentLink, XmlWriter writer) { att.WriteElements(log, writer); log.WriteMessage("Finished writing attachment " + att.Name + " to URDF."); }
/// <summary> /// Writes an attachment of a Joint to the .SDF file /// </summary> /// <param name="att"> Attachment to be written </param> /// <param name="parentJoint"> The joint that contains this attachment </param> /// <param name="writer"> The writer that will be used to write the URDF</param> private void WriteAttachmentSDF(Attachment att, Joint parentJoint, XmlWriter writer) { att.WriteElements(log, writer); log.WriteMessage("Finished writing attachment " + att.Name + " to SDF."); }
/// <summary> /// removes the inputed Attachment from this link /// </summary> /// <param name="att"> Attachment to be removed </param> public void RemoveAttachment(Attachment att) { RobotInfo.WriteToLogFile("Removing attachment (Link)"); attachments.Remove(att); attachmentNums.RemoveItem(Convert.ToInt32(att.Path.Remove(0, path.Length + 13))); RobotInfo.WriteToLogFile("Successfully removed attachment from link (Link)"); }
/// <summary> /// Writes an attachment of a Link to the .SDF file /// </summary> /// <param name="att"> Attachment to be written </param> /// <param name="parentLink"> The Link that contains this attachment </param> /// <param name="writer"> The writer that will be used to write the URDF</param> private void WriteAttachmentSDF(Attachment att, Link parentLink, XmlWriter writer) { att.WritePlugins(log, writer); log.WriteMessage("Finished writing attachment " + att.Name + " to SDF."); }