-
-
Notifications
You must be signed in to change notification settings - Fork 624
The data package
The toolbox contains executable code, mostly Python but some C++ code (compiled via
nanobind) for kinematics/dynamics, and data such as STL meshes, URDF files, and some
datasets.
The data significantly outweighs the code. PyPI has a limit on the total amount of data a package can have, the bigger each release of a package is, the fewer versions can be held at any one time. Unlike the code, the data doesn't change much, but it adds baggage to every PyPI release.
For this reason the data part of the Toolbox is packaged and distributed separately, as
rtb-data. You don't need to explicitly install the
data package, since it is a dependency of RTB and will be automatically installed when you
install roboticstoolbox-python.
The installed package (importable as rtbdata) currently has these top-level folders:
| Folder | Purpose |
|---|---|
| data | miscellaneous STL files and data sets |
| meshes | STL mesh models for DH robots |
| xacro | URDF/xacro models for URDF robots |
| armer_xarm | xArm-specific data used by the armer integration |
pip will install the package at some place of its choosing in your filesystem, but the path to any of the files can be easily found:
from roboticstoolbox.tools.data import rtb_path_to_datafile
path = rtb_path_to_datafile("xacro", "franka_description", "robots", "frankie_arm_hand.urdf.xacro")Data files, such as those that support examples in the RVC book, can be similarly located and loaded
from roboticstoolbox.tools.data import rtb_load_matfile
m = rtb_load_matfile("data/house.mat")which finds and parses a MATLAB style .mat file, then returns its contents as a dict.
There's an equivalent rtb_load_jsonfile for JSON data.
- Frequently asked questions (FAQ)
- Documentation Style Guide
- Background
- Key concepts
- Introduction to robot and link classes
- Working with Jupyter
- Working from the command line
- What about Simulink?
- How to contribute
- Contributors