Compute inertial parameters for a mesh using pymeshlab and return the URDF inertial tag for links.
Project description
urdf-mesh-inertia
Compute inertial parameters for a mesh using pymeshlab and return the URDF inertial tag for links.
Installation
Using pipx
The best way to install urdf-mesh-inertia is using pipx:
$ pipx install urdf-mesh-inertia
Using pip
When using pip it's suggested to work inside a virtualenv.
$ python -m pip install urdf-mesh-inertia
From source
urdf-mesh-inertia uses Poetry as dependency management and packaging tool, you need to install it first.
Then:
- Clone this repository.
- From the root of the repository run:
$ poetry build
- Install using pipx or pip (it's better to use pipx):
$ pipx install dist/urdf_mesh_inertia-0.1.0-py3-none-any.whl
Usage
Usage: urdf-mesh-inertia [OPTIONS]
Compute inertial parameters for a mesh.
Calculation is made using pymeshlab and the URDF inertial tag for links is
returned.
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ * --mesh-path PATH Path of the mesh. [default: None] [required] │
│ * --mass FLOAT Mass of the mesh in kg. [default: None] │
│ [required] │
│ --precision INTEGER Rounding at specified decial digit. │
│ [default: None] │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
For example:
$ urdf-mesh-inertia --precision 8 ~/devel/ros/darwin_description/meshes/head_coll.stl 0.158
Will give us:
<inertial>
<origin xyz="0.0025258 -0.0244761 6.7e-07"/>
<mass value="0.158"/>
<inertia ixx="0.0001567" ixy="2.494e-05" ixz="-0.0" iyy="0.00016806" iyz="0.0" izz="0.00017144"/>
</inertial>
--precision
round at the specified decimal position. If you don't want
rounding run the command without it.
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 Distribution
Close
Hashes for urdf_mesh_inertia-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0006ce254d34c6020aa2b96fdc4ede404b30d5da6cba67d5988cba08263e12c9 |
|
MD5 | 1061b267dd858f320b224e19a2b5c5ab |
|
BLAKE2b-256 | e245e19d01dd9c3e459650f8be13098710ce98c0c25b4a257ef125a8dfd9528e |