ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

There is nothing special about the file extension on a Linux system. An XML file is just a text file that by convention has .xml at the end, and a URDF is just an text file that happens to contain XML-style code that uses the URDF schema and, by convention, has a .urdf at the end. When you are opening the new_robot.urdf with vim I'm guessing the only that that is "doesn't seem to work" is that the syntax highlighting and formatting rules aren't following XML rules because vim can't guess that this .urdf file is of XML format. Also note, that you don't need to end your URDFs in .urdf, but for readers of any package you create it would be good to follow this convention.

My suggestion: whatever editor you're using figure out how to change the mode to treat URDF files as an XML file. This is easily done in gedit, sublime, atom, emacs, etc. If you are set on using vim, maybe read this: https://stackoverflow.com/a/7601099/1082525

There is nothing special about the file extension on a Linux system. An XML file is just a text file that by convention has .xml at the end, and a URDF is just an a text file that happens to contain XML-style code that uses the URDF schema and, by convention, has a .urdf at the end. When you are opening the new_robot.urdf with vim I'm guessing the only that that is "doesn't seem to work" is that the syntax highlighting and formatting rules aren't following XML rules because vim can't guess that this .urdf file is of XML format. Also note, that you don't need to end your URDFs in .urdf, but for readers of any package you create it would be good to follow this convention.

My suggestion: whatever editor you're using figure out how to change the mode to treat URDF files as an XML file. This is easily done in gedit, sublime, atom, emacs, etc. If you are set on using vim, maybe read this: https://stackoverflow.com/a/7601099/1082525

There is nothing special about the file extension on a Linux system. An XML file is just a text file that by convention has .xml at the end, and a URDF is just a text file that happens to contain XML-style code that uses the URDF schema and, by convention, has a .urdf at the end. When you are opening the new_robot.urdf with vim I'm guessing the only that that is part that "doesn't seem to work" is that the syntax highlighting and formatting rules aren't following XML rules because vim can't guess that this .urdf file is of XML format. Also note, that you don't need to end your URDFs in .urdf, but for readers of any package you create it would be good to follow this convention.

My suggestion: whatever editor you're using figure out how to change the mode to treat URDF files as an XML file. This is easily done in gedit, sublime, atom, emacs, etc. If you are set on using vim, maybe read this: https://stackoverflow.com/a/7601099/1082525

There is nothing special about the file extension on a Linux system. An XML file is just a text file that by convention has .xml at the end, and a URDF is just a text file that happens to contain XML-style code that uses the URDF schema and, by convention, has a .urdf at the end. When you are opening the new_robot.urdf with vim I'm guessing the only part that "doesn't seem to work" is that the syntax highlighting and formatting rules aren't following XML rules because vim can't guess that this .urdf file is of XML format. Also note, that you don't need to end your URDFs in .urdf, but for readers of any package you create it would be good to follow this convention.

My suggestion: whatever editor you're using using, figure out how to change the mode to treat URDF files as an XML file. This is easily done in gedit, sublime, atom, emacs, etc. If you are set on using vim, maybe read this: https://stackoverflow.com/a/7601099/1082525