moveit2
The MoveIt Motion Planning Framework for ROS 2.
Classes | Functions
moveit::py_bindings_tools Namespace Reference

Tools for creating python bindings for MoveIt. More...

Classes

class  GILReleaser
 RAII Helper to release the Global Interpreter Lock (GIL) More...
 
class  ROScppInitializer
 The constructor of this class ensures that ros::init() has been called. Thread safety and multiple initialization is properly handled. When the process terminates, ros::shutdown() is also called, if needed. More...
 
class  ByteString
 C++ Wrapper class for Python 3 Bytes Object. More...
 

Functions

template<typename T >
std::vector< T > typeFromList (const boost::python::object &values)
 
template<typename T >
boost::python::list listFromType (const std::vector< T > &v)
 
template<typename T >
boost::python::dict dictFromType (const std::map< std::string, T > &v)
 
std::vector< double > doubleFromList (const boost::python::object &values)
 
std::vector< std::string > stringFromList (const boost::python::object &values)
 
boost::python::list listFromDouble (const std::vector< double > &v)
 
boost::python::list listFromString (const std::vector< std::string > &v)
 
void roscpp_set_arguments (const std::string &node_name, boost::python::list &argv)
 This function can be used to specify the ROS command line arguments for the internal ROScpp instance; Usually this function would also be exposed in the py module that uses ROScppInitializer. More...
 
void roscpp_init (const std::string &node_name, boost::python::list &argv)
 Initialize ROScpp with specified command line args. More...
 
void roscpp_init (boost::python::list &argv)
 Initialize ROScpp with specified command line args. More...
 
void roscpp_init ()
 Initialize ROScpp with default command line args. More...
 
void roscpp_shutdown ()
 
template<typename T >
ByteString serializeMsg (const T &msg)
 Convert a ROS message to a Python Bytestring. More...
 
template<typename T >
void deserializeMsg (const ByteString &data, T &msg)
 Convert a Python Bytestring to a ROS message. More...
 

Detailed Description

Tools for creating python bindings for MoveIt.

Function Documentation

◆ deserializeMsg()

template<typename T >
void moveit::py_bindings_tools::deserializeMsg ( const ByteString data,
T &  msg 
)

Convert a Python Bytestring to a ROS message.

Definition at line 110 of file serialize_msg.h.

Here is the call graph for this function:

◆ dictFromType()

template<typename T >
boost::python::dict moveit::py_bindings_tools::dictFromType ( const std::map< std::string, T > &  v)

Definition at line 68 of file py_conversions.h.

◆ doubleFromList()

std::vector<double> moveit::py_bindings_tools::doubleFromList ( const boost::python::object &  values)

Definition at line 76 of file py_conversions.h.

◆ listFromDouble()

boost::python::list moveit::py_bindings_tools::listFromDouble ( const std::vector< double > &  v)

Definition at line 86 of file py_conversions.h.

◆ listFromString()

boost::python::list moveit::py_bindings_tools::listFromString ( const std::vector< std::string > &  v)

Definition at line 91 of file py_conversions.h.

◆ listFromType()

template<typename T >
boost::python::list moveit::py_bindings_tools::listFromType ( const std::vector< T > &  v)

Definition at line 59 of file py_conversions.h.

◆ roscpp_init() [1/3]

void moveit::py_bindings_tools::roscpp_init ( )

Initialize ROScpp with default command line args.

Definition at line 122 of file roscpp_initializer.cpp.

◆ roscpp_init() [2/3]

void moveit::py_bindings_tools::roscpp_init ( boost::python::list &  argv)

Initialize ROScpp with specified command line args.

Definition at line 133 of file roscpp_initializer.cpp.

◆ roscpp_init() [3/3]

void moveit::py_bindings_tools::roscpp_init ( const std::string &  node_name,
boost::python::list &  argv 
)

Initialize ROScpp with specified command line args.

Definition at line 127 of file roscpp_initializer.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ roscpp_set_arguments()

void moveit::py_bindings_tools::roscpp_set_arguments ( const std::string &  node_name,
boost::python::list &  argv 
)

This function can be used to specify the ROS command line arguments for the internal ROScpp instance; Usually this function would also be exposed in the py module that uses ROScppInitializer.

Definition at line 55 of file roscpp_initializer.cpp.

Here is the caller graph for this function:

◆ roscpp_shutdown()

void moveit::py_bindings_tools::roscpp_shutdown ( )

Definition at line 139 of file roscpp_initializer.cpp.

◆ serializeMsg()

template<typename T >
ByteString moveit::py_bindings_tools::serializeMsg ( const T &  msg)

Convert a ROS message to a Python Bytestring.

Definition at line 103 of file serialize_msg.h.

◆ stringFromList()

std::vector<std::string> moveit::py_bindings_tools::stringFromList ( const boost::python::object &  values)

Definition at line 81 of file py_conversions.h.

◆ typeFromList()

template<typename T >
std::vector<T> moveit::py_bindings_tools::typeFromList ( const boost::python::object &  values)

Definition at line 50 of file py_conversions.h.