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 | addGeometryObject (self, pin.GeometryObject obj, color=None) |
def | captureImage (self, w=None, h=None) |
def | clean (self) |
def | delete (self, geometry_object, geometry_type) |
def | disableCameraControl (self) |
def | display (self, q=None) |
def | displayCollisions (self, visibility) |
def | displayFrames (self, visibility, frame_ids=None, axis_length=0.2, axis_width=2) |
def | displayVisuals (self, visibility) |
def | drawFrameVelocities (self, int frame_id, v_scale=0.2, color=FRAME_VEL_COLOR) |
def | enableCameraControl (self) |
def | getViewerNodeName (self, geometry_object, geometry_type) |
def | initializeFrames (self, frame_ids=None, axis_length=0.2, axis_width=2) |
def | initViewer (self, viewer=None, open=False, loadModel=False, zmq_url=None) |
def | loadMeshFromFile (self, geometry_object) |
def | loadPrimitive (self, pin.GeometryObject geometry_object) |
def | loadViewerGeometryObject (self, geometry_object, geometry_type, color=None) |
def | loadViewerModel (self, rootNodeName="pinocchio", color=None, collision_color=None, visual_color=None) |
def | reload (self, new_geometry_object, geometry_type=None) |
def | reset (self) |
def | setBackgroundColor (self, str preset_name="gray", col_top=None, col_bot=None) |
def | setCameraPose (self, pose) |
def | setCameraPosition (self, np.ndarray position) |
def | setCameraPreset (self, str preset_key) |
def | setCameraTarget (self, np.ndarray target) |
def | setCameraZoom (self, float zoom) |
def | updateFrames (self) |
def | updatePlacements (self, geometry_type) |
Public Attributes | |
display_collisions | |
display_frames | |
display_visuals | |
frame_ids | |
static_objects | |
viewer | |
viewerCollisionGroupName | |
viewerFramesGroupName | |
viewerRootNodeName | |
viewerVisualGroupName | |
Static Public Attributes | |
ClassVar | |
float | FORCE_SCALE = 0.06 |
int | FRAME_VEL_COLOR = 0x00FF00 |
Private Member Functions | |
def | _check_meshcat_has_get_image (self) |
def | _draw_vectors_from_frame (self, List[np.ndarray] vecs, List[int] frame_ids, List[str] vec_names, List[int] colors) |
Private Attributes | |
_node_background | |
_node_default_cam | |
_rot_cam_key | |
A Pinocchio display using Meshcat
Definition at line 540 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.__init__ | ( | self, | |
model = pin.Model() , |
|||
collision_model = None , |
|||
visual_model = None , |
|||
copy_models = False , |
|||
data = None , |
|||
collision_data = None , |
|||
visual_data = None |
|||
) |
Definition at line 562 of file meshcat_visualizer.py.
|
private |
Definition at line 995 of file meshcat_visualizer.py.
|
private |
Draw vectors extending from given frames.
Definition at line 1085 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.addGeometryObject | ( | self, | |
pin.GeometryObject | obj, | ||
color = None |
|||
) |
Add a visual GeometryObject to the viewer, with an optional color.
Definition at line 990 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.captureImage | ( | self, | |
w = None , |
|||
h = None |
|||
) |
Capture an image from the Meshcat viewer and return an RGB array.
Definition at line 1002 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.clean | ( | self | ) |
Definition at line 933 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.delete | ( | self, | |
geometry_object, | |||
geometry_type | |||
) |
Definition at line 936 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.disableCameraControl | ( | self | ) |
Definition at line 662 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.display | ( | self, | |
q = None |
|||
) |
Display the robot at configuration q in the viewer by placing all the bodies
Definition at line 940 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.displayCollisions | ( | self, | |
visibility | |||
) |
Set whether to display collision objects or not.
Definition at line 1012 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.displayFrames | ( | self, | |
visibility, | |||
frame_ids = None , |
|||
axis_length = 0.2 , |
|||
axis_width = 2 |
|||
) |
Set whether to display frames or not.
Definition at line 1034 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.displayVisuals | ( | self, | |
visibility | |||
) |
Set whether to display visual objects or not.
Definition at line 1023 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.drawFrameVelocities | ( | self, | |
int | frame_id, | ||
v_scale = 0.2 , |
|||
color = FRAME_VEL_COLOR |
|||
) |
Definition at line 1075 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.enableCameraControl | ( | self | ) |
Definition at line 665 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.getViewerNodeName | ( | self, | |
geometry_object, | |||
geometry_type | |||
) |
Return the name of the geometry object inside the viewer.
Definition at line 591 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.initializeFrames | ( | self, | |
frame_ids = None , |
|||
axis_length = 0.2 , |
|||
axis_width = 2 |
|||
) |
Initializes the frame objects for display.
Definition at line 1041 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.initViewer | ( | self, | |
viewer = None , |
|||
open = False , |
|||
loadModel = False , |
|||
zmq_url = None |
|||
) |
Start a new MeshCat server and client. Note: the server can also be started separately using the "meshcat-server" command in a terminal: this enables the server to remain active after the current script ends.
Definition at line 598 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.loadMeshFromFile | ( | self, | |
geometry_object | |||
) |
Definition at line 739 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.loadPrimitive | ( | self, | |
pin.GeometryObject | geometry_object | ||
) |
Definition at line 668 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.loadViewerGeometryObject | ( | self, | |
geometry_object, | |||
geometry_type, | |||
color = None |
|||
) |
Load a single geometry object
Definition at line 764 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.loadViewerModel | ( | self, | |
rootNodeName = "pinocchio" , |
|||
color = None , |
|||
collision_color = None , |
|||
visual_color = None |
|||
) |
Load the robot in a MeshCat viewer. Parameters: rootNodeName: name to give to the robot in the viewer color: deprecated and optional, color to give to both the collision and visual models of the robot. This setting overwrites any color specified in the robot description. Format is a list of four RGBA floating-point numbers (between 0 and 1) collision_color: optional, color to give to the collision model of the robot. Format is a list of four RGBA floating-point numbers (between 0 and 1) visual_color: optional, color to give to the visual model of the robot. Format is a list of four RGBA floating-point numbers (between 0 and 1)
Definition at line 861 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.reload | ( | self, | |
new_geometry_object, | |||
geometry_type = None |
|||
) |
Reload a geometry_object given by its name and its type
Definition at line 918 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.reset | ( | self | ) |
Definition at line 627 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.setBackgroundColor | ( | self, | |
str | preset_name = "gray" , |
||
col_top = None , |
|||
col_bot = None |
|||
) |
Set the background.
Definition at line 631 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.setCameraPose | ( | self, | |
pose | |||
) |
Definition at line 659 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.setCameraPosition | ( | self, | |
np.ndarray | position | ||
) |
Definition at line 645 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.setCameraPreset | ( | self, | |
str | preset_key | ||
) |
Set the camera angle and position using a given preset.
Definition at line 648 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.setCameraTarget | ( | self, | |
np.ndarray | target | ||
) |
Definition at line 642 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.setCameraZoom | ( | self, | |
float | zoom | ||
) |
Definition at line 655 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.updateFrames | ( | self | ) |
Updates the frame visualizations with the latest transforms from model data.
Definition at line 1065 of file meshcat_visualizer.py.
def pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.updatePlacements | ( | self, | |
geometry_type | |||
) |
Definition at line 956 of file meshcat_visualizer.py.
|
private |
Definition at line 608 of file meshcat_visualizer.py.
|
private |
Definition at line 607 of file meshcat_visualizer.py.
|
private |
Definition at line 609 of file meshcat_visualizer.py.
|
static |
Definition at line 545 of file meshcat_visualizer.py.
pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.display_collisions |
Definition at line 1015 of file meshcat_visualizer.py.
pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.display_frames |
Definition at line 1036 of file meshcat_visualizer.py.
pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.display_visuals |
Definition at line 1026 of file meshcat_visualizer.py.
|
static |
Definition at line 543 of file meshcat_visualizer.py.
pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.frame_ids |
Definition at line 1046 of file meshcat_visualizer.py.
|
static |
Definition at line 544 of file meshcat_visualizer.py.
pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.static_objects |
Definition at line 580 of file meshcat_visualizer.py.
pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.viewer |
Definition at line 605 of file meshcat_visualizer.py.
pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.viewerCollisionGroupName |
Definition at line 890 of file meshcat_visualizer.py.
pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.viewerFramesGroupName |
Definition at line 909 of file meshcat_visualizer.py.
pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.viewerRootNodeName |
Definition at line 887 of file meshcat_visualizer.py.
pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer.viewerVisualGroupName |
Definition at line 900 of file meshcat_visualizer.py.