-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #400 from iory/docs
[docs] Add robot model tips for no-mesh-mode
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ API Reference | |
sdfs | ||
planner | ||
viewers | ||
robot_model_tips |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Robot Model Tips | ||
================ | ||
|
||
Loading the Robot Model Without Mesh Data | ||
--------------------------------------- | ||
|
||
Sometimes, loading a robot model with full mesh data can be slow and resource-intensive. If mesh data is not necessary for your use case, you can improve the loading speed by disabling mesh data loading as shown below: | ||
|
||
.. code-block:: python | ||
from datetime import datetime | ||
from skrobot.models import PR2 | ||
from skrobot.utils.urdf import no_mesh_load_mode | ||
start = datetime.now() | ||
robot_no_mesh = PR2() | ||
end = datetime.now() | ||
print(end - start) | ||
# 0:00:00.269310 | ||
# Load the PR2 model without mesh data for faster initialization | ||
start = datetime.now() | ||
with no_mesh_load_mode(): | ||
robot_no_mesh = PR2() | ||
end = datetime.now() | ||
print(end - start) | ||
# 0:00:00.083222 | ||
This approach is useful when you only need the basic structure of the robot without the visual details of the mesh, which can be beneficial in scenarios where performance is prioritized over graphical fidelity. |