Pure python package to solve ROS-style package:// and Gazebo-style model:// URIs in absolute paths.
Project description
resolve-robotics-uri-py
Pure Python package (that only depends on Python stdlib) to resolve a package:// (ROS-style) or model:// (Gazebo-style) URI to an absolute filename.
Installation
Install using onle one of the following commands to install in an existing environment:
Installation from conda-forge
mamba install -c conda-forge resolve-robotics-uri-py
Installation from PyPI
python -m pip install resolve-robotics-uri-py
Usage in Python
Add import resolve_robotics_uri_py
to your Python file, then take inspiration from the following examples.
If you want to get the location of the iCubGazeboV2_7
iCub model installed from icub-models
:
absolute_path = resolve_robotics_uri_py.resolve_robotics_uri("package://iCub/robots/iCubGazeboV2_7/model.urdf")
If you want to get the location of the ergoCubSN00
model installed from ergocub-software
:
absolute_path = resolve_robotics_uri_py.resolve_robotics_uri("package://ergoCub/robots/ergoCubSN000/model.urdf")
If you want to get the location of the panda
model installed by moveit_resources_panda_description
:
absolute_path = resolve_robotics_uri_py.resolve_robotics_uri("package://moveit_resources_panda_description/urdf/panda.urdf")
Command Line usage
resolve_robotics_uri_py
also install a command line tool called resolve-robotics-uri-py
for use in scripts, that can be used as:
resolve-robotics-uri-py package://iCub/robots/iCubGazeboV2_7/model.urdf
For example, on bash this can be used to easily convert the a urdf specified via package://
to an sdf (assuming you have Gazebo installed), using the backtick operator:
gz sdf -p `resolve-robotics-uri-py package://iCub/robots/iCubGazeboV2_7/model.urdf`
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
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
File details
Details for the file resolve_robotics_uri_py-0.3.0.tar.gz
.
File metadata
- Download URL: resolve_robotics_uri_py-0.3.0.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | be5b2c1eae3e61fa537f141f1320af47541bce2a58f8608bf50db28d4f660632 |
|
MD5 | 158a6250404696f612310832ba300220 |
|
BLAKE2b-256 | 09fe3ebe45cb6008cc97b946d87d0b88e32903bc0906ad4f220ba738f7812414 |
File details
Details for the file resolve_robotics_uri_py-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: resolve_robotics_uri_py-0.3.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37d67c966524e4009de24b43e3d1ae0fea878a3a8ff9841cf0c2a1cd9b6aea42 |
|
MD5 | a9759309a2c8d7d74713596f9127558f |
|
BLAKE2b-256 | 3dfb771bb2ba23dbb6dde639ea368f48ec7318221e8899439967d7d7dbc14c87 |