moveit2
The MoveIt Motion Planning Framework for ROS 2.
Loading...
Searching...
No Matches
copy_ros_msg.h
Go to the documentation of this file.
1/*********************************************************************
2 * Software License Agreement (BSD License)
3 *
4 * Copyright (c) 2022, Peter David Fagan
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 *
11 * * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above
14 * copyright notice, this list of conditions and the following
15 * disclaimer in the documentation and/or other materials provided
16 * with the distribution.
17 * * Neither the name of PickNik Inc. nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 * POSSIBILITY OF SUCH DAMAGE.
33 *********************************************************************/
34
35/* Author: Peter David Fagan */
36
37#pragma once
38
39#include <geometry_msgs/msg/pose_stamped.hpp>
40#include <moveit_msgs/msg/collision_object.hpp>
41#include <moveit_msgs/msg/constraints.hpp>
42#include <pybind11/pybind11.h>
43
44namespace py = pybind11;
45
46namespace moveit_py
47{
48namespace moveit_py_utils
49{
50geometry_msgs::msg::PoseStamped poseStampedToCpp(const py::object& pose_stamped);
51
52// TODO(peterdavidfagan): consider creating typecaster
53geometry_msgs::msg::Pose poseToCpp(const py::object& pose);
54py::object poseToPy(geometry_msgs::msg::Pose pose);
55
56geometry_msgs::msg::Point pointToCpp(const py::object& point);
57
58geometry_msgs::msg::Vector3 vector3ToCpp(const py::object& vector3);
59
60geometry_msgs::msg::Quaternion quaternionToCpp(const py::object& quaternion);
61
62shape_msgs::msg::SolidPrimitive solidPrimitiveToCpp(const py::object& primitive);
63
64shape_msgs::msg::MeshTriangle meshTriangleToCpp(const py::object& mesh_triangle);
65
66shape_msgs::msg::Mesh meshToCpp(const py::object& mesh);
67
68moveit_msgs::msg::BoundingVolume boundingVolumeToCpp(const py::object& bounding_volume);
69
70moveit_msgs::msg::JointConstraint jointConstraintToCpp(const py::object& joint_constraint);
71
72moveit_msgs::msg::PositionConstraint positionConstraintToCpp(const py::object& position_constraint);
73
74moveit_msgs::msg::OrientationConstraint orientationConstraintToCpp(const py::object& orientation_constraint);
75
76moveit_msgs::msg::VisibilityConstraint visibilityConstraintToCpp(const py::object& visibility_constraint);
77
78moveit_msgs::msg::CollisionObject collisionObjectToCpp(const py::object& collision_object);
79
80moveit_msgs::msg::Constraints constraintsToCpp(const py::object& constraints);
81} // namespace moveit_py_utils
82} // namespace moveit_py
geometry_msgs::msg::Quaternion quaternionToCpp(const py::object &quaternion)
shape_msgs::msg::Mesh meshToCpp(const py::object &mesh)
moveit_msgs::msg::PositionConstraint positionConstraintToCpp(const py::object &position_constraint)
shape_msgs::msg::MeshTriangle meshTriangleToCpp(const py::object &mesh_triangle)
moveit_msgs::msg::Constraints constraintsToCpp(const py::object &constraints)
geometry_msgs::msg::Vector3 vector3ToCpp(const py::object &vector3)
moveit_msgs::msg::BoundingVolume boundingVolumeToCpp(const py::object &bounding_volume)
geometry_msgs::msg::Pose poseToCpp(const py::object &pose)
moveit_msgs::msg::OrientationConstraint orientationConstraintToCpp(const py::object &orientation_constraint)
py::object poseToPy(geometry_msgs::msg::Pose pose)
shape_msgs::msg::SolidPrimitive solidPrimitiveToCpp(const py::object &primitive)
moveit_msgs::msg::CollisionObject collisionObjectToCpp(const py::object &collision_object)
geometry_msgs::msg::PoseStamped poseStampedToCpp(const py::object &pose_stamped)
moveit_msgs::msg::VisibilityConstraint visibilityConstraintToCpp(const py::object &visibility_constraint)
geometry_msgs::msg::Point pointToCpp(const py::object &point)
moveit_msgs::msg::JointConstraint jointConstraintToCpp(const py::object &joint_constraint)