Making URDF from CAD - VTAstrobotics/Documentation GitHub Wiki
Objective: To create a viewable robot in RVIZ Contents
To understand the content in this page, you should know how to Make a launch file run a launch file
To create a working URDF you should first have a URDF exported from solid works. There is a solidworks extension for this that a mechanical member can use to make this. This will generate a ros1 launch file. You will need to take the URDF file and the generated meshes to a new package you create. You can then create a launch file using robot state publisher and use it to publish the URDF. When you open RVIZ and add a robot model to the view you'll notice a variety of errors yelling at you. They should say something along the lines of cannot locate package://someName/meshes/something.stl. This is expected. You will need to open the URDF and change all of the lines with package:// to package://yourPackageName/whatever/something.stl. After you do this rebuild the package and refresh rviz everything should show properly after loading.
additional note: you will need to edit the joint constraints in the URDF to mirror whatever robot you are attempting to showcase. Also, you can use joint state publisher and joint state publisher GUI to show the joints moving around after you do.