Commit 1fb72ab7 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Set the python setup of the package.

Added the python functions to generate the generic parameters for the module, module service and module action classes.
parent 758c2b7a
......@@ -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 ##
......
#!/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)
# 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
Supports Markdown
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