Skip to content

Commit 83174e7

Browse files
Add frame selector to display_urdf_frames example
1 parent 79ffecf commit 83174e7

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## Unreleased
6+
7+
### Added
8+
9+
- Frame selector in URDF frame display example
10+
- README: Conda installation instructions
11+
512
## [1.4.1] - 2023/2/28
613

714
### Added

examples/display_urdf_frames.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,22 @@
2626
"""
2727

2828
import argparse
29+
import time
2930

3031
import meshcat_shapes
3132
import numpy as np
3233
from meshcat import transformations
3334
from pinocchio.visualize import MeshcatVisualizer
35+
3436
from robot_descriptions.loaders.pinocchio import load_robot_description
3537

3638
if __name__ == "__main__":
3739
parser = argparse.ArgumentParser(description=__doc__)
3840
parser.add_argument("name", help="name of the robot description")
41+
parser.add_argument(
42+
"--only",
43+
help="only display the frame with this name",
44+
)
3945
parser.add_argument(
4046
"--frame-scale",
4147
type=float,
@@ -56,7 +62,7 @@
5662
viewer = robot.viz.viewer
5763

5864
for frame in robot.model.frames:
59-
if frame.name == "universe":
65+
if frame.name == "universe" or (args.only and frame.name != args.only):
6066
continue
6167
handle = viewer["pinocchio"]["visuals"][f"{frame.name}_0"]
6268
meshcat_shapes.frame(

0 commit comments

Comments
 (0)