Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • gsaurel/dynamic_graph_bridge
  • stack-of-tasks/dynamic_graph_bridge
2 results
Show changes
Commits on Source (8)
...@@ -76,8 +76,9 @@ add_library(ros_bridge SHARED ${${PROJECT_NAME}_SOURCES} ...@@ -76,8 +76,9 @@ add_library(ros_bridge SHARED ${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS}) ${${PROJECT_NAME}_HEADERS})
target_include_directories(ros_bridge SYSTEM PUBLIC ${catkin_INCLUDE_DIRS}) target_include_directories(ros_bridge SYSTEM PUBLIC ${catkin_INCLUDE_DIRS})
target_include_directories(ros_bridge PUBLIC $<INSTALL_INTERFACE:include>) target_include_directories(ros_bridge PUBLIC $<INSTALL_INTERFACE:include>)
target_link_libraries(ros_bridge ${catkin_LIBRARIES} sot-core::sot-core target_link_libraries(
pinocchio::pinocchio) ros_bridge ${catkin_LIBRARIES} sot-core::sot-core pinocchio::pinocchio
dynamic_graph_bridge_msgs::dynamic_graph_bridge_msgs)
if(SUFFIX_SO_VERSION) if(SUFFIX_SO_VERSION)
set_target_properties(ros_bridge PROPERTIES SOVERSION ${PROJECT_VERSION}) set_target_properties(ros_bridge PROPERTIES SOVERSION ${PROJECT_VERSION})
......
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
#ifndef DYNAMIC_GRAPH_BRIDGE_FWD_HH #ifndef DYNAMIC_GRAPH_BRIDGE_FWD_HH
#define DYNAMIC_GRAPH_BRIDGE_FWD_HH #define DYNAMIC_GRAPH_BRIDGE_FWD_HH
#include <dynamic-graph/python/fwd.hh> #include <dynamic-graph/fwd.hh>
namespace dynamicgraph { namespace dynamicgraph {
// classes defined in sot-core // classes defined in sot-core
class Interpreter; class Interpreter;
typedef shared_ptr<Interpreter> InterpreterPtr_t; typedef std::shared_ptr<Interpreter> InterpreterPtr_t;
} // namespace dynamicgraph } // namespace dynamicgraph
#endif // DYNAMIC_GRAPH_PYTHON_FWD_HH #endif // DYNAMIC_GRAPH_PYTHON_FWD_HH
<package format="2"> <package format="2">
<name>dynamic_graph_bridge</name> <name>dynamic_graph_bridge</name>
<version>3.4.3</version> <version>3.4.5</version>
<description> <description>
ROS bindings for dynamic graph. ROS bindings for dynamic graph.
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
# through dynamic_graph_bridge. # through dynamic_graph_bridge.
# #
import logging
import rospy import rospy
import tf import tf
...@@ -13,15 +15,15 @@ import geometry_msgs.msg ...@@ -13,15 +15,15 @@ import geometry_msgs.msg
def main(): def main():
rospy.init_node('tf_publisher', anonymous=True) rospy.init_node("tf_publisher", anonymous=True)
frame = rospy.get_param('~frame', '') frame = rospy.get_param("~frame", "")
childFrame = rospy.get_param('~child_frame', '') childFrame = rospy.get_param("~child_frame", "")
topic = rospy.get_param('~topic', '') topic = rospy.get_param("~topic", "")
rateSeconds = rospy.get_param('~rate', 5) rateSeconds = rospy.get_param("~rate", 5)
if not frame or not childFrame or not topic: if not frame or not childFrame or not topic:
logpy.error("frame, childFrame and topic are required parameters") logging.error("frame, childFrame and topic are required parameters")
return return
rate = rospy.Rate(rateSeconds) rate = rospy.Rate(rateSeconds)
...@@ -35,11 +37,10 @@ def main(): ...@@ -35,11 +37,10 @@ def main():
ok = False ok = False
while not rospy.is_shutdown() and not ok: while not rospy.is_shutdown() and not ok:
try: try:
tl.waitForTransform(childFrame, frame, tl.waitForTransform(childFrame, frame, rospy.Time(), rospy.Duration(0.1))
rospy.Time(), rospy.Duration(0.1))
ok = True ok = True
except tf.Exception, e: except tf.Exception:
rospy.logwarn("waiting for tf transform") logging.warning("waiting for tf transform")
ok = False ok = False
while not rospy.is_shutdown(): while not rospy.is_shutdown():
...@@ -60,4 +61,5 @@ def main(): ...@@ -60,4 +61,5 @@ def main():
pub.publish(transform) pub.publish(transform)
rate.sleep() rate.sleep()
main() main()
...@@ -10,9 +10,8 @@ foreach(plugin ${plugins}) ...@@ -10,9 +10,8 @@ foreach(plugin ${plugins})
${PROJECT_VERSION}) ${PROJECT_VERSION})
endif(SUFFIX_SO_VERSION) endif(SUFFIX_SO_VERSION)
target_link_libraries( target_link_libraries(${LIBRARY_NAME} ${${LIBRARY_NAME}_deps}
${LIBRARY_NAME} ${${LIBRARY_NAME}_deps} ${catkin_LIBRARIES} ros_bridge ${catkin_LIBRARIES} ros_bridge)
dynamic_graph_bridge_msgs::dynamic_graph_bridge_msgs)
if(NOT INSTALL_PYTHON_INTERFACE_ONLY) if(NOT INSTALL_PYTHON_INTERFACE_ONLY)
install( install(
...@@ -46,10 +45,8 @@ if(BUILD_PYTHON_INTERFACE) ...@@ -46,10 +45,8 @@ if(BUILD_PYTHON_INTERFACE)
# ros_interperter library. # ros_interperter library.
add_library(ros_interpreter ros_interpreter.cpp) add_library(ros_interpreter ros_interpreter.cpp)
target_link_libraries( target_link_libraries(ros_interpreter ros_bridge ${catkin_LIBRARIES}
ros_interpreter ros_bridge ${catkin_LIBRARIES} dynamic-graph-python::dynamic-graph-python)
dynamic-graph-python::dynamic-graph-python
dynamic_graph_bridge_msgs::dynamic_graph_bridge_msgs)
install( install(
TARGETS ros_interpreter TARGETS ros_interpreter
...@@ -60,16 +57,14 @@ endif(BUILD_PYTHON_INTERFACE) ...@@ -60,16 +57,14 @@ endif(BUILD_PYTHON_INTERFACE)
# Stand alone embedded intepreter with a robot controller. # Stand alone embedded intepreter with a robot controller.
add_executable(geometric_simu geometric_simu.cpp sot_loader.cpp add_executable(geometric_simu geometric_simu.cpp sot_loader.cpp
sot_loader_basic.cpp) sot_loader_basic.cpp)
target_link_libraries( target_link_libraries(geometric_simu Boost::program_options ${CMAKE_DL_LIBS}
geometric_simu Boost::program_options ${CMAKE_DL_LIBS} ${catkin_LIBRARIES} ${catkin_LIBRARIES} ros_bridge)
ros_bridge dynamic_graph_bridge_msgs::dynamic_graph_bridge_msgs)
install(TARGETS geometric_simu DESTINATION lib/${PROJECT_NAME}) install(TARGETS geometric_simu DESTINATION lib/${PROJECT_NAME})
# Sot loader library # Sot loader library
add_library(sot_loader sot_loader.cpp sot_loader_basic.cpp) add_library(sot_loader sot_loader.cpp sot_loader_basic.cpp)
target_link_libraries( target_link_libraries(sot_loader Boost::program_options ${catkin_LIBRARIES}
sot_loader Boost::program_options ${catkin_LIBRARIES} ros_bridge ros_bridge)
dynamic_graph_bridge_msgs::dynamic_graph_bridge_msgs)
install( install(
TARGETS sot_loader TARGETS sot_loader
EXPORT ${TARGETS_EXPORT_NAME} EXPORT ${TARGETS_EXPORT_NAME}
......