MCPcopy Create free account
hub / github.com/Simple-Robotics/Simple / transform_object

Function transform_object

sandbox/viz_utils.py:111–123  ·  view source on GitHub ↗
(
    viz: MeshcatVisualizer, shape: hppfcl.ShapeBase, shape_name: str, M: pin.SE3
)

Source from the content-addressed store, hash-verified

109
110
111def transform_object(
112 viz: MeshcatVisualizer, shape: hppfcl.ShapeBase, shape_name: str, M: pin.SE3
113) -> None:
114 if isinstance(shape, (hppfcl.Plane, hppfcl.Halfspace)):
115 T = M.copy()
116 T.translation += M.rotation @ (shape.d * shape.n)
117 T = T.homogeneous
118 else:
119 T = M.homogeneous
120
121 # Update viewer configuration.
122 viz.viewer[shape_name].set_transform(T)
123 return
124
125
126def delete_object(viz: MeshcatVisualizer, name: str):

Callers 1

simulateSytemFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected