### Function moveit_py::bind_planning_component::setStartState Source: https://docs.ros.org/en/jazzy/p/moveit_py/generated/function_planning__component_8hpp_1ab7fd7da6ebde3957dd1f652d77edc143.html Sets the start state for the planning component using either a configuration name or a specific robot state. ```APIDOC ## Function moveit_py::bind_planning_component::setStartState ### Description Sets the start state for a given planning component. This function allows specifying the start state via a configuration name or a direct robot state object. ### Parameters - **planning_component** (std::shared_ptr&) - Required - The planning component instance. - **configuration_name** (std::optional) - Optional - The name of the configuration to use as the start state. - **robot_state** (std::optional) - Optional - The specific robot state to set as the start state. ### Response - **bool** - Returns true if the start state was successfully set, false otherwise. ``` -------------------------------- ### Function: getMotionPlanResponseStartState Source: https://docs.ros.org/en/jazzy/p/moveit_py/generated/function_planning__response_8hpp_1a6571366f4f5733ec36ff48c76fc86056.html Retrieves the start state from a given motion plan response object. ```APIDOC ## Function moveit_py::bind_planning_interface::getMotionPlanResponseStartState ### Description Retrieves the start state from a shared pointer to a MotionPlanResponse object. ### Parameters - **response** (std::shared_ptr&) - Required - The motion plan response object from which to extract the start state. ### Response - **Returns** (moveit_msgs::msg::RobotState) - The robot state at the start of the motion plan. ``` -------------------------------- ### setStartState Source: https://docs.ros.org/en/jazzy/p/moveit_py/generated/namespace_moveit_py__bind_planning_component.html Sets the start state for the planning component. ```APIDOC ## setStartState ### Description Sets the start state for the planning component. ### Method (Not specified in source) ### Endpoint (Not specified in source) ### Parameters (No parameters specified in source) ### Request Example (No request example specified in source) ### Response (No response specified in source) ``` -------------------------------- ### setStartState Function Source: https://docs.ros.org/en/jazzy/p/moveit_py/_sources/generated/function_planning__component_8hpp_1ab7fd7da6ebde3957dd1f652d77edc143.rst.txt Sets the starting state for the planning component using a shared pointer to the planning component, an optional string identifier, and an optional robot state. ```APIDOC ## setStartState ### Description Sets the starting state for the planning component. ### Parameters - **planning_component** (std::shared_ptr&) - Required - The planning component instance. - **state_name** (std::optional) - Optional - The name of the starting state. - **robot_state** (std::optional) - Optional - The robot state object to be set as the start. ``` -------------------------------- ### MoveIt C++ Planning Component Header Source: https://docs.ros.org/en/jazzy/p/moveit_py/_sources/generated/program_listing_file_src_moveit_moveit_ros_moveit_cpp_planning_component.hpp.rst.txt This C++ header file defines the interface for MoveIt's PlanningComponent, including functions for motion planning, setting goal states, and setting start states. It also includes utility functions for initializing planning request parameters. ```cpp /********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2022, Peter David Fagan * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * Neither the name of PickNik Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. *********************************************************************/ /* Author: Peter David Fagan */ #pragma once #include #include #include #include #include #include #include #include #include #include #include #include "moveit_cpp.hpp" #include "../planning_scene_monitor/planning_scene_monitor.hpp" #include "../../moveit_core/planning_interface/planning_response.hpp" namespace py = pybind11; namespace moveit_py { namespace bind_planning_component { planning_interface::MotionPlanResponse plan(std::shared_ptr& planning_component, std::shared_ptr& single_plan_parameters, std::shared_ptr& multi_plan_parameters, std::shared_ptr& planning_scene, std::optional solution_selection_function, std::optional stopping_criterion_callback); bool setGoal(std::shared_ptr& planning_component, std::optional configuration_name, std::optional robot_state, std::optional pose_stamped_msg, std::optional pose_link, std::optional> motion_plan_constraints); bool setStartState(std::shared_ptr& planning_component, std::optional configuration_name, std::optional robot_state); void initPlanRequestParameters(py::module& m); void initMultiPlanRequestParameters(py::module& m); void initPlanningComponent(py::module& m); } // namespace bind_planning_component } // namespace moveit_py ``` -------------------------------- ### MoveIt MotionPlanResponse C++ Bindings Source: https://docs.ros.org/en/jazzy/p/moveit_py/generated/program_listing_file_src_moveit_moveit_core_planning_interface_planning_response.hpp.html This C++ header file defines functions for accessing data from a `planning_interface::MotionPlanResponse` object. It includes utility functions to retrieve the robot trajectory, start state, error codes, planning time, and planner ID. These functions are designed to be bound to Python using pybind11. ```cpp /********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2022, Peter David Fagan * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * Neither the name of PickNik Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *********************************************************************/ /* Author: Peter David Fagan */ #pragma once #include #include #include #include #include #include #include namespace py = pybind11; namespace moveit_py { namespace bind_planning_interface { std::shared_ptr getMotionPlanResponseTrajectory(std::shared_ptr& response); moveit_msgs::msg::RobotState getMotionPlanResponseStartState(std::shared_ptr& response); moveit_msgs::msg::MoveItErrorCodes getMotionPlanResponseErrorCode(std::shared_ptr& response); double getMotionPlanResponsePlanningTime(std::shared_ptr& response); std::string getMotionPlanResponsePlannerId(std::shared_ptr& response); void initMotionPlanResponse(py::module& m); } // namespace bind_planning_interface } // namespace moveit_py ``` -------------------------------- ### Get Motion Plan Response Start State Source: https://docs.ros.org/en/jazzy/p/moveit_py/_sources/generated/function_planning__response_8hpp_1a6571366f4f5733ec36ff48c76fc86056.rst.txt Retrieves the start state from a MoveIt motion plan response object. ```APIDOC ## Function moveit_py::bind_planning_interface::getMotionPlanResponseStartState ### Description This function retrieves the start state from a `planning_interface::MotionPlanResponse` object. ### Method Not applicable (this is a C++ function documentation, not a REST API endpoint). ### Endpoint Not applicable. ### Parameters #### Path Parameters None. #### Query Parameters None. #### Request Body None. ### Request Example Not applicable. ### Response #### Success Response (200) Not applicable (this is a C++ function documentation). #### Response Example Not applicable. ``` -------------------------------- ### initPlanningComponent Source: https://docs.ros.org/en/jazzy/p/moveit_py/generated/namespace_moveit_py__bind_planning_component.html Initializes the planning component. ```APIDOC ## initPlanningComponent ### Description Initializes the planning component. ### Method (Not specified in source) ### Endpoint (Not specified in source) ### Parameters (No parameters specified in source) ### Request Example (No request example specified in source) ### Response (No response specified in source) ``` -------------------------------- ### Function: initPlanningComponent Source: https://docs.ros.org/en/jazzy/p/moveit_py/_sources/generated/function_planning__component_8hpp_1abf595e61d0f2c2632edf907c487f6dc5.rst.txt Initializes the planning component module for moveit_py. ```APIDOC ## Function: moveit_py::bind_planning_component::initPlanningComponent ### Description Initializes the planning component within the moveit_py Python module. ### Parameters - **m** (py::module&) - Required - The Python module to bind the planning component to. ``` -------------------------------- ### Function: moveit_py::bind_planning_component::initPlanningComponent Source: https://docs.ros.org/en/jazzy/p/moveit_py/generated/function_planning__component_8hpp_1abf595e61d0f2c2632edf907c487f6dc5.html Initializes the planning component module for Python bindings. ```APIDOC ## Function: moveit_py::bind_planning_component::initPlanningComponent ### Description Initializes the planning component module for Python bindings. This function is defined in planning_component.hpp. ### Method C++ Function ### Parameters - **m** (py::module &) - Required - The Python module to bind the planning component to. ``` -------------------------------- ### Get All Transforms Source: https://docs.ros.org/en/jazzy/p/moveit_py/_sources/generated/program_listing_file_src_moveit_moveit_core_transforms_transforms.hpp.rst.txt Retrieves all available transformation matrices managed by the MoveIt transforms object. ```APIDOC ## GET /transforms/getAllTransforms ### Description Retrieves a map of all available coordinate transforms. ### Method GET ### Endpoint /transforms/getAllTransforms ### Parameters #### Query Parameters - **transforms** (shared_ptr) - Required - A pointer to the MoveIt Transforms object. ### Response #### Success Response (200) - **transforms_map** (map) - A map where keys are frame names and values are their corresponding transformation matrices. #### Response Example ```json { "transforms_map": { "world_frame": [ [1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0] ], "base_link": [ [0.999, -0.035, 0.0, 0.0], [0.035, 0.999, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0] ] } } ``` ``` -------------------------------- ### Function: moveit_py::bind_planning_scene_monitor::initPlanningSceneMonitor Source: https://docs.ros.org/en/jazzy/p/moveit_py/generated/function_planning__scene__monitor_8hpp_1ae80f4d6a7b2f581421bc9954e181704f.html Initializes the Planning Scene Monitor bindings for the Python module. ```APIDOC ## Function: moveit_py::bind_planning_scene_monitor::initPlanningSceneMonitor ### Description Initializes and binds the Planning Scene Monitor to the provided Python module. ### Definition Defined in `planning_scene_monitor.hpp` ### Signature `void moveit_py::bind_planning_scene_monitor::initPlanningSceneMonitor(py::module &m)` ### Parameters - **m** (py::module&) - Required - The Python module to which the Planning Scene Monitor functionality will be bound. ``` -------------------------------- ### Get Planning Scene Message Source: https://docs.ros.org/en/jazzy/p/moveit_py/_sources/generated/function_planning__scene_8hpp_1ac9e12dec0771e95e66b64f1e87119f30.rst.txt Retrieves the planning scene message from a given PlanningScene object. ```APIDOC ## Function moveit_py::bind_planning_scene::getPlanningSceneMsg ### Description Retrieves the planning scene message from a shared pointer to a planning_scene::PlanningScene object. ### Method This documentation describes a function, not a direct HTTP method. The underlying operation likely involves data retrieval. ### Endpoint N/A (This is a function call within a Python binding for C++) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```python # Assuming 'planning_scene_ptr' is a std::shared_ptr planning_scene_msg = moveit_py.bind_planning_scene.getPlanningSceneMsg(planning_scene_ptr) ``` ### Response #### Success Response (200) - **planning_scene_msg** (object) - A message object representing the planning scene. #### Response Example ```json { "example": "PlanningScene message object structure" } ``` ``` -------------------------------- ### Get Motion Plan Response Planner ID Source: https://docs.ros.org/en/jazzy/p/moveit_py/_sources/generated/function_planning__response_8hpp_1ae100a650c54e4f7640723129460708c1.rst.txt Retrieves the planner ID from a MotionPlanResponse object. ```APIDOC ## GET /planning/response/planner_id ### Description Retrieves the planner ID from a given `MotionPlanResponse` object. ### Method GET ### Endpoint `/planning/response/planner_id` ### Parameters #### Query Parameters - **response** (std::shared_ptr) - Required - The motion plan response object. ### Response #### Success Response (200) - **planner_id** (string) - The ID of the planner used to generate the motion plan. #### Response Example ```json { "planner_id": "ompl_planner" } ``` ``` -------------------------------- ### Initialize MoveIt World Bindings Source: https://docs.ros.org/en/jazzy/p/moveit_py/generated/program_listing_file_src_moveit_moveit_core_collision_detection_world.hpp.html Header file defining the initWorld function for pybind11 integration with MoveIt collision detection. ```cpp /********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2023, Jafar Uruç * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. *********************************************************************/ /* Author: Jafar Uruç */ #pragma once #include #include #include #include namespace py = pybind11; namespace moveit_py { namespace bind_collision_detection { void initWorld(py::module& m); } // namespace bind_collision_detection } // namespace moveit_py ``` -------------------------------- ### Function: initPlanningScene Source: https://docs.ros.org/en/jazzy/p/moveit_py/_sources/generated/function_planning__scene_8hpp_1a25844450b808ada77d0d4e730cc08a42.rst.txt Initializes the planning scene module for the MoveIt Python bindings. ```APIDOC ## Function: moveit_py::bind_planning_scene::initPlanningScene ### Description Initializes the planning scene module within the MoveIt Python bindings. This function is typically called during the module loading process to register planning scene functionality. ### Parameters - **m** (py::module&) - Required - The Python module object to which the planning scene bindings will be added. ``` -------------------------------- ### Get Robot Trajectory Message Source: https://docs.ros.org/en/jazzy/p/moveit_py/_sources/generated/function_robot__trajectory_8hpp_1aa8776d0ca716ba8dc566ba76d45fa8b9.rst.txt Retrieves the Robot Trajectory message from a given Robot Trajectory object. ```APIDOC ## Function moveit_py::bind_robot_trajectory::getRobotTrajectoryMsg ### Description Retrieves the Robot Trajectory message from a given Robot Trajectory object. ### Method Not specified (likely a getter function) ### Endpoint Not applicable (C++ function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```cpp // Example usage within C++ code // Assuming robot_trajectory_ptr is a valid RobotTrajectoryConstPtr // and joint_names is a std::vector moveit_py::bind_robot_trajectory::getRobotTrajectoryMsg(robot_trajectory_ptr, joint_names); ``` ### Response #### Success Response (200) - **RobotTrajectoryMsg** (type) - The Robot Trajectory message. #### Response Example ```json { "example": "RobotTrajectoryMsg object" } ``` ``` -------------------------------- ### Function: initPlanRequestParameters Source: https://docs.ros.org/en/jazzy/p/moveit_py/_sources/generated/function_planning__component_8hpp_1ad2af5806f2cf7f21e17dfdbc70628e4b.rst.txt Initializes plan request parameters for the MoveIt planning component via Python bindings. ```APIDOC ## Function: moveit_py::bind_planning_component::initPlanRequestParameters ### Description Initializes the plan request parameters for the MoveIt planning component within the Python module. ### Parameters - **m** (py::module&) - Required - The Python module to which the planning component parameters will be bound. ``` -------------------------------- ### Get a Specific Transform Source: https://docs.ros.org/en/jazzy/p/moveit_py/_sources/generated/program_listing_file_src_moveit_moveit_core_transforms_transforms.hpp.rst.txt Retrieves a specific transformation matrix from a given source frame to the current world frame. ```APIDOC ## GET /transforms/getTransform ### Description Retrieves the transformation matrix from the specified `from_frame` to the world frame. ### Method GET ### Endpoint /transforms/getTransform ### Parameters #### Query Parameters - **transforms** (shared_ptr) - Required - A pointer to the MoveIt Transforms object. - **from_frame** (string) - Required - The name of the source frame for the transformation. ### Response #### Success Response (200) - **transform** (Eigen::MatrixXd) - The transformation matrix. #### Response Example ```json { "transform": [ [1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0] ] } ``` ``` -------------------------------- ### Function: moveit_py::bind_planning_component::initPlanRequestParameters Source: https://docs.ros.org/en/jazzy/p/moveit_py/generated/function_planning__component_8hpp_1ad2af5806f2cf7f21e17dfdbc70628e4b.html Initializes planning request parameters for the MoveIt Python bindings. ```APIDOC ## Function: moveit_py::bind_planning_component::initPlanRequestParameters ### Description Initializes the planning request parameters within the Python module bindings for MoveIt. ### Definition Defined in `planning_component.hpp` ### Signature `void moveit_py::bind_planning_component::initPlanRequestParameters(py::module &m)` ### Parameters - **m** (py::module&) - Required - The Python module to which the planning request parameters will be bound. ``` -------------------------------- ### Function: initMotionPlanResponse Source: https://docs.ros.org/en/jazzy/p/moveit_py/_sources/generated/function_planning__response_8hpp_1a60f8b1ce85b4646ece9ddf1462eba3bb.rst.txt Initializes the motion plan response bindings for the moveit_py module. ```APIDOC ## Function: moveit_py::bind_planning_interface::initMotionPlanResponse ### Description Initializes the motion plan response bindings for the Python interface. This function is defined in the moveit_core planning_interface. ### Parameters - **m** (py::module&) - Required - The Python module to which the planning response interface will be bound. ``` -------------------------------- ### C++ Declarations for Planning Scene Source: https://docs.ros.org/en/jazzy/p/moveit_py/generated/program_listing_file_src_moveit_moveit_core_planning_scene_planning_scene.hpp.html This C++ code declares functions for interacting with MoveIt's planning scene, including applying collision objects, getting frame transforms, and retrieving planning scene messages. It utilizes pybind11 for Python bindings. ```cpp /********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2022, Peter David Fagan * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * Neither the name of PickNik Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. *********************************************************************/ /* Author: Peter David Fagan */ #pragma once #include #include #include #include #include #include namespace py = pybind11; namespace moveit_py { namespace bind_planning_scene { void applyCollisionObject(std::shared_ptr& planning_scene, moveit_msgs::msg::CollisionObject& collision_object_msg, std::optional color_msg); Eigen::MatrixXd getFrameTransform(std::shared_ptr& planning_scene, const std::string& id); moveit_msgs::msg::PlanningScene getPlanningSceneMsg(std::shared_ptr& planning_scene); void initPlanningScene(py::module& m); } } ``` -------------------------------- ### moveit_py::bind_planning_scene::initPlanningScene Source: https://docs.ros.org/en/jazzy/p/moveit_py/generated/function_planning__scene_8hpp_1a25844450b808ada77d0d4e730cc08a42.html Initializes the planning scene bindings for the MoveIt Py Python interface. ```APIDOC ## void moveit_py::bind_planning_scene::initPlanningScene(py::module &m) ### Description Initializes the planning scene bindings for the MoveIt Py Python interface. ### Method C++ Function ### Endpoint N/A (C++ function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example N/A (C++ function) ### Response #### Success Response (void) This function does not return a value. #### Response Example N/A (C++ function) ``` -------------------------------- ### Planning Scene Monitor Initialization Source: https://docs.ros.org/en/jazzy/p/moveit_py/generated/namespace_moveit_py__bind_planning_scene_monitor.html Functions for initializing and managing planning scene contexts. ```APIDOC ## Function moveit_py::bind_planning_scene_monitor::initContextManagers ### Description Initializes the context managers for the planning scene. ### Method (Not specified, likely internal C++ function) ### Endpoint N/A ### Parameters None explicitly listed. ### Request Example N/A ### Response N/A ## Function moveit_py::bind_planning_scene_monitor::initPlanningSceneMonitor ### Description Initializes the planning scene monitor. ### Method (Not specified, likely internal C++ function) ### Endpoint N/A ### Parameters None explicitly listed. ### Request Example N/A ### Response N/A ``` -------------------------------- ### initPlanningSceneMonitor Source: https://docs.ros.org/en/jazzy/p/moveit_py/_sources/generated/function_planning__scene__monitor_8hpp_1ae80f4d6a7b2f581421bc9954e181704f.rst.txt Initializes the Planning Scene Monitor within the moveit_py module. ```APIDOC ## Function: initPlanningSceneMonitor ### Description Initializes the Planning Scene Monitor for the moveit_py Python bindings. ### Parameters - **m** (py::module&) - Required - The Python module to bind the Planning Scene Monitor functionality to. ### Definition Defined in: src/moveit/moveit_ros/planning_scene_monitor/planning_scene_monitor.hpp ``` -------------------------------- ### Function: moveit_py::bind_planning_interface::initMotionPlanResponse Source: https://docs.ros.org/en/jazzy/p/moveit_py/generated/function_planning__response_8hpp_1a60f8b1ce85b4646ece9ddf1462eba3bb.html Initializes the motion plan response bindings for the MoveIt Python interface. ```APIDOC ## Function: moveit_py::bind_planning_interface::initMotionPlanResponse ### Description Initializes the motion plan response bindings for the MoveIt Python interface, defined in planning_response.hpp. ### Method C++ Function Call ### Parameters - **m** (py::module&) - Required - The pybind11 module to which the motion plan response bindings will be added. ``` -------------------------------- ### Planning Component Header File Source: https://docs.ros.org/en/jazzy/p/moveit_py/generated/program_listing_file_src_moveit_moveit_ros_moveit_cpp_planning_component.hpp.html Contains the declarations for binding the MoveIt PlanningComponent to Python using pybind11. ```cpp /********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2022, Peter David Fagan * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * Neither the name of PickNik Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. *********************************************************************/ /* Author: Peter David Fagan */ #pragma once #include #include #include #include #include #include #include #include #include #include #include #include "moveit_cpp.hpp" #include "../planning_scene_monitor/planning_scene_monitor.hpp" #include "../../moveit_core/planning_interface/planning_response.hpp" namespace py = pybind11; namespace moveit_py { namespace bind_planning_component { planning_interface::MotionPlanResponse plan(std::shared_ptr& planning_component, std::shared_ptr& single_plan_parameters, std::shared_ptr& multi_plan_parameters, std::shared_ptr& planning_scene, std::optional solution_selection_function, std::optional stopping_criterion_callback); bool setGoal(std::shared_ptr& planning_component, std::optional configuration_name, std::optional robot_state, std::optional pose_stamped_msg, std::optional pose_link, std::optional> motion_plan_constraints); bool setStartState(std::shared_ptr& planning_component, std::optional configuration_name, std::optional robot_state); void initPlanRequestParameters(py::module& m); void initMultiPlanRequestParameters(py::module& m); void initPlanningComponent(py::module& m); } // namespace bind_planning_component } // namespace moveit_py ``` -------------------------------- ### initMultiPlanRequestParameters Function Source: https://docs.ros.org/en/jazzy/p/moveit_py/_sources/generated/function_planning__component_8hpp_1aba5b22ecb6295343061ab3d3d256f36b.rst.txt Initializes multi-plan request parameters for the planning component. ```APIDOC ## Function moveit_py::bind_planning_component::initMultiPlanRequestParameters ### Description Initializes multi-plan request parameters for the planning component. ### Method Not applicable (Python function binding) ### Endpoint Not applicable (Python function binding) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python # This is a Python function binding, not a direct HTTP request. # Example usage would involve calling the function within a Python script: # moveit_py.bind_planning_component.initMultiPlanRequestParameters(pybind11_module) ``` ### Response #### Success Response (200) None (Function modifies internal state or binds Python objects) #### Response Example None ``` -------------------------------- ### MoveIt Py Bindings Overview Source: https://docs.ros.org/en/jazzy/p/moveit_py/genindex.html The moveit_py project provides Python bindings for various MoveIt C++ components. These functions allow for the initialization of planning components, robot models, and trajectory management. ```APIDOC ## MoveIt Py C++ Bindings ### Description This module provides the interface between Python and the MoveIt C++ core. It includes bindings for collision detection, kinematic constraints, planning components, and robot state management. ### Key Components - **Collision Detection**: `initAcm`, `initCollisionRequest`, `initCollisionResult`, `initWorld` - **Planning Components**: `initPlanningComponent`, `plan`, `setGoal`, `setStartState` - **Robot State**: `initRobotState`, `getJacobian`, `getPose`, `update` - **Planning Scene Monitor**: `LockedPlanningSceneContextManagerRO`, `LockedPlanningSceneContextManagerRW` - **Trajectory Execution**: `initTrajectoryExecutionManager` ``` -------------------------------- ### Initialize Collision Detection World Bindings Source: https://docs.ros.org/en/jazzy/p/moveit_py/_sources/generated/program_listing_file_src_moveit_moveit_core_collision_detection_world.hpp.rst.txt Header file defining the initWorld function for pybind11 bindings within the moveit_py namespace. ```cpp /********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2023, Jafar Uruç * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. *********************************************************************/ /* Author: Jafar Uruç */ #pragma once #include #include #include #include namespace py = pybind11; namespace moveit_py { namespace bind_collision_detection { void initWorld(py::module& m); } // namespace bind_collision_detection } // namespace moveit_py ``` -------------------------------- ### Initialize Trajectory Execution Manager Bindings Source: https://docs.ros.org/en/jazzy/p/moveit_py/generated/program_listing_file_src_moveit_moveit_ros_trajectory_execution_manager_trajectory_execution_manager.hpp.html Header file defining the initTrajectoryExecutionManager function for pybind11 integration. ```cpp /********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2023, Matthijs van der Burgh * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. *********************************************************************/ /* Author: Matthijs van der Burgh */ #pragma once #include #include #include #include #include #include #include namespace py = pybind11; namespace moveit_py { namespace bind_trajectory_execution_manager { void initTrajectoryExecutionManager(py::module& m); } // namespace bind_trajectory_execution_manager } // namespace moveit_py ``` -------------------------------- ### C++ Planning Scene Monitor Header Source: https://docs.ros.org/en/jazzy/p/moveit_py/_sources/generated/program_listing_file_src_moveit_moveit_ros_planning_scene_monitor_planning_scene_monitor.hpp.rst.txt This C++ header file defines classes and functions for managing the planning scene in MoveIt, including context managers for read-write and read-only access. It also includes necessary includes for pybind11 and ROS. ```cpp /********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2022, Peter David Fagan * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * Neither the name of PickNik Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. *********************************************************************/ /* Author: Peter David Fagan */ #pragma once #include #include #include #include #include #include #include #include #include namespace py = pybind11; namespace moveit_py { namespace bind_planning_scene_monitor { class LockedPlanningSceneContextManagerRW { public: const planning_scene_monitor::PlanningSceneMonitorPtr planning_scene_monitor_; std::unique_ptr ls_rw_; LockedPlanningSceneContextManagerRW(const planning_scene_monitor::PlanningSceneMonitorPtr& psm) : planning_scene_monitor_(psm) { ls_rw_ = std::make_unique(planning_scene_monitor_); } const planning_scene::PlanningScenePtr& lockedPlanningSceneRwEnter(); void lockedPlanningSceneRwExit(const py::object& type, const py::object& value, const py::object& traceback); }; class LockedPlanningSceneContextManagerRO { public: const planning_scene_monitor::PlanningSceneMonitorPtr planning_scene_monitor_; std::unique_ptr ls_ro_; LockedPlanningSceneContextManagerRO(const planning_scene_monitor::PlanningSceneMonitorPtr& psm) : planning_scene_monitor_(psm) { ls_ro_ = std::make_unique(planning_scene_monitor_); } const planning_scene::PlanningSceneConstPtr& lockedPlanningSceneRoEnter() const; void lockedPlanningSceneRoExit(const py::object& type, const py::object& value, const py::object& traceback); }; LockedPlanningSceneContextManagerRW readWrite(const planning_scene_monitor::PlanningSceneMonitorPtr& planning_scene_monitor); LockedPlanningSceneContextManagerRO readOnly(const planning_scene_monitor::PlanningSceneMonitorPtr& planning_scene_monitor); void initPlanningSceneMonitor(py::module& m); void initContextManagers(py::module& m); } } } ``` -------------------------------- ### moveit_py::bind_planning_scene Functions Source: https://docs.ros.org/en/jazzy/p/moveit_py/generated/namespace_moveit_py__bind_planning_scene.html Overview of the available functions within the moveit_py::bind_planning_scene namespace. ```APIDOC ## Functions in moveit_py::bind_planning_scene ### applyCollisionObject - Description: Applies a collision object to the planning scene. ### getFrameTransform - Description: Retrieves the transform for a specific frame. ### getPlanningSceneMsg - Description: Retrieves the current planning scene as a message. ### initPlanningScene - Description: Initializes the planning scene environment. ``` -------------------------------- ### License and Includes for utils.hpp Source: https://docs.ros.org/en/jazzy/p/moveit_py/_sources/generated/program_listing_file_src_moveit_moveit_core_kinematic_constraints_utils.hpp.rst.txt This snippet includes the BSD license, author information, and necessary C++ headers for kinematic constraint utilities. It sets up the pybind11 namespace and includes headers for ROS 2, MoveIt robot model, and MoveIt messages. ```cpp /********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2022, Peter David Fagan * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * Neither the name of PickNik Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. *********************************************************************/ /* Author: Peter David Fagan */ #pragma once #include #include #include #include #include #include namespace py = pybind11; namespace moveit_py { namespace bind_kinematic_constraints { ```