Robotics StackExchange | Archived questions

moveit_ros_planning_interface API code

In moveitcommander.movegroup.MoveGroupCommander class source code, In line 40,

> from moveit_ros_planning_interface import _moveit_move_group_interface

It raises my curiosity to find it out what it is.

Then I search moveitrosplanning_interface trying to find more about this API,

however, I cannot find more about it

In ros index website,I click API doc on the right,

then click namespace and find moveitrosplanning_interface

However, when I click moveitrosplanning_interface , it only appears planning_interface,

I click it , and it links me to ros.org but it tells me

This page does not exist yet.

Q1: How can I find more info about moveitrosplanning_interface and moveitmovegroupinterface within it?

Q2:

image description

As figure shows, why do both planninginterface and pybindings_tools have parent namespace moveit, while moveitrosplanning_interface do not?

Q3: In moveit_ros repos, it says,

MoveIt ROS This repository includes components of MoveIt that use ROS. This is where much of the functionality MoveIt provides it put together. Libraries from MoveIt Core and various plugins are used to provide that functionality. - planning - planning interfaces - benchmarking - manipulation - visualization

Now I am confused with the concept of package and API, what is moveitrosplanning_interface exactly?

Q4: In moveitcommander.movegroup.MoveGroupCommander class source code,

00044 class MoveGroupCommander(object):
00045     """
00046     Execution of simple commands for a particular group
00047     """
00048 
00049     def __init__(self, name, robot_description="robot_description"):
00050         """ Specify the group name for which to construct this commander instance. Throws an exception if there is an initialization error. """
00051         self._g = _moveit_move_group_interface.MoveGroup(name, robot_description)

Why there is ._g in initfunction ?

Asked by shawnysh on 2016-11-22 22:08:30 UTC

Comments

Answers

NOTE: I stumbled upon this question when I had a question similar to the original question. As the original question was asked in 2016, I thing the original author already found his/her answer. The answer below is, therefore, merely posted as a reference.

Answer

The moveit_ros_planning_interface module is created by the the boost::python wrapping library. The documentation about this library says the following:

The Boost Python Library is a framework for interfacing Python and C++. It allows you to quickly and seamlessly expose C++ classes functions and objects to Python, and vice-versa, using no special tools -- just your C++ compiler

This library, therefore, allows the moveit developers to develop their package in C++ and afterwards expose the C++ package as a python library.

To see the wrapping in action, look at the moveit_ros/planning_interface/CMakeLists.txt file. This CMAKE description file in conjunction with the supplementary C++ wrapper files that can be found in the folder subdirectories makes sure the C++ package is wrapped.

To answer the main question. As the moveit_ros_planning_interface is merely a wrapper there is no API specially designed for the moveit_ros_planning_interface interface. Instead, once should reference the other C++ and Python API's.

How to wrap your own C++ package using boost::python library

A guide on how to wrap a C++ package can be found here. Note that nowadays, there are easier to used alternative wrapper libraries like pybind11 available.

Asked by rickstaa on 2019-10-12 05:29:38 UTC

Comments