# Revision history [back]

These are the two lines of code you need:

rosrun xacro xacro robot.xacro > robot.urdf
gz sdf -p robot.urdf > robot.sdf


Keep in mind that sometimes not all the parameters will survive the conversion, so check the file before using it.

These are the two lines of code you need:

rosrun xacro xacro --inorder robot.xacro > robot.urdf
gz sdf -p robot.urdf > robot.sdf


Keep in mind that sometimes not all the parameters will survive the conversion, so check the file before using it.