A MATLAB toolkit for programmatically creating, modifying, and managing URDF (Unified Robot Description Format) files. This library provides an object-oriented interface for robot model construction and manipulation.
-
Complete URDF Element Support
- Links and Joints (Continuous, Fixed, Floating, Planar, Prismatic, Revolute)
- Visual and Geometric Components (Box, Cylinder, Sphere, Mesh)
- Origins and Transformations
- Materials and Properties
- Reusable Component assemblies
-
Object-Oriented Design
- Clean class hierarchy with
URDFTag
as base class - Modular component structure
- Extensible architecture
- Clean class hierarchy with
-
Comprehensive Joint Types
- Continuous joints for unlimited rotation
- Fixed joints for rigid connections
- Floating joints for unconstrained motion
- Planar joints for 2D movement
- Prismatic joints for linear motion
- Revolute joints with configurable limits
-
Comprehensive Geometry Support
- Basic shapes (Box, Cylinder, Sphere)
- Mesh import capabilities
- Visual component management
- Origin and transformation handling
-
Reusable Component Assembly Support
- Create reusable component assemblies with links and joints
- Define and attach parameters to component assemblies
- Create unique component instances with their own set of parameter values
-
XML Processing
- Read existing URDF files
- Write URDF files
- Compare URDF structures
- Validate URDF syntax
└── robotBuilder_matlab/
├── +urdf
│ ├── +joints
│ │ ├── Continuous.m
│ │ ├── Fixed.m
│ │ ├── Floating.m
│ │ ├── Planar.m
│ │ ├── Prismatic.m
│ │ └── Revolute.m
│ ├── +shapes
│ │ ├── Box.m
│ │ ├── Cylinder.m
│ │ ├── Mesh.m
│ │ └── Sphere.m
│ ├── +util
│ │ ├── isNullTag.m
│ │ ├── findNodeFromRobotRoot.m
│ │ ├── compareURDF.m
│ │ ├── readXML.m
│ │ └── writeToURDFFile.m
│ ├── Axis.m
│ ├── Builder.m
│ ├── Component.m
│ ├── Geometry.m
│ ├── Inertial.m
│ ├── Joint.m
│ ├── Link.m
│ ├── Material.m
│ ├── Origin.m
│ ├── Robot.m
│ ├── URDFTag.m
│ └── Visual.m
├── LICENSE
└── minion.mlx
- Robot: Main container class for the URDF model
- Component: Reusable component class for component assemblies
- Link: Represents physical elements of the robot
- Joint: Base class for all joint types
- URDFTag: Base class providing XML functionality
- Geometry: Handles visual representation
- Origin: Manages spatial transformations
Before getting started with robotBuilder_matlab, ensure your runtime environment meets the following requirements:
- Programming Language: MATLAB
- Tools: MATLAB (Version R2023b and Above)
- Clone the repository:
git clone https://github.com/artineering/robotBuilder_matlab.git
- Add the project directory to your MATLAB path:
addpath('/path/to/robotBuilder_matlab');
% Initialize a new robot
robot = urdf.Robot('my_robot');
% Add a base link
base_link = urdf.Link('base_link');
robot.addLink(base_link);
% Add a joint
joint = urdf.joints.Revolute('joint1', 'base_link', 'link1', -pi/2, pi/2, 100, 1);
robot.addJoint(joint);
% Write to file
urdf.util.writeToURDFFile(robot, 'my_robot.urdf');
% Read from file
robot_node = urdf.util.readXML('existing_robot.urdf');
robot = urdf.Robot.buildFromURDF(robot_node);
- 💬 Join the Discussions: Share your insights, provide feedback, or ask questions.
- 🐛 Report Issues: Submit bugs found or log feature requests for the
robotBuilder_matlab
project. - 💡 Submit Pull Requests: Review open PRs, and submit your own PRs.
Contributing Guidelines
- Fork the Repository: Start by forking the project repository to your github account.
- Clone Locally: Clone the forked repository to your local machine using a git client.
git clone https://github.com/artineering/robotBuilder_matlab
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.'
- Push to github: Push the changes to your forked repository.
git push origin new-feature-x
- Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
- Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
If you use this software in your research, please cite:
@software{robotbuilder_matlab,
title={MATLAB URDF Builder},
author={Siddharth Vaghela},
year={2024},
url={https://github.com/artineering/robotBuilder_matlab}
}