#! /usr/bin/env python

# Copyright (C) 2012-2013 Simon Lynen, ASL, ETH Zurich, Switzerland
# You can contact the author at <slynen at ethz dot ch>
# Copyright (C) 2011-2012 Stephan Weiss, ASL, ETH Zurich, Switzerland
# You can contact the author at <stephan dot weiss at ieee dot org>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


PACKAGE='msf_updates'
import roslib; roslib.load_manifest(PACKAGE)

#from driver_base.msg import SensorLevels
from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

# @todo Think about levels. Setting most of these to STOP to guarantee atomicity.
# @todo Double check these ranges, defaults

INIT_FILTER     = gen.const("INIT_FILTER",              int_t, 0x00000001, "init_filter")
MISC            = gen.const("MISC",                     int_t, 0x00000002, "misc")

#       Name                 Type      Reconfiguration level                Description   Default   Min   Max
gen.add("core_init_filter",     bool_t,     INIT_FILTER["value"],           "Call filter init",                    False)

gen.add("angle_noise_meas",     double_t,   MISC["value"],                  "Noise for angle measurement sensor (std. dev).",         0.01,          0,       10)
gen.add("distance_noise_meas",  double_t,   MISC["value"],                  "Noise for distance measurement sensor (std. dev).",         0.01,          0,       10)
gen.add("yaw_init",		        double_t,   MISC["value"],                  "Initial value of yaw.",         0,          -180,       180)
gen.add("angle_delay",          double_t,   MISC["value"],                  "Fix delay for angle measurement in seconds.",               0.02,       -2.0,     2.0)
gen.add("distance_delay",       double_t,   MISC["value"],                  "Fix delay for distance measurement in seconds.",               0.02,       -2.0,     2.0)
gen.add("noise_p_ip",           double_t,   MISC["value"],                  "Propagation: noise p_ip (std. dev).",           0.0,        0,          10.0)
gen.add("fixed_p_ip", 		    bool_t,     MISC["value"], 					"Fix calibration state position.", False)

exit(gen.generate(PACKAGE, "Config", "SphericalPositionSensor"))
