Skip to content

A MATLAB toolkit for programmatically creating, modifying, and managing URDF (Unified Robot Description Format) files

License

Notifications You must be signed in to change notification settings

artineering/robotBuilder_matlab

Repository files navigation

MATLAB URDF Builder

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.

license last-commit repo-top-language repo-language-count


Table of Contents


Overview

  • 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
  • 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

Project Structure

└── 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

Key Classes

  • 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

Getting Started

Prerequisites

Before getting started with robotBuilder_matlab, ensure your runtime environment meets the following requirements:

  • Programming Language: MATLAB
  • Tools: MATLAB (Version R2023b and Above)

Installation

  1. Clone the repository:
git clone https://github.com/artineering/robotBuilder_matlab.git
  1. Add the project directory to your MATLAB path:
addpath('/path/to/robotBuilder_matlab');

Usage

Creating a Simple Robot

% 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');

Loading Existing URDF

% Read from file
robot_node = urdf.util.readXML('existing_robot.urdf');
robot = urdf.Robot.buildFromURDF(robot_node);

Contributing

Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your github account.
  2. Clone Locally: Clone the forked repository to your local machine using a git client.
    git clone https://github.com/artineering/robotBuilder_matlab
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
  6. Push to github: Push the changes to your forked repository.
    git push origin new-feature-x
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
  8. Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
Contributor Graph


License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.


Citing

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}
}

About

A MATLAB toolkit for programmatically creating, modifying, and managing URDF (Unified Robot Description Format) files

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages