Successfully integrated STL meshes from Fusion 360 into the SCARA robot URDF, replacing geometric primitives with realistic visual representations. Resolved coordinate system alignment issues and achieved proper mesh positioning for all robot links.
Key Accomplishments
1. STL Mesh Infrastructure Setup
- Created mesh directory structure:
/meshes/visual/and/meshes/collision/ - Implemented conditional rendering: Xacro-based switching between meshes and geometric shapes
- Updated CMakeLists.txt: Proper installation of mesh files
- Verified mesh installation: All 8 STL files correctly installed in package
2. Coordinate System Resolution
Problem Identified: F360 STL exports had coordinate system misalignment with ROS conventions
- Base link: Y-axis through triangle face (needed Z-axis)
- Links 1 & 2: Incorrect orientations and positioning relative to joints
Solutions Applied:
<!-- Base Link Correction --> <origin xyz="0 0 -0.1" rpy="1.5708 0 0"/> <!-- 90° X-rotation to align Z-axis through face, Z-offset for centering --> <!-- Link 1 Correction --> <origin xyz="0.05 0 0" rpy="1.57 0 -1.57"/> <!-- Position and orientation adjustment for proper joint alignment --> <!-- Link 2 Correction --> <origin xyz="-0.05 -0.022 0" rpy="0 0 -3.14159"/> <!-- 180° rotation and position offset for correct extension from Link 1 -->
3. World Frame Implementation
- Added world frame: Created proper root coordinate system
- Positioned base_link: Full control over robot placement in world coordinates
- Joint structure:
world → base_link → z_carriage → link1 → coupling_link → link2 → end_effector
4. Interactive Marker Development (Attempted)
- Created custom node:
link_pose_adjuster.pyfor real-time URDF adjustment - 6DOF controls: Translation and rotation markers for each link
- Real-time feedback: Console output of exact URDF origin values
- Status: Infrastructure ready, markers not displaying (troubleshooting needed)
Technical Details
Mesh File Structure
meshes/ ├── visual/ │ ├── base_link_visual.stl (612KB) │ ├── link1_visual.stl (196KB) │ ├── link2_visual.stl (353KB) │ └── end_effector_visual.stl (612KB) └── collision/ ├── base_link_collision.stl ├── link1_collision.stl ├── link2_collision.stl └── end_effector_collision.stl
URDF Configuration Parameters
<xacro:property name="use_meshes" value="true" /> <xacro:property name="mesh_path" value="package://chessmate_description/meshes" />
Scaling Factor
- Applied scale:
0.001 0.001 0.001(mm to meters conversion) - Verified: All meshes display at correct size relative to geometric primitives
Problem-Solving Approach
1. Systematic Debugging
- URDF parsing verification: Used
xacrocommand to validate syntax - Mesh installation check: Verified files in
install/directory - Topic monitoring: Checked
/robot_descriptionpublication - TF tree analysis: Confirmed proper joint relationships
2. Coordinate System Analysis
- Visual inspection: Used RViz2 coordinate grid for reference
- Trial and error optimization: Systematic rotation and translation testing
- F360 export considerations: Identified common coordinate system issues
3. Iterative Refinement
- Base link first: Established proper foundation coordinate system
- Sequential link adjustment: Fixed each link relative to its parent
- Joint relationship validation: Ensured proper kinematic chain
Current Status
✅ Working Components
- Mesh loading: All STL files display correctly
- Coordinate alignment: Z-axis through base triangle face
- Link positioning: Link2 starts at end of Link1
- Joint kinematics: Proper SCARA motion with mechanical coupling
- Scaling: Accurate size representation
🔧 Areas for Enhancement
- Interactive markers: Troubleshoot display issues
- Mesh accuracy: Replace with more precise F360 exports
- Collision geometry: Optimize for motion planning
- Inertial properties: Add accurate mass/inertia values
Lessons Learned
1. F360 Export Best Practices
- Coordinate system: Always verify axis alignment before export
- Origin placement: Consider joint centers vs geometry centers
- File organization: Separate visual and collision meshes
2. URDF Mesh Integration
- Conditional rendering: Essential for development flexibility
- Origin transforms: Critical for proper mesh positioning
- Package installation: CMakeLists.txt mesh directory inclusion required
3. Debugging Strategies
- Systematic approach: More efficient than pure trial-and-error
- Visual references: RViz2 coordinate grid invaluable for alignment
- Incremental testing: Build and test after each major change
Next Steps
- Chess board integration: Create F360-based chess board URDF
- Workspace analysis: Validate reachability with accurate geometry
- Motion planning setup: MoveIt2 configuration with refined URDF
- Interactive marker resolution: Debug display issues for future use
Vipin M
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.