kinematicsgenerator

A set of tools to generate C code for kinematic functions and URDF files from a Denavit-Hartenberg table

https://github.com/gmescudero/kinematicsgenerator

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.2%) to scientific vocabulary

Keywords

c codegen kinematics robotics ros urdf
Last synced: 4 months ago · JSON representation ·

Repository

A set of tools to generate C code for kinematic functions and URDF files from a Denavit-Hartenberg table

Basic Info
  • Host: GitHub
  • Owner: gmescudero
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 253 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 1
  • Releases: 0
Topics
c codegen kinematics robotics ros urdf
Created over 3 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

README.md

KinematicsGenerator

This script allows to generate multiple useful tools for robots from a simple Denavit-Hartenberg parameters table. The motivation of the project comes for the need of computing Forward Kinematics and jacobian functions for Real Time applications in C code, and to create quick simulation models for ROS or Unity by computing its URDF file.

Installation

To install the KinematicsGenerator script, follow these steps:

  1. Clone the repository: sh git clone https://github.com/gmescudero/KinematicsGenerator.git
  2. Navigate to the project directory: sh cd KinematicsGenerator
  3. Install the required dependencies: sh pip install -r requirements.txt

Basic Usage

To use the KinematicsGenerator script, follow these steps:

  1. Prepare a Denavit-Hartenberg parameters table in a CSV file. The included example in file example_UR3e.csv may be used as template. It comes from the UR3e DH table in the Universal Robots page. This CSV needs to have the following columns in any order:
    • theta, d, a, alpha: Denavit Hartenberg parameters.
    • joint_type: It can be ROTATIONAL, PRISMATIC, or None, to allow for intermediate transforms. Note that this field is not case sensitive.
    • joint (optional): This allows setting a specific name for some or all the joints in the kinematic chain. It defaults to q#, being # the joint number of the chain starting from 0.
    • upper_limit (optional): The maximum value the joint should reach. It defaults to $2\pi$ for rotationals and $100000$ for prismatics.
    • lower_limit (optional): The minimum value the joint should reach. It defaults to $-2\pi$ for rotationals and $-100000$ for prismatics.
  2. Run the script with the path to your CSV file as an argument: sh python kinematicBuilder.py example_UR3.csv
  3. The script will generate a kinematics model and, from that, it will create:

    • A .c file containing:

      • The direct kinematics function.
      • The analyithical jacobians for the whole robot and splited in position and orientation.
      • The geometrical jacobian for speed calculations

        NOTE: The tool represents the robot pose by using a vector of 9 elements consisting on the 3 cartesian coordinates followed by the two first unit vectors of a rotation matrix.

        $$T = [[x y z], [u0 u1 u2], [v0 v1 v2]]$$

- A *URDF* file with a basic model automatically built with cylinders for rotational joints and prisms for prismatic ones. The colors of each one indicate the order of the links, it being: Red, Green, Blue, Cyan, Magenta, Yelow, Black, and over again. In the below image it can be found the *URDF* outcome generated by the script from the given example.

    <img src="example_UR3e.png" alt="URDF outcome example" width="300"/>

For more detailed usage and options, refer to the script's help: sh python kinematicBuilder.py --help

Owner

  • Login: gmescudero
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: If you use this software, please cite it as below.
title: Kinematics Builder
abstract: This project provides a library that allows building a kinematic model for a robot from a Denavit Hartenberg table.
authors:
- family-names: Moreno Escudero
  given-names: German
keywords:
- kinematics
- denavit hartenberg
- urdf
- C code generation
- ROS
version: 1.0
date-released: 2024-05-08
url: "https://github.com/gmescudero/KinematicsGenerator"

GitHub Events

Total
  • Issues event: 6
  • Watch event: 1
  • Push event: 25
Last Year
  • Issues event: 6
  • Watch event: 1
  • Push event: 25

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 4
  • Total pull requests: 0
  • Average time to close issues: 8 months
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 3
  • Pull requests: 0
  • Average time to close issues: 9 days
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • gmescudero (4)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels