diff --git a/CMakeLists.txt b/CMakeLists.txt index e2ea37af8751280638a5e1901f4010377b8280af..72267f2873a73070798ffa4c7fafb375da3005c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ find_package(Boost REQUIRED COMPONENTS system) ## Uncomment this if the package has a setup.py. This macro ensures ## modules and global scripts declared therein get installed ## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html -# catkin_python_setup() +catkin_python_setup() ################################################ ## Declare ROS messages, services and actions ## diff --git a/setup.py b/setup.py new file mode 100644 index 0000000000000000000000000000000000000000..b40c66fbc67d62ff038e1087fb813ffc77cba515 --- /dev/null +++ b/setup.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +from distutils.core import setup +from catkin_pkg.python_setup import generate_distutils_setup +d = generate_distutils_setup( + packages=['iri_ros_tools'], + package_dir={'': 'src'}, + requires=['roslib', 'rospy', 'rosservice'] +) +setup(**d) + diff --git a/src/iri_ros_tools/__init__.py b/src/iri_ros_tools/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/iri_ros_tools/dyn_params.py b/src/iri_ros_tools/dyn_params.py new file mode 100644 index 0000000000000000000000000000000000000000..93ce21b585a6c0fd4db67ed29baaa19642e46822 --- /dev/null +++ b/src/iri_ros_tools/dyn_params.py @@ -0,0 +1,30 @@ +# submodule config parameters +from dynamic_reconfigure.parameter_generator_catkin import * + +def add_module_service_params(gen,name): + new_group = gen.add_group(name) + + new_group.add(name+"_num_retries",int_t, 0,"Number of times a service will be called before reporting an error",1,1,10) + new_group.add(name+"_enabled", bool_t,0,"Enable or disable the actual service call", True) + + return new_group + +def add_module_action_params(gen,name): + new_group = gen.add_group(name) + + new_group.add(name+"_num_retries", int_t, 0,"Number of times an action will be called before reporting an error",1, 1, 10) + new_group.add(name+"_enable_timeout", bool_t, 0,"Enable or disable the timeout feature", True) + new_group.add(name+"_timeout_s", double_t,0,"Maximum time in second to wait for the action to complete", 10.0, 1.0, 600.0) + new_group.add(name+"_enable_iwatchdog", bool_t, 0,"Enable or disable the watchdog feature", True) + new_group.add(name+"_feedback_watchdog_time_s",double_t,0,"Maximum time in second between two consecutive feedback topics", 2.0, 1.0, 100.0) + new_group.add(name+"_enabled", bool_t, 0,"Enable or disable the actual action request", True) + + return new_group + +def add_module_params(gen,name): + new_group = gen.add_group(name) + + new_group.add(name+"_rate_hz", double_t, 0,"Desired rate in Hz of the module",1.0,0.1,100.0) + + return new_group +