Skip to content

Commit

Permalink
add RosPublish.add_signals()
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Sep 3, 2020
1 parent 930b340 commit d88c6f4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
12 changes: 9 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,15 @@ FOREACH(plugin ${plugins})

IF(BUILD_PYTHON_INTERFACE)
STRING(REPLACE - _ PYTHON_LIBRARY_NAME ${LIBRARY_NAME})
DYNAMIC_GRAPH_PYTHON_MODULE("ros/${PYTHON_LIBRARY_NAME}"
${LIBRARY_NAME} ${PROJECT_NAME}-${PYTHON_LIBRARY_NAME}-wrap
MODULE_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/${plugin}-python.hh)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${plugin}-python-module-py.cc")
DYNAMIC_GRAPH_PYTHON_MODULE("ros/${PYTHON_LIBRARY_NAME}"
${LIBRARY_NAME} ${PROJECT_NAME}-${PYTHON_LIBRARY_NAME}-wrap
SOURCE_PYTHON_MODULE "${CMAKE_CURRENT_SOURCE_DIR}/${plugin}-python-module-py.cc")
elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${plugin}-python.hh")
DYNAMIC_GRAPH_PYTHON_MODULE("ros/${PYTHON_LIBRARY_NAME}"
${LIBRARY_NAME} ${PROJECT_NAME}-${PYTHON_LIBRARY_NAME}-wrap
MODULE_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/${plugin}-python.hh")
endif()
ENDIF(BUILD_PYTHON_INTERFACE)
ENDFOREACH(plugin)

Expand Down
12 changes: 12 additions & 0 deletions src/ros_publish-python-module-py.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include <dynamic-graph/python/module.hh>
#include "ros_publish.hh"

namespace dg = dynamicgraph;


BOOST_PYTHON_MODULE(wrap)
{
bp::import("dynamic_graph");

dg::python::exposeEntity<dg::RosPublish, bp::bases<dg::Entity>, dg::python::AddCommands>() ;
}
3 changes: 0 additions & 3 deletions src/ros_publish-python.hh

This file was deleted.

0 comments on commit d88c6f4

Please sign in to comment.