ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
When STL files are based on CAD that was defined about some arbitrary point (e.g. instead of using the origin as the center of the part, it is offset by some vector), it makes it a bit of a pain to include in your robot model. If you have access to the original CAD that the STL was exported from, then its easy enough to figure out what the center is and account for it.
When you don't have access to the CAD it can be trickier. For most cases (e.g. set the origin to the centroid of the model), my preferred method is using MeshLab, a powerful, free and open source mesh processing application (decent tutorial here).
If it is a one-off part, it might be just as fast to simply figure out the desired origin using trial and error, until the part is "close enough" to where you want it.