Commit 73cd88b5 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

control manager has dynamic signals

parent 4adde76d
......@@ -21,6 +21,7 @@ cm.controlDT = 0.005
# Initializing the input ports
# Setting the robot configuration
cm.add_signals()
cm.i_max.value = max_current
cm.u_max.value = max_tau
cm.tau.value = tau
......@@ -36,7 +37,7 @@ cm.addCtrlMode("pos")
# Add torque mode
cm.addCtrlMode("torque")
# TODO ctrl_* non working yet
# cm.ctrl_torque.value = array(currentDes)
# cm.ctrl_pos.value = pwmDes
# cm.setCtrlMode("all", "pos")
cm.add_signals()
cm.ctrl_torque.value = array(currentDes)
cm.ctrl_pos.value = pwmDes
cm.setCtrlMode("all", "pos")
......@@ -42,9 +42,15 @@ FOREACH(plugin ${plugins})
IF(BUILD_PYTHON_INTERFACE)
STRING(REPLACE - _ PYTHON_LIBRARY_NAME ${LIBRARY_NAME})
DYNAMIC_GRAPH_PYTHON_MODULE("${PYTHON_DIR}/${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("${PYTHON_DIR}/${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("${PYTHON_DIR}/${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)
......
#include <dynamic-graph/python/module.hh>
#include "sot/torque_control/control-manager.hh"
namespace dg = dynamicgraph;
BOOST_PYTHON_MODULE(wrap)
{
bp::import("dynamic_graph");
dg::python::exposeEntity<dg::sot::torque_control::ControlManager, bp::bases<dg::Entity>, dg::python::AddCommands>() ;
}
#include "sot/torque_control/control-manager.hh"
typedef boost::mpl::vector< dynamicgraph::sot::torque_control::ControlManager > entities_t;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment