### pyroboplan.models.two_dof.load_models Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.models.html Gets the example 2-DOF models. ```APIDOC ## pyroboplan.models.two_dof.load_models ### Description Gets the example 2-DOF models. ### Returns A 3-tuple containing the model, collision geometry model, and visual geometry model. ### Return type tuple[pinocchio.Model] ``` -------------------------------- ### pyroboplan.models.marble.load_models Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.models.html Gets the example 2-DOF models for the marble. ```APIDOC ## pyroboplan.models.marble.load_models ### Description Gets the example 2-DOF models resembling a marble labyrinth. ### Returns A 3-tuple containing the model, collision geometry model, and visual geometry model. ### Return type tuple[pinocchio.Model] ``` -------------------------------- ### pyroboplan.models.panda.load_models Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.models.html Gets the example Panda models. ```APIDOC ## pyroboplan.models.panda.load_models ### Description Gets the example Panda models. ### Returns A 3-tuple containing the model, collision geometry model, and visual geometry model. ### Return type tuple[pinocchio.Model] ``` -------------------------------- ### pyroboplan.models.ur10.load_ur10_on_base_models Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.models.html Gets the example UR10 on base models. ```APIDOC ## pyroboplan.models.ur10.load_ur10_on_base_models ### Description Gets the example UR10 on base models. ### Returns A 3-tuple containing the model, collision geometry model, and visual geometry model. ### Return type tuple[pinocchio.Model] ``` -------------------------------- ### get_example_models_folder Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.models.html Returns the absolute path to the directory containing the example models for pyroboplan. ```APIDOC ## get_example_models_folder ### Description Returns the full path the example models folder. ### Returns The path to the pyroboplan example models folder. ### Return Type str ``` -------------------------------- ### pyroboplan.models.utils Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.html Utility functions for accessing example model paths. ```APIDOC ## pyroboplan.models.utils ### Description Utility functions for model-related operations. ### Functions - `get_example_models_folder()`: Returns the path to the example models folder. ``` -------------------------------- ### load_ur5_on_base_models Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.models.html Retrieves the example UR5 on base models, returning the robot model, its collision geometry model, and its visual geometry model. ```APIDOC ## load_ur5_on_base_models ### Description Gets the example UR5 on base models. ### Returns A 3-tuple containing the model, collision geometry model, and visual geometry model. ### Return Type tuple[pinocchio.Model] ``` -------------------------------- ### astar Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.planning.html Finds the shortest path between the start_pose and goal_pose using the A* algorithm. Both the start and goal poses must be present in the Graph. ```APIDOC ## astar ### Description Finds the shortest path between the start_pose and goal_pose using the A* algorithm. Both the start and goal poses must be present in the Graph. ### Parameters #### Path Parameters - **graph** (pyroboplan.planning.graph.Graph) – The graph containing the nodes and edges. - **start_pose** (pyroboplan.planning.graph.Node) – The starting robot configuration. - **goal_pose** (pyroboplan.planning.graph.Node) – The goal robot configuration. - **heuristic** (function(pyroboplan.planning.graph.Node, pyroboplan.planning.graph.Node)) – Heuristic function for estimating the distance between two nodes. For A* this will be used to compute the configuration space distance between a visited node (arg1) and the goal node (arg2). Defaults to `pyroboplan.core.utils.configuration_distance()`. ### Returns - **path** (list of pyroboplan.planning.graph.Node) – The sequence of nodes representing a path from start_node to goal_node. ``` -------------------------------- ### dfs Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.planning.html Find a path between the start_pose and goal_pose using a depth first search (DFS). Both the start and goal poses must be present in the Graph. ```APIDOC ## dfs ### Description Find a path between the start_pose and goal_pose using a depth first search (DFS). Both the start and goal poses must be present in the Graph. ### Parameters #### Path Parameters - **graph** (pyroboplan.planning.graph.Graph) – The graph containing the nodes and edges. - **start_pose** (pyroboplan.planning.graph.Node) – The starting robot configuration. - **goal_pose** (pyroboplan.planning.graph.Node) – The goal robot configuration. ### Returns - **path** (list of pyroboplan.planning.graph.Node) – The sequence of nodes representing a path from start_node to goal_node. ``` -------------------------------- ### retrace_path Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.planning.html Retraces a path from a goal node back to the root node (a node without a parent). The path is returned in order from the start to the goal. ```APIDOC ## retrace_path ### Description Retraces a path to the specified goal_node from a root node (a node with no parent). The resulting path will be returned in order form the start at index 0 to the goal_node at the index -1. ### Parameters #### Path Parameters * **goal_node** (pyroboplan.planning.graph.Node) - Required - The starting joint configuration. ### Returns A list a nodes from the root to the specified goal_node. ### Return Type list[pyroboplan.planning.graph.Node] ``` -------------------------------- ### RRTPlanner Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.planning.html Rapidly-expanding Random Tree (RRT) planner. This is a sampling-based motion planner that finds collision-free paths from a start to a goal configuration. ```APIDOC ## RRTPlanner ### Description Rapidly-expanding Random Tree (RRT) planner. This is a sampling-based motion planner that finds collision-free paths from a start to a goal configuration. ### Parameters * **_model_** - The robot model. * **_collision_model_** - The collision model. * **_options** (pyroboplan.planning.rrt.RRTPlannerOptions, optional) - Options for the RRT planner. Defaults to RRTPlannerOptions(). ### Methods #### add_node_to_tree(_tree_, _q_new_, _parent_node_) Add a new node to the tree. If the RRT* algorithm is enabled, will also rewire. Parameters: * **tree** (pyroboplan.planning.graph.Graph) – The tree to which to add the new node. * **q_new** (_array-like_) – The robot configuration from which to create a new tree node. * **parent_node** (pyroboplan.planning.graph.Node) – The parent node to connect the new node to. Returns: The new node that was added to the tree. Return type: pyroboplan.planning.graph.Node #### extend_or_connect(_tree_, _parent_node_, _q_sample_) Extends a tree towards a sampled node with steps no larger than the maximum connection distance. Parameters: * **tree** (pyroboplan.planning.graph.Graph) – The tree to use when performing this operation. * **parent_node** (pyroboplan.planning.graph.Node) – The node from which to start extending or connecting towards the sample. * **q_sample** (_array-like_) – The robot configuration sample to extend or connect towards. Returns: The latest node that was added to the tree, or None if no node was found. Return type: pyroboplan.planning.graph.Node, optional #### extract_path_from_trees(_start_tree_final_node_, _goal_tree_final_node_=None) Extracts the final path from the RRT trees from the start tree root to the goal tree root passing through both final nodes. Parameters: * **start_tree_final_node** (pyroboplan.planning.graph.Node) – The last node of the start tree. * **goal_tree_final_node** (pyroboplan.planning.graph.Node, optional) – The last node of the goal tree. If None, this means the goal tree is ignored. Returns: A list of robot configurations describing the path waypoints in order. Return type: list[array-like] #### plan(_q_start_, _q_goal_) Plans a path from a start to a goal configuration. Parameters: * **q_start** (_array-like_) – The starting robot configuration. * **q_goal** (_array-like_) – The goal robot configuration. #### reset() Resets all the planning data structures. #### visualize(_visualizer_=None, _frame_name_, _path_name_='planned_path', _tree_name='rrt', _show_path=True, _show_tree=False_) Visualizes the RRT path. Parameters: * **visualizer** (pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer, optional) – The visualizer to use for this solver. * **frame_name** (_str_) – The name of the frame to use when visualizing paths in Cartesian space. * **path_name** (_str_, optional) – The name of the MeshCat component for the path. * **tree_name** (_str_, optional) – The name of the MeshCat component for the tree. * **show_path** (_bool_, optional) – If true, shows the final path from start to goal. * **show_tree** (_bool_, optional) – If true, shows the entire sampled tree. ``` -------------------------------- ### CubicTrajectoryOptimization.plan Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.trajectory.html Plans a trajectory from a start to a goal configuration, or along an entire trajectory. It can automatically determine intermediate waypoints or use a provided initial guess for path waypoints. ```APIDOC ## plan ### Description Plans a trajectory from a start to a goal configuration, or along an entire trajectory. If the input list has 2 elements, then this is assumed to be the start and goal configurations. The intermediate waypoints will be determined automatically. If the input list has more than 2 elements, then these are the actual waypoints that must be achieved. ### Method plan ### Parameters #### Path Parameters - **q_path** (list[array-like]) - Required - A list of joint configurations describing the desired motion. - **init_path** (list[array-like], optional) - Optional - If set, defines the initial guess for the path waypoints. ### Returns - Optional[pyroboplan.trajectory.polynomial.CubicPolynomialTrajectory] - The resulting trajectory, or None if optimization failed ``` -------------------------------- ### get_normalized_path_scaling Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.planning.html Calculates and returns a list of length-normalized scaling values for each waypoint along a given path. These values range from 0.0 at the start to 1.0 at the end. ```APIDOC ## get_normalized_path_scaling ### Description Returns a list of length-normalized scaling values along a joint configuration path, from 0.0 at the start to 1.0 at the end. ### Parameters * **q_path** (list[array-like]) – The list of joint configurations describing the path. ### Returns The list of scaling values, between 0.0 and 1.0, at each of the path waypoints. ### Return type list[float] ``` -------------------------------- ### get_minimum_distance_at_state Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.core.html Gets the minimum distance to collision at a specified state. ```APIDOC ## get_minimum_distance_at_state ### Description Gets the minimum distance to collision at a specified state. ### Parameters * **model** (pinocchio.Model) – The model to use for collision checking. * **collision_model** (pinocchio.Model) – The collision model to use for collision checking. * **q** (array-like) – The joint configuration of the model. * **data** (pinocchio.Data, optional) – The model data to use for collision checking. If None, data is created automatically. * **collision_data** (pinocchio.GeometryData, optional) – The collision_model data to use for collision checking. If None, data is created automatically. ### Returns The minimum distance to collision, in meters. ### Return type float ``` -------------------------------- ### PRMPlannerOptions Class Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.planning.html Options for Probabilistic Roadmap (PRM) planning, including parameters like maximum step size, neighbor radius, and maximum nodes. ```APIDOC ## PRMPlannerOptions ### Description Options for Probabilistic Roadmap (PRM) planning. ### Parameters - **max_step_size** (float, optional) - Defaults to 0.05. - **max_neighbor_radius** (float, optional) - Defaults to 0.5. - **max_neighbor_connections** (int, optional) - Defaults to 15. - **max_construction_nodes** (int, optional) - Defaults to 5000. - **construction_timeout** (float, optional) - Defaults to 10.0. - **rng_seed** (None, optional) - Defaults to None. - **prm_star** (bool, optional) - Defaults to False. - **prm_file** (None, optional) - Defaults to None. ``` -------------------------------- ### PRMPlanner Class Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.planning.html The PRMPlanner class implements a sampling-based motion planner that constructs a graph in the free configuration space and searches for a path. Graphs can be persisted to disk. ```APIDOC ## PRMPlanner ### Description Probabilistic Roadmap (PRM) planner. This is a sampling-based motion planner that constructs a graph in the free configuration space and then searches for a path using standard graph search functions. Graphs can be persisted to disk for use in future applications. ### Methods #### `connect_node(new_node, radius, k)` Identifies all neighbors and makes connections to the added node. Parameters: - **new_node** (pyroboplan.planning.graph.Node) – The node to add. - **radius** (float) – Only consider connections within the provided radius. - **k** (int) – Only consider up to a maximum of k neighbors to make connections. Returns: True if the node was connected to the graph. False otherwise. Return type: bool #### `connect_planning_nodes(start_node, goal_node)` Ensures the start and goal configurations can be connected to the PRM. Parameters: - **start_node** (pyroboplan.planning.graph.Node) – The start node to connect. - **goal_node** (pyroboplan.planning.graph.Node) – The goal node to connect. Returns: True if the nodes were able to be connected, False otherwise. Return type: bool #### `construct_roadmap(sample_generator=None)` Grows the graph by sampling nodes using the provided generator, then connecting them to the Graph. The caller can optionally override the default generator, if desired. Parameters: - **sample_generator** (Generator | None) – The sample function to use in construction of the roadmap. Defaults to randomly sampling the robot’s configuration space. #### `plan(q_start, q_goal)` Plans a path from a start to a goal configuration using the constructed graph. Parameters: - **q_start** (array-like) – The starting robot configuration. - **q_goal** (array-like) – The goal robot configuration. Returns: A path from the start to the goal state, if one exists. Otherwise None. Return type: list[array-like] #### `reset()` Resets the PRM’s transient data between queries. #### `visualize(visualizer, frame_name, path_name='planned_path', graph_name='prm', show_path=True, show_graph=False)` Visualizes the PRM and the latest path found within it. Parameters: - **visualizer** (pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer | None) – The visualizer to use for this solver. - **frame_name** (str) – The name of the frame to use when visualizing paths in Cartesian space. - **path_name** (str, optional) – The name of the MeshCat component for the path. - **graph_name** (str, optional) – The name of the MeshCat component for the tree. - **show_path** (bool, optional) – If true, shows the final path from start to goal. - **show_graph** (bool, optional) – If true, shows the entire PRM graph. ``` -------------------------------- ### get_collision_geometry_ids Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.core.html Gets a list of collision geometry model IDs for a specified body name. ```APIDOC ## get_collision_geometry_ids ### Description Gets a list of collision geometry model IDs for a specified body name. ### Parameters * **model** (pinocchio.Model) – The model to use for getting frame IDs. * **collision_model** (pinocchio.Model) – The model to use for collision checking. * **body** (str) – The name of the body. This can be directly the name of a geometry in the collision model, or it can be the name of the frame in the main model. ### Returns A list of collision geometry IDs corresponding to the body name. ### Return type list[int] ``` -------------------------------- ### pyroboplan.planning.path_shortcutting Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.html Provides functions for shortcutting and normalizing paths to improve efficiency and reduce path length. ```APIDOC ## pyroboplan.planning.path_shortcutting ### Description Functions for shortcutting and normalizing paths. ### Functions - `get_configuration_from_normalized_path_scaling()` - `get_normalized_path_scaling()` - `shortcut_path()` ``` -------------------------------- ### RRTPlannerOptions Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.planning.html Options for Rapidly-exploring Random Tree (RRT) planning. ```APIDOC ## RRTPlannerOptions ### Description Options for Rapidly-exploring Random Tree (RRT) planning. ### Parameters * **_max_step_size** (float, optional) - Defaults to 0.05. * **_max_connection_dist** (float, optional) - Defaults to inf. * **_rrt_connect** (bool, optional) - Defaults to False. * **_bidirectional_rrt** (bool, optional) - Defaults to False. * **_rrt_star** (bool, optional) - Defaults to False. * **_max_rewire_dist** (float, optional) - Defaults to inf. * **_max_planning_time** (float, optional) - Defaults to 10.0. * **_rng_seed** (int, optional) - Defaults to None. * **_fast_return** (bool, optional) - Defaults to True. * **_goal_biasing_probability** (float, optional) - Defaults to 0.0. * **_collision_distance_padding** (float, optional) - Defaults to 0.0. ``` -------------------------------- ### pyroboplan.planning.utils Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.html Utility functions for path discretization, extension, and collision checking within the planning module. ```APIDOC ## pyroboplan.planning.utils ### Description Utility functions for planning operations. ### Functions - `discretize_joint_space_path()` - `discretized_joint_space_generator()` - `extend_robot_state()` - `has_collision_free_path()` - `retrace_path()` ``` -------------------------------- ### pyroboplan.core.utils Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.html Provides utility functions for collision checking, state manipulation, and path analysis within the PyRoboPlan core. ```APIDOC ## pyroboplan.core.utils ### Description Utility functions for collision checking, state manipulation, and path analysis. ### Functions - `calculate_collision_vector_and_jacobians()` - `check_collisions_along_path()` - `check_collisions_at_state()` - `check_within_limits()` - `configuration_distance()` - `extract_cartesian_pose()` - `extract_cartesian_poses()` - `get_collision_geometry_ids()` - `get_collision_pair_indices_from_bodies()` - `get_minimum_distance_at_state()` - `get_path_length()` - `get_random_collision_free_state()` - `get_random_collision_free_transform()` - `get_random_state()` - `get_random_transform()` - `set_collisions()` ``` -------------------------------- ### Build Robot Models from URDF Source: https://pyroboplan.readthedocs.io/en/latest/_sources/motion_planning.rst.txt Imports robot models, collision models, and visual models from a URDF file using Pinocchio. ```python import pinocchio filename = "/path/to/your.urdf" model, collision_model, visual_model = pinocchio.buildModelsFromUrdf(filename) ``` -------------------------------- ### pyroboplan.planning.graph_search Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.html Implements graph search algorithms such as A* and Depth-First Search (DFS) for pathfinding within planning graphs. ```APIDOC ## pyroboplan.planning.graph_search ### Description Graph search algorithms for pathfinding. ### Functions - `astar()`: Performs A* search on a graph. - `dfs()`: Performs Depth-First Search on a graph. ``` -------------------------------- ### load_from_file Source: https://pyroboplan.readthedocs.io/en/latest/genindex.html Loads a graph from a file. This is a class method of the pyroboplan.planning.graph.Graph class. ```APIDOC ## load_from_file() ### Description Loads a graph from a file. ### Class pyroboplan.planning.graph.Graph ### Method Class Method ``` -------------------------------- ### visualize_path Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.visualization.html Visualizes a single path of poses as lines using MeshCat, showing only the translation component. ```APIDOC ## visualize_path ### Description Visualizes a path of poses as lines containing only the translation component. ### Parameters - **visualizer** (pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer) – The visualizer instance. - **name** (str) – The name of the MeshCat component to add. - **tforms** (list[pinocchio.SE3]) – A list of transforms representing the vertices of the path. - **line_width** (float, optional) – The width of the axes in the triad. Defaults to 3. - **line_color** (array-like, optional) – The line color to use. Defaults to [0.0, 0.0, 0.0]. ``` -------------------------------- ### visualize_paths Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.visualization.html Visualizes a list of paths of poses as lines using MeshCat, showing only the translation component. ```APIDOC ## visualize_paths ### Description Visualizes a list of paths of poses as lines containing only the translation component. ### Parameters - **visualizer** (pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer) – The visualizer instance. - **name** (str) – The name of the MeshCat component to add. - **paths** (list[list[pinocchio.SE3]]) – A list of paths, each of which is a list of transforms representing the vertices of the path. - **line_width** (float, optional) – The width of the axes in the triad. Defaults to 3. - **line_color** (array-like, optional) – The line color to use. Defaults to [0.0, 0.0, 0.0]. ``` -------------------------------- ### pyroboplan.planning.rrt Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.html Implements the Rapidly-exploring Random Tree (RRT) planner for efficient motion planning. ```APIDOC ## pyroboplan.planning.rrt ### Description Rapidly-exploring Random Tree (RRT) planner. ### Classes - `RRTPlanner` - `RRTPlanner.add_node_to_tree()`: Adds a node to the RRT. - `RRTPlanner.extend_or_connect()`: Extends or connects nodes in the RRT. - `RRTPlanner.extract_path_from_trees()`: Extracts a path from the RRT. - `RRTPlanner.plan()`: Plans a path using the RRT planner. - `RRTPlanner.reset()`: Resets the RRT planner. - `RRTPlanner.visualize()`: Visualizes the RRT. - `RRTPlannerOptions`: Options for configuring the RRT planner. ``` -------------------------------- ### Compute Forward Kinematics and Jacobian Source: https://pyroboplan.readthedocs.io/en/latest/_sources/motion_planning.rst.txt Calculates the forward kinematics and Jacobian for a specified frame and joint configuration using Pinocchio. ```python data = model.createData() target_frame_id = model.getFrameId("my_frame") # Forward kinematics pinocchio.framesForwardKinematics(model, data, q_target) my_frame_transform = data.oMf[target_frame_id] # Jacobian jac = pinocchio.computeFrameJacobian( model, data, q, target_frame_id, pinocchio.ReferenceFrame.LOCAL, ) ``` -------------------------------- ### shortcut_path Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.planning.html Applies path shortcutting to shorten a given path by iteratively connecting random points along the path, ensuring collision-free connections. This aims to find a shorter, valid path. ```APIDOC ## shortcut_path ### Description Performs path shortcutting by sampling two random points along the path and verifying whether those two points can be connected directly without collisions. This implementation is based on section 3.5.3 of: https://motion.cs.illinois.edu/RoboticSystems/MotionPlanningHigherDimensions.html ### Parameters * **model** (pinocchio.Model) – The model of the robot. * **collision_model** (pinocchio.Model.) – The model to use for collision checking. * **q_path** (list[array-like]) – The list of joint configurations describing the path. * **max_iters** (int) – The maximum iterations for randomly sampling shortcut points. Defaults to 100. * **max_step_size** (float) – Maximum joint configuration step size for collision checking along path segments. Defaults to 0.05. ### Returns The shortest length path over all the shortcutting attempts. ### Return type list[array-like] ``` -------------------------------- ### load_models Source: https://pyroboplan.readthedocs.io/en/latest/genindex.html Loads models for various robot configurations. Supported modules include marble, panda, and two_dof. ```APIDOC ## load_models() ### Description Loads models for various robot configurations. ### Supported Modules - pyroboplan.models.marble - pyroboplan.models.panda - pyroboplan.models.two_dof ``` -------------------------------- ### pyroboplan.planning.prm Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.html Implements the Probabilistic Roadmap (PRM) planner for motion planning in high-dimensional spaces. ```APIDOC ## pyroboplan.planning.prm ### Description Probabilistic Roadmap (PRM) planner. ### Classes - `PRMPlanner` - `PRMPlanner.connect_node()`: Connects a node to the roadmap. - `PRMPlanner.connect_planning_nodes()`: Connects planning nodes to the roadmap. - `PRMPlanner.construct_roadmap()`: Constructs the PRM roadmap. - `PRMPlanner.plan()`: Plans a path using the PRM planner. - `PRMPlanner.reset()`: Resets the PRM planner. - `PRMPlanner.visualize()`: Visualizes the PRM roadmap. - `PRMPlannerOptions`: Options for configuring the PRM planner. - `random_model_state_generator()`: Generates random states for the model. ``` -------------------------------- ### pyroboplan.ik.nullspace_components Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.html Provides functions to compute nullspace components for inverse kinematics, aiding in tasks like collision avoidance and joint limit adherence. ```APIDOC ## pyroboplan.ik.nullspace_components ### Description Functions to compute nullspace components for inverse kinematics. ### Functions - `collision_avoidance_nullspace_component()` - `joint_center_nullspace_component()` - `joint_limit_nullspace_component()` - `zero_nullspace_component()` ``` -------------------------------- ### pyroboplan.visualization.meshcat_utils Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.html Utility functions for visualizing robot states, paths, and frames using MeshCat. ```APIDOC ## pyroboplan.visualization.meshcat_utils ### Description Utility functions for visualization using MeshCat. ### Functions - `visualize_frame()` - `visualize_frames()` - `visualize_path()` - `visualize_paths()` ``` -------------------------------- ### pyroboplan.planning.cartesian_planner Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.html Implements a Cartesian planner for generating robot trajectories in Cartesian space. ```APIDOC ## pyroboplan.planning.cartesian_planner ### Description Cartesian planner for generating robot trajectories in Cartesian space. ### Classes - `CartesianPlanner` - `CartesianPlanner.generate()`: Generates a Cartesian path. - `CartesianPlannerOptions`: Options for configuring the Cartesian planner. ``` -------------------------------- ### PolynomialTrajectoryBase.visualize Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.trajectory.html Visualizes a generated trajectory with one figure window per dimension. ```APIDOC ## visualize ### Description Visualizes a generated trajectory with one figure window per dimension. ### Parameters * **dt** (float, optional) - The sample time at which to generate the trajectory by evaluating the polynomial. * **joint_names** (list[str], optional) - The joint names to use for the figure titles. If unset, uses the text “Dimension 1”, “Dimension 2”, etc. * **show_position** (bool, optional) - If true, shows the trajectory position values. * **show_velocity** (bool, optional) - If true, shows the trajectory velocity values. * **show_acceleration** (bool, optional) - If true, shows the trajectory acceleration values. * **show_jerk** (bool, optional) - If true, shows the trajectory jerk values. ``` -------------------------------- ### DifferentialIk.solve Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.ik.html Solves an Inverse Kinematics (IK) query using a differential solver. It takes the target frame and its desired transformation as input, and can optionally accept an initial state, nullspace components, and a verbose flag for detailed output. ```APIDOC ## solve ### Description Solves an IK query. ### Method DifferentialIk.solve ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters * **target_frame** (str) - The name of the target frame in the model. * **target_tform** (pinocchio.SE3) - The desired transformation of the target frame in the model. * **init_state** (array-like, optional) - The initial state to solve from. If not specified, a random initial state will be selected. * **nullspace_components** (list[function], optional) - An optional list of nullspace components to use when solving. These components must take the form lambda model, q: component(model, q, ). * **verbose** (bool, optional) - If True, prints additional information to the console. ### Returns A list of joint configuration values with the solution, if one was found. Otherwise, returns None. ### Return Type array-like or None ``` -------------------------------- ### PolynomialTrajectoryBase.generate Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.trajectory.html Generates a full trajectory at a specified sample time. ```APIDOC ## generate ### Description Generates a full trajectory at a specified sample time. ### Parameters * **dt** (float) - The sample time, in seconds. ### Returns The tuple of (t, q, qd, qdd, qddd) trajectory values generated at the sample time. The time vector is 1D, and the others are 2D (time and dimension). ### Return Type tuple(array-like, array-like, array-like, array-like, array-like) ``` -------------------------------- ### pyroboplan.planning.graph Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.html Provides data structures for representing and manipulating planning graphs, including nodes and edges. ```APIDOC ## pyroboplan.planning.graph ### Description Data structures for representing and manipulating planning graphs. ### Classes - `Edge` - `Edge.parse()`: Parses an edge from a data source. - `Graph` - `Graph.add_edge()`: Adds an edge to the graph. - `Graph.add_node()`: Adds a node to the graph. - `Graph.get_nearest_neighbors()`: Retrieves nearest neighbors of a node. - `Graph.get_nearest_node()`: Retrieves the nearest node to a given point. - `Graph.get_node()`: Retrieves a specific node by its identifier. - `Graph.load_from_file()`: Loads a graph from a file. - `Graph.remove_edge()`: Removes an edge from the graph. - `Graph.remove_node()`: Removes a node from the graph. - `Graph.save_to_file()`: Saves the graph to a file. - `Node` - `Node.parse()`: Parses a node from a data source. ``` -------------------------------- ### pyroboplan.models.panda.load_point_cloud Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.models.html Loads a point cloud from a PLY file and converts it into an octree structure. ```APIDOC ## pyroboplan.models.panda.load_point_cloud ### Description Loads a point cloud from a PLY file and converts it into an octree structure. ### Returns **octree** – An octree data structure representing the hierarchical spatial partitioning of the point cloud. The voxel resolution default value is set to 0.04 units. ### Return type coal.Octree ``` -------------------------------- ### pyroboplan.ik.differential_ik Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.html Implements differential inverse kinematics solvers for manipulator control. ```APIDOC ## pyroboplan.ik.differential_ik ### Description Differential inverse kinematics solvers. ### Classes - `DifferentialIk` - `DifferentialIk.solve()`: Solves the differential inverse kinematics problem. - `DifferentialIkOptions`: Options for configuring the differential IK solver. ``` -------------------------------- ### pyroboplan.models.two_dof Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.html Functions for loading and configuring collision models for a 2-DOF robot. ```APIDOC ## pyroboplan.models.two_dof ### Description Functions for loading and configuring collision models for a 2-DOF robot. ### Functions - `add_object_collisions()` - `load_models()` ``` -------------------------------- ### load_point_cloud Source: https://pyroboplan.readthedocs.io/en/latest/genindex.html Loads a point cloud. This function is part of the pyroboplan.models.panda module. ```APIDOC ## load_point_cloud() ### Description Loads a point cloud. ### Module pyroboplan.models.panda ``` -------------------------------- ### zero_nullspace_component Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.ik.html Returns a zero nullspace component, which is effectively a no-op. This component returns an array of zeros. ```APIDOC ## zero_nullspace_component ### Description Returns a zero nullspace component, which is effectively a no-op. ### Parameters * **model** (pinocchio.Model) – The model from which to generate a random state. * **q** (array-like) – The joint configuration for the model. Not used, but required to match the function interface. ### Returns An array of zeros whose length is the number of joint variables in the model. ### Return type array-like ``` -------------------------------- ### CartesianPlanner.generate Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.planning.html Generates a set of joint trajectories from a Cartesian plan at a specified sample time. It takes an initial joint configuration and a time step as input and returns the success status, time vector, and joint positions. ```APIDOC ## CartesianPlanner.generate ### Description Generates a set of joint trajectories from the Cartesian plan at a specified sample time. ### Method `generate(_q_init_, _dt_)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters * **q_init** (_array-like_) – The starting joint configuration for the robot. This is used as the initial condition for solving inverse kinematics. * **dt** (_float_) – The sample time to use for trajectory generation, in seconds. ### Response #### Success Response Returns a tuple of (success, t_vec, q_vec) corresponding to a success metric, the vector of times, and vector of joint positions, respectively. ### Return Type tuple(bool, array-like, array-like) ``` -------------------------------- ### get_configuration_from_normalized_path_scaling Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.planning.html Retrieves a specific joint configuration from a path based on a normalized scaling value. This is useful for interpolating along a path at a precise fractional distance. ```APIDOC ## get_configuration_from_normalized_path_scaling ### Description Given a path and its corresponding length-normalized scalings between 0.0 and 1.0, get the joint configuration at a specific scale value. For example, 0.0 will return the start configuration of the path, 1.0 will return the end configuration, and 0.5 will return the configuration halfway along the length of the path. ### Parameters * **q_path** (list[array-like]) – The list of joint configurations describing the path. * **path_scalings** (list[float]) – The list of scaling values, between 0.0 and 1.0, at each of the path waypoints. * **value** (float) – The value, between 0.0 and 1.0, at which to get the joint configuration along the path. ### Returns A tuple containing the joint configuration at the specified scaling value along the path, as well as the index corresponding to the next point along the path. ### Return type tuple (array-like, int) ``` -------------------------------- ### Compute Collisions with Pinocchio Source: https://pyroboplan.readthedocs.io/en/latest/_sources/motion_planning.rst.txt Performs collision checking for a given robot configuration using Pinocchio and the Coal library. All collision pairs are activated. ```python data = model.createData() collision_data = collision_model.createData() collision_model.addAllCollisionPairs() results = pinocchio.computeCollisions( model, data, collision_model, collision_data, q, False, ) ``` -------------------------------- ### load_ur5_on_base_models Source: https://pyroboplan.readthedocs.io/en/latest/genindex.html Loads UR5 on base models. This function is part of the pyroboplan.models.ur5 module. ```APIDOC ## load_ur5_on_base_models() ### Description Loads UR5 on base models. ### Module pyroboplan.models.ur5 ``` -------------------------------- ### load_ur10_on_base_models Source: https://pyroboplan.readthedocs.io/en/latest/genindex.html Loads UR10 on base models. This function is part of the pyroboplan.models.ur10 module. ```APIDOC ## load_ur10_on_base_models() ### Description Loads UR10 on base models. ### Module pyroboplan.models.ur10 ``` -------------------------------- ### pyroboplan.models.marble Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.html Functions for loading and configuring collision models specific to the 'marble' environment. ```APIDOC ## pyroboplan.models.marble ### Description Functions for loading and configuring collision models for the 'marble' environment. ### Functions - `add_object_collisions()` - `load_models()` ``` -------------------------------- ### visualize_frames Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.visualization.html Visualizes multiple coordinate frames as axis triads at specified poses using MeshCat. ```APIDOC ## visualize_frames ### Description Visualizes a set of coordinate frames as axis triads at specified poses. ### Parameters - **visualizer** (pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer) – The visualizer instance. - **prefix_name** (str) – The name of the MeshCat component to add. - **tforms** (list[pinocchio.SE3]) – A list of transforms at which to display frames. - **line_length** (float, optional) – The length of the axes in the triad. Defaults to 0.2. - **line_width** (float, optional) – The width of the axes in the triad. Defaults to 3. - **line_color** (array-like, optional) – The line colors to use. If None, chooses default axes colors. ``` -------------------------------- ### pyroboplan.core.utils.configuration_distance Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.core.html Calculates the distance between two joint configurations. ```APIDOC ## configuration_distance ### Description Returns the distance between two joint configurations. ### Parameters #### Path Parameters - **q_start** (array-like) – The start joint configuration. - **q_end** (array-like) – The end joint configuration. ### Returns The distance between the two joint configurations. ### Return Type float ``` -------------------------------- ### Graph.load_from_file Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.planning.html Loads a graph structure from a specified file path. This class method reconstructs the Graph object from its saved representation. ```APIDOC ## Graph.load_from_file ### Description Loads a graph structure from a specified file path. This class method reconstructs the Graph object from its saved representation. ### Method load_from_file ### Parameters #### Path Parameters - **filename** (str) – Required - The full filepath from which to read a Graph. ### Returns - **pyroboplan.planning.graph.Graph** - The reconstructed Graph from file. ``` -------------------------------- ### collision_avoidance_nullspace_component Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.ik.html Returns a collision avoidance nullspace component. These calculations are based on provided resources for collision-free dynamic locomotion. ```APIDOC ## collision_avoidance_nullspace_component ### Description Returns a collision avoidance nullspace component based on provided resources. ### Parameters * **model** (pinocchio.Model) – The model from which to generate a random state. * **data** (pinocchio.Data) – The model data to use for collision distance checks. * **collision_model** (pinocchio.GeometryModel) – The model with which to check collision distances. * **collision_data** (pinocchio.GeometryData) – The collision model data to use for collision distance checks. * **q** (array-like) – The joint configuration for the model. * **dist_padding** (float, optional) – The distance padding, in meters, on the collision distances. Defaults to 0.05. * **gain** (float, optional) – A gain to modify the relative weight of this term. Defaults to 1.0. ### Returns An array containing the collision avoidance nullspace terms. ### Return type array-like ``` -------------------------------- ### joint_limit_nullspace_component Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.ik.html Returns a joint limits avoidance nullspace component. This component helps to keep joint configurations away from their limits. ```APIDOC ## joint_limit_nullspace_component ### Description Returns a joint limits avoidance nullspace component. ### Parameters * **model** (pinocchio.Model) – The model from which to generate a random state. * **q** (array-like) – The joint configuration for the model. * **gain** (float, optional) – A gain to modify the relative weight of this term. Defaults to 1.0. * **padding** (float, optional) – Optional padding around the joint limits. Defaults to 0.0. ### Returns An array containing the joint space avoidance nullspace terms. ### Return type array-like ``` -------------------------------- ### get_path_length Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.core.html Returns the configuration distance of a path. ```APIDOC ## get_path_length ### Description Returns the configuration distance of a path. ### Parameters * **q_path** (list[array-like]) – A list of joint configurations describing a path. ### Returns The total configuration distance of the entire path. ### Return type float ``` -------------------------------- ### CubicPolynomialTrajectory Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.trajectory.html Describes a cubic (3rd-order) polynomial trajectory. ```APIDOC ## CubicPolynomialTrajectory ### Description Describes a cubic (3rd-order) polynomial trajectory. ### Parameters * **_t_** - Start time of the trajectory. * **_q_** - Start position of the trajectory. * **_qd** (default: 0.0) - Start velocity of the trajectory. ``` -------------------------------- ### joint_limit_nullspace_component Source: https://pyroboplan.readthedocs.io/en/latest/genindex.html Calculates the joint limit nullspace component. This function is part of the pyroboplan.ik.nullspace_components module. ```APIDOC ## joint_limit_nullspace_component() ### Description Calculates the joint limit nullspace component. ### Module pyroboplan.ik.nullspace_components ``` -------------------------------- ### pyroboplan.models.panda Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.html Functions for loading and configuring collision models for the 'panda' robot, including self-collisions and octree-based collisions. ```APIDOC ## pyroboplan.models.panda ### Description Functions for loading and configuring collision models for the 'panda' robot. ### Functions - `add_object_collisions()` - `add_octree_collisions()` - `add_self_collisions()` - `load_models()` - `load_point_cloud()` ``` -------------------------------- ### pyroboplan.trajectory.trajectory_optimization Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.html Implements trajectory optimization techniques, specifically cubic trajectory optimization, for refining robot movements. ```APIDOC ## pyroboplan.trajectory.trajectory_optimization ### Description Trajectory optimization methods. ### Classes - `CubicTrajectoryOptimization` - `CubicTrajectoryOptimization.plan()`: Plans an optimized cubic trajectory. - `CubicTrajectoryOptimizationOptions`: Options for cubic trajectory optimization. ``` -------------------------------- ### QuinticPolynomialTrajectory Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.trajectory.html Describes a quintic (5th-order) polynomial trajectory. ```APIDOC ## QuinticPolynomialTrajectory ### Description Describes a quintic (5th-order) polynomial trajectory. ### Parameters * **_t_** - Start time of the trajectory. * **_q_** - Start position of the trajectory. * **_qd** (default: 0.0) - Start velocity of the trajectory. * **_qdd** (default: 0.0) - Start acceleration of the trajectory. ``` -------------------------------- ### visualize_frame Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.visualization.html Visualizes a single coordinate frame as an axis triad at a specified pose using MeshCat. ```APIDOC ## visualize_frame ### Description Visualizes a coordinate frame as an axis triad at a specified pose. ### Parameters - **visualizer** (pinocchio.visualize.meshcat_visualizer.MeshcatVisualizer) – The visualizer instance. - **name** (str) – The name of the MeshCat component to add. - **tform** (pinocchio.SE3) – The transform at which to display the frame. - **line_length** (float, optional) – The length of the axes in the triad. Defaults to 0.2. - **line_width** (float, optional) – The width of the axes in the triad. Defaults to 3. - **line_color** (array-like, optional) – The line colors to use. If None, chooses default axes colors. ``` -------------------------------- ### discretized_joint_space_generator Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.planning.html Generates samples from the robot's entire joint space with a specified step size. It can optionally continue to yield random samples indefinitely, making it useful for exploration but potentially computationally expensive. ```APIDOC ## discretized_joint_space_generator ### Description Discretizes the entire joint space of the model at step_size increments. Once the entire space has been returned, the generator can optionally return random samples from the configuration space - in which case this generator will never terminate. This is an extraordinarily expensive operation for high DOF manipulators and small step sizes! ### Parameters #### Path Parameters * **model** (pinocchio.Model) - Required - The robot model containing lower and upper position limits. * **step_size** (float) - Required - The step size for sampling. * **generate_random** (bool) - Optional - If True, continue randomly sampling the configuration space. Otherwise this generator will terminate. ### Yields * **np.ndarray** - The next point in the configuration space. ``` -------------------------------- ### PolynomialTrajectoryBase.evaluate Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.trajectory.html Evaluates the trajectory at a specific time t. ```APIDOC ## evaluate ### Description Evaluates the trajectory at a specific time. ### Parameters * **t** (float) - The time, in seconds, at which to evaluate the trajectory. ### Returns The tuple of (q, qd, qdd, qddd) trajectory values at the specified time. If the trajectory is single-DOF, these will be scalars, otherwise they are arrays. ### Return Type tuple(array-like or float, array-like or float, array-like or float, array-like or float) ``` -------------------------------- ### pyroboplan.models.ur5 Source: https://pyroboplan.readthedocs.io/en/latest/api/pyroboplan.html Functions for loading and configuring collision models for the UR5 robot, including self-collisions. ```APIDOC ## pyroboplan.models.ur5 ### Description Functions for loading and configuring collision models for the UR5 robot. ### Functions - `add_ur5_on_base_self_collisions()` - `load_ur5_on_base_models()` ```