Fast Rust implementation of xacro with enhanced features for modular robotics
Project description
Zacro
Fast Rust implementation of xacro (XML macro language) with enhanced features for modular robotics.
Overview
Zacro is a high-performance Rust implementation of the xacro XML macro language with enhanced features specifically designed for modular robotics applications. It provides:
- Complete macro expansion: Full support for xacro macro definitions and calls
- Formatted output: Optional XML formatting with proper indentation
- Modular robot support: Remove redundant first joints for modular robot assemblies
- High performance: Rust implementation for fast processing of large xacro files
- Python bindings: Easy-to-use Python API with both functional and class-based interfaces
Features
- ✅ Complete macro expansion
- ✅ Property definitions and substitution
- ✅ Mathematical expressions
- ✅ File inclusion with package resolution
- ✅ Formatted XML output
- ✅ Modular robot first joint removal
- ✅ Python bindings
- ✅ Class-based and functional APIs
Installation
pip install zacro
From Source
git clone https://github.com/iory/zacro
cd zacro
pip install maturin
maturin develop --features python
Quick Start
Basic Usage
import zacro
# Process xacro file to URDF
result = zacro.xacro_to_string("robot.xacro")
# Process with formatting
result = zacro.xacro_to_string("robot.xacro", format_output=True)
# Process from string
xml_string = """<?xml version="1.0"?>
<robot xmlns:xacro="http://ros.org/wiki/xacro">
<xacro:macro name="box" params="name">
<link name="${name}">
<visual><geometry><box size="1 1 1"/></geometry></visual>
</link>
</xacro:macro>
<xacro:box name="my_box"/>
</robot>"""
result = zacro.xacro_from_string(xml_string, format_output=True)
Modular Robot Support
For modular robot xacro files where each module has a connection joint to its parent:
# Remove redundant first joints in modular robot assemblies
result = zacro.xacro_to_string(
"modular_robot.xacro",
format_output=True,
remove_first_joint=True
)
Class-based API
processor = zacro.XacroProcessor()
processor.set_format_output(True)
processor.set_remove_first_joint(True)
result = processor.process_file("robot.xacro")
Building
Prerequisites
- Rust 1.70+
- Python 3.8+ (for Python bindings)
- maturin (for Python bindings)
Build Rust Library
cargo build --release
Build Python Extension
maturin develop --features python
Run Tests
cargo test
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zacro-1.0.13.tar.gz.
File metadata
- Download URL: zacro-1.0.13.tar.gz
- Upload date:
- Size: 100.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8f327e26e6c65ca55762e9604b0907f9beb938c0d7978a7fd2b95e4dff16ca4
|
|
| MD5 |
42353d30cdc74fdb7a47cfd96abd218f
|
|
| BLAKE2b-256 |
1f8d2ba36b5009ff9f0da166c34e5a7fe15b84c2d16ce9ee47d1a6c814496bf6
|
File details
Details for the file zacro-1.0.13-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: zacro-1.0.13-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8884c7f7d005806d06b60708d5c593ff09ea6ef49efb09bd0dead5b556c7bf3d
|
|
| MD5 |
c7b807ee9085181e30be25d8f4487cd3
|
|
| BLAKE2b-256 |
fbfdfc930036f10b45dae10d27f083502e5b845cc3409ef3439e71116273d1a8
|
File details
Details for the file zacro-1.0.13-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: zacro-1.0.13-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9808cbb5f74a1075f7bfb74a8c19150ae2e565eb472f0762cfd144178907fa59
|
|
| MD5 |
93e9a8b12675a5d2c067e35ad0a3bf29
|
|
| BLAKE2b-256 |
f199d782fc4fcab1e1ab1e69ac3e78b40d7be639b58ad01199ff2158f520ebb3
|
File details
Details for the file zacro-1.0.13-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: zacro-1.0.13-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e77ab99d6be8abf168b03141247e9dc14c87e63ecdb59f8ed23f60615a13929f
|
|
| MD5 |
9c281d55f8bb5ba901e62051f24deb18
|
|
| BLAKE2b-256 |
badce417e4b41b629439bda24eb324b70cbeaad5abc381f4725682a89ae79e5c
|
File details
Details for the file zacro-1.0.13-cp313-cp313-macosx_10_13_x86_64.whl.
File metadata
- Download URL: zacro-1.0.13-cp313-cp313-macosx_10_13_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.13, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4cc453dc861f989795ce5c9c84d350a77e104955a9fd4d13609cfb4f4f01a8c
|
|
| MD5 |
cf5f5755f10e2d7b65df8d79c0f09c54
|
|
| BLAKE2b-256 |
084162b7689b637fd3b05051991b5b33bfe1d4ff0ab00db5a27a7dcc72691dca
|
File details
Details for the file zacro-1.0.13-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: zacro-1.0.13-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8a30f8c5e08d4ea16febea715e4b3c81303edf530f19a9d5cbd76c5af236a2e
|
|
| MD5 |
94e314b066217400ea2141a9ac5765e3
|
|
| BLAKE2b-256 |
d896acfe8e749d2584cf995ababd7cf91563f370abdf4b9d69727ffc00202cdd
|
File details
Details for the file zacro-1.0.13-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: zacro-1.0.13-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e28d1517955e5086fdcfd4ecc631d644006c851a9384e7993cbb5cc9bfc312d
|
|
| MD5 |
5f446f5793f133f51219f44c682c39c0
|
|
| BLAKE2b-256 |
e086c6ba2d84991c93ae37563c7d64b1c327d0b41412579298a1c6cc31f1ef60
|
File details
Details for the file zacro-1.0.13-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: zacro-1.0.13-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f11fe4afa0db81474a6e28c6c86a7bb1b434f64bdd34a9b5db99240b7be039df
|
|
| MD5 |
8693259ea91c0645c733ac7e924e540c
|
|
| BLAKE2b-256 |
c59e21c35824720bfc9aeb2ef2f8720cfff84385e6e104f09bd8058f1e46a93d
|
File details
Details for the file zacro-1.0.13-cp312-cp312-macosx_10_13_x86_64.whl.
File metadata
- Download URL: zacro-1.0.13-cp312-cp312-macosx_10_13_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.12, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2ded6cba1cccc0cf65bf403fbd777c7bc26dd62da553dcd03a612fa659d95ca
|
|
| MD5 |
222aef23e363d4b5bc91bc33d0a2943e
|
|
| BLAKE2b-256 |
7148244af1766093137aef215a4fcd6476b2c7f397f6af98ab0e09153cff0baf
|
File details
Details for the file zacro-1.0.13-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: zacro-1.0.13-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
577a6f9fa4eabdd85fcebfc184ff699fe0178588ea41944fa9f3e31c07867bab
|
|
| MD5 |
ff120463ed268a58b084922f343531f9
|
|
| BLAKE2b-256 |
ae1b6bb298138646ce680a422b5e6b2f21597d3b7ca470eef3c71f0ed0e08b04
|
File details
Details for the file zacro-1.0.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: zacro-1.0.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44bbbd4d12b50d7c383b5525015e44f1ab7c1ceba4cae1d7b010d4f75e1b47f6
|
|
| MD5 |
e603857dededb4508a042020fb27a325
|
|
| BLAKE2b-256 |
8cf85699a890aeff997b17ce7a76344ba1969dd1aed8c011deb8eafc7bd8827a
|
File details
Details for the file zacro-1.0.13-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: zacro-1.0.13-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24d11cbcfcb5889f7528c49e2cbd4d577eaf0d12e446060a18572a87dd21ff20
|
|
| MD5 |
33bf1f48f4e287831e47e17aa6a244e4
|
|
| BLAKE2b-256 |
ee75734422d89263a314744e3d5f2106422d01363f52e19c6918bdeabe89a2ce
|
File details
Details for the file zacro-1.0.13-cp311-cp311-macosx_10_12_x86_64.whl.
File metadata
- Download URL: zacro-1.0.13-cp311-cp311-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.11, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1efed3adcf711ed2117a8063427289f48051964dc3a2199cbf98bf8301f4fb5f
|
|
| MD5 |
84724fcc80a7b7027ba895d908ba44f4
|
|
| BLAKE2b-256 |
6d90082bd42a887c54333b9b7ae611d75b3821298dab1b3af16190939bab7c55
|
File details
Details for the file zacro-1.0.13-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: zacro-1.0.13-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4732878716c61ee5159574c4ab4cbaea8c4ed771b19a2fc64272494001a49ba
|
|
| MD5 |
1d1f112db645aecf1aad5b9ee9e69514
|
|
| BLAKE2b-256 |
40e8fe6fc8842587329f7a3a82239eca683d0c10d16ab66f2d0119a0c38d96da
|
File details
Details for the file zacro-1.0.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: zacro-1.0.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5e01142a3b736c29517e64f0a103d7c1ef680fa90648cf1a6f39c7979500925
|
|
| MD5 |
a8fcd58f2c1bd7597660bbda1fbf94e8
|
|
| BLAKE2b-256 |
68ea1b62db471fb2a5bf78308774f3bb0cabaa08cdec7e8a7effb89f5cdcc9d0
|
File details
Details for the file zacro-1.0.13-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: zacro-1.0.13-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c612cf50b8938dd9d5fad9ed7c122a9ab10f90ea751359ebbd1dc08d38c0912
|
|
| MD5 |
7a5ec608d63233e4b96c1e9f5370d262
|
|
| BLAKE2b-256 |
f1bb2eca37fa99797c98220efaa8223700ee42f40ced9d4b704a9ecbbd83c0dd
|
File details
Details for the file zacro-1.0.13-cp310-cp310-macosx_10_12_x86_64.whl.
File metadata
- Download URL: zacro-1.0.13-cp310-cp310-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.10, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45446b7af496a9a133d5cfa9d1bf4ff7d7bc71c5fe6079300f8d03dbf74b6194
|
|
| MD5 |
558d22a2321624c87ff251b3a172dd13
|
|
| BLAKE2b-256 |
f4ecf35f62fb93b4fcfed756a00126bf5c317fe3eb342a573aeafd3b16666458
|
File details
Details for the file zacro-1.0.13-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: zacro-1.0.13-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90f522de04df235e1ab067d763e90b871bfaf83d06103d7ffbd8f39bcde6e3f0
|
|
| MD5 |
3cec7b2c95b2b6c81b60a71e65523603
|
|
| BLAKE2b-256 |
b3884abb6c5b61cd370494e37d9406fbe84512035e5ed78076dade468b09225d
|
File details
Details for the file zacro-1.0.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: zacro-1.0.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62eba1296633f9a13d9cee578f41b76750172d1612b4b3f03afa040f799a177e
|
|
| MD5 |
3e2b3f2ed220b71c5b0171619687d316
|
|
| BLAKE2b-256 |
3282c6394d44732a90e3bace0ce18121238b675f4db41862655e1d0d441cefea
|
File details
Details for the file zacro-1.0.13-cp39-cp39-macosx_11_0_arm64.whl.
File metadata
- Download URL: zacro-1.0.13-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bafa42a35f54fb2fd7d4307bc10099681c5ac73643adf231280febaad4a873f0
|
|
| MD5 |
efe12905621a9e34cf18b13930398624
|
|
| BLAKE2b-256 |
d30fe3e362abc64545d581b4e9b8fe7027477b28e9a91f79b6145b1b50be6e78
|
File details
Details for the file zacro-1.0.13-cp39-cp39-macosx_10_12_x86_64.whl.
File metadata
- Download URL: zacro-1.0.13-cp39-cp39-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.9, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb691a286076be2862464be8fc43883917bdee3a51e394ec98b8464525eba31e
|
|
| MD5 |
856a68e5494d33bb3e02b1b7c98a1a14
|
|
| BLAKE2b-256 |
1ac83a965b17b0bd94565029e89481447f7a977eab0b4385e1c803ef1a1817b3
|
File details
Details for the file zacro-1.0.13-cp38-cp38-win_amd64.whl.
File metadata
- Download URL: zacro-1.0.13-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b5bbc349a6a02a8ca850e83abbbd3a7b0230192057eab2d65fb0fc2738869ac
|
|
| MD5 |
760d652820725013bcf5265de17948d4
|
|
| BLAKE2b-256 |
0716a246ccc10aa967fa1a5e63dbdb87a89ca5d044308ad2fbd47c43a6289cad
|
File details
Details for the file zacro-1.0.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: zacro-1.0.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba8df3c449e60622e23c452274f736c12fa0981c15ef4f59f4f8d6b7ce9613bc
|
|
| MD5 |
0754e431c4ffe741f83ae247398f4dd2
|
|
| BLAKE2b-256 |
41be412c52298fb9cd92291f0cc935f1432fb8f04ee70ca19f29ad32cdfd861d
|
File details
Details for the file zacro-1.0.13-cp38-cp38-macosx_11_0_arm64.whl.
File metadata
- Download URL: zacro-1.0.13-cp38-cp38-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.8, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e291c358868fbd9ab37a960ff5bd3992b314271021f9b712beacb76090b5f7c3
|
|
| MD5 |
bad9585300e224855b1d47062cbf5a2b
|
|
| BLAKE2b-256 |
b2409134715f751ea41b041299bfb4bd41cb9a7430c2a6044fbd6aee1cb176b7
|
File details
Details for the file zacro-1.0.13-cp38-cp38-macosx_10_12_x86_64.whl.
File metadata
- Download URL: zacro-1.0.13-cp38-cp38-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.8, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
391969444ba7f61abd041f13b91632247df67f26984f6eddfbd1fc9c3163865d
|
|
| MD5 |
78f49fbe34e778538cabc89efe801307
|
|
| BLAKE2b-256 |
65be3441a11de004a812a27484407abe837c04964bbc4df9aaf17c4d84806352
|