Public Member Functions | |
def | __init__ (self, model=pin.Model(), collision_model=None, visual_model=None, copy_models=False, data=None, collision_data=None, visual_data=None) |
def | captureImage (self, w=None, h=None) |
def | clean (self) |
def | create_video_ctx (self, filename=None, fps=30, directory=None, kwargs) |
def | disableCameraControl (self) |
def | display (self, q=None) |
def | displayCollisions (self, visibility) |
def | displayVisuals (self, visibility) |
def | drawFrameVelocities (self, args, kwargs) |
def | enableCameraControl (self) |
def | getViewerNodeName (self, geometry_object, geometry_type) |
def | has_video_writer (self) |
def | initViewer (self, args, kwargs) |
def | loadViewerModel (self, args, kwargs) |
def | play (self, q_trajectory, dt=None, callback=None, capture=False, kwargs) |
def | rebuildData (self) |
def | reload (self, new_geometry_object, geometry_type=None) |
def | setBackgroundColor (self, args, kwargs) |
def | setCameraPose (self, pose=np.eye(4)) |
def | setCameraPosition (self, position) |
def | setCameraTarget (self, target) |
def | setCameraZoom (self, zoom) |
def | sleep (self, dt) |
Public Attributes | |
collision_data | |
collision_model | |
data | |
model | |
visual_data | |
visual_model | |
Static Private Attributes | |
_video_writer = None | |
Pinocchio visualizers are employed to easily display a model at a given configuration. BaseVisualizer is not meant to be directly employed, but only to provide a uniform interface and a few common methods. New visualizers should extend this class and override its methods as neeeded.
Definition at line 16 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.__init__ | ( | self, | |
model = pin.Model() , |
|||
collision_model = None , |
|||
visual_model = None , |
|||
copy_models = False , |
|||
data = None , |
|||
collision_data = None , |
|||
visual_data = None |
|||
) |
Construct a display from the given model, collision model, and visual model. If copy_models is True, the models are copied. Otherwise, they are simply kept as a reference.
Definition at line 33 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.captureImage | ( | self, | |
w = None , |
|||
h = None |
|||
) |
Captures an image from the viewer and returns an RGB array.
Definition at line 121 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.clean | ( | self | ) |
Delete all the objects from the whole scene
Definition at line 84 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.create_video_ctx | ( | self, | |
filename = None , |
|||
fps = 30 , |
|||
directory = None , |
|||
kwargs | |||
) |
Create a video recording context, generating the output filename if necessary. Code inspired from https://github.com/petrikvladimir/RoboMeshCat.
Definition at line 166 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.disableCameraControl | ( | self | ) |
Definition at line 125 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.display | ( | self, | |
q = None |
|||
) |
Display the robot at configuration q or refresh the rendering from the current placements contained in data by placing all the bodies in the viewer.
Definition at line 88 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.displayCollisions | ( | self, | |
visibility | |||
) |
Set whether to display collision objects or not.
Definition at line 93 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.displayVisuals | ( | self, | |
visibility | |||
) |
Set whether to display visual objects or not.
Definition at line 97 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.drawFrameVelocities | ( | self, | |
args, | |||
kwargs | |||
) |
Draw current frame velocities.
Definition at line 131 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.enableCameraControl | ( | self | ) |
Definition at line 128 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.getViewerNodeName | ( | self, | |
geometry_object, | |||
geometry_type | |||
) |
Return the name of the geometry object inside the viewer.
Definition at line 68 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.has_video_writer | ( | self | ) |
Definition at line 138 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.initViewer | ( | self, | |
args, | |||
kwargs | |||
) |
Init the viewer by loading the gui and creating a window.
Definition at line 72 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.loadViewerModel | ( | self, | |
args, | |||
kwargs | |||
) |
Create the scene displaying the robot meshes in the viewer
Definition at line 76 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.play | ( | self, | |
q_trajectory, | |||
dt = None , |
|||
callback = None , |
|||
capture = False , |
|||
kwargs | |||
) |
Play a trajectory with given time step. Optionally capture RGB images and returns them.
Definition at line 141 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.rebuildData | ( | self | ) |
Re-build the data objects. Needed if the models were modified. Warning: this will delete any information stored in all data objects.
Definition at line 61 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.reload | ( | self, | |
new_geometry_object, | |||
geometry_type = None |
|||
) |
Reload a geometry_object given by its type
Definition at line 80 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.setBackgroundColor | ( | self, | |
args, | |||
kwargs | |||
) |
Set the visualizer background color.
Definition at line 101 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.setCameraPose | ( | self, | |
pose = np.eye(4) |
|||
) |
Set camera 6D pose using a 4x4 matrix.
Definition at line 117 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.setCameraPosition | ( | self, | |
position | |||
) |
Set the camera's 3D position.
Definition at line 109 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.setCameraTarget | ( | self, | |
target | |||
) |
Set the camera target.
Definition at line 105 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.setCameraZoom | ( | self, | |
zoom | |||
) |
Set camera zoom value.
Definition at line 113 of file base_visualizer.py.
def pinocchio.visualize.base_visualizer.BaseVisualizer.sleep | ( | self, | |
dt | |||
) |
Definition at line 135 of file base_visualizer.py.
|
staticprivate |
Definition at line 22 of file base_visualizer.py.
pinocchio.visualize.base_visualizer.BaseVisualizer.collision_data |
Definition at line 52 of file base_visualizer.py.
pinocchio.visualize.base_visualizer.BaseVisualizer.collision_model |
Definition at line 39 of file base_visualizer.py.
pinocchio.visualize.base_visualizer.BaseVisualizer.data |
Definition at line 47 of file base_visualizer.py.
pinocchio.visualize.base_visualizer.BaseVisualizer.model |
Definition at line 38 of file base_visualizer.py.
pinocchio.visualize.base_visualizer.BaseVisualizer.visual_data |
Definition at line 57 of file base_visualizer.py.
pinocchio.visualize.base_visualizer.BaseVisualizer.visual_model |
Definition at line 40 of file base_visualizer.py.