Ask Your Question
2

moveit_ros_planning_interface API code

asked 2016-11-22 21:08:30 -0500

shawnysh gravatar image

updated 2016-11-22 23:55:59 -0500

In moveit_commander.move_group.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 moveit_ros_planning_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 moveit_ros_planning_interface

However, when I click moveit_ros_planning_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 moveit_ros_planning_interface and _moveit_move_group_interface within it?

Q2:

image description

As figure shows, why do both planning_interface and py_bindings_tools have parent namespace moveit, while moveit_ros_planning_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 moveit_ros_planning_interface exactly?

Q4: In moveit_commander.move_group.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 __init__function ?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-10-12 05:29:38 -0500

rickstaa gravatar image

updated 2019-10-12 05:46:47 -0500

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2016-11-22 21:08:30 -0500

Seen: 260 times

Last updated: Oct 12