00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 PACKAGE='wge100_camera'
00039
00040 from driver_base.msg import SensorLevels
00041 from dynamic_reconfigure.parameter_generator_catkin import *
00042
00043 def add_others(gen):
00044 enum_register_set = gen.enum([
00045 gen.const("PrimaryRegisterSet", int_t, 0, "The primary register set is always used."),
00046 gen.const("AlternateRegisterSet", int_t, 1, "The alternate register set is always used."),
00047 gen.const("Auto", int_t, 2, "The trigger signal selects which register set to use.")],
00048 "Some wge100 cameras have two register sets. You can chose either set, or have the trigger signal select one of the sets. The camera images will go to camera or camera_alternate depending on which register set is active.")
00049
00050
00051
00052 gen.add("frame_id", str_t, SensorLevels.RECONFIGURE_RUNNING, "Sets the TF frame from which the camera is publishing.", "")
00053 gen.add("register_set", int_t, SensorLevels.RECONFIGURE_CLOSE, "Select the register set to work with. In auto mode, an extra pulse on the trigger signal indicates that the alternate set should be used.", 0, 0, 3, enum_register_set)
00054
00055 gen.add("width", int_t, SensorLevels.RECONFIGURE_CLOSE, "Number of pixels horizontally.", 640, 1, 752)
00056 gen.add("height", int_t, SensorLevels.RECONFIGURE_CLOSE, "Number of pixels vertically.", 480, 1, 480)
00057 gen.add("horizontal_binning", int_t, SensorLevels.RECONFIGURE_CLOSE, "Number of pixels to bin together horizontally.", 1, 1, 4)
00058 gen.add("vertical_binning", int_t, SensorLevels.RECONFIGURE_CLOSE, "Number of pixels to bin together vertically.", 1, 1, 4)
00059 gen.add("x_offset", int_t, SensorLevels.RECONFIGURE_CLOSE, "Horizontal offset between the center of the image and the center of the imager in pixels.", 0, 0, 752)
00060 gen.add("y_offset", int_t, SensorLevels.RECONFIGURE_CLOSE, "Vertical offset between the center of the image and the center of the imager in pixels.", 0, 0, 480)
00061 gen.add("mirror_x", bool_t, SensorLevels.RECONFIGURE_CLOSE, "Mirrors the image left to right.", False)
00062 gen.add("mirror_y", bool_t, SensorLevels.RECONFIGURE_CLOSE, "Mirrors the image top to bottom.", False)
00063 gen.add("rotate_180", bool_t, SensorLevels.RECONFIGURE_CLOSE, "Rotates the image 180 degrees. Acts in addition to the mirorr parameters", False)
00064
00065 gen.add("imager_rate", double_t, SensorLevels.RECONFIGURE_CLOSE, "Sets the frame rate of the imager. In externally triggered mode this must be more than trig_rate", 30, 1, 100)
00066 gen.add("ext_trig", bool_t, SensorLevels.RECONFIGURE_CLOSE, "Set camera to trigger from the external trigger input.", False)
00067 gen.add("rising_edge_trig", bool_t, SensorLevels.RECONFIGURE_CLOSE, "Indicates that the camera should trigger on rising edges (as opposed to falling edges).", True)
00068 gen.add("trig_timestamp_topic", str_t, SensorLevels.RECONFIGURE_CLOSE, "Sets the topic from which an externally trigged camera receives its trigger timestamps.", "")
00069 gen.add("trig_rate", double_t, SensorLevels.RECONFIGURE_CLOSE, "Sets the expected triggering rate in externally triggered mode.", 30, 1, 100)
00070 gen.add("first_packet_offset", double_t, SensorLevels.RECONFIGURE_RUNNING, "Offset between the end of exposure and the minimal arrival time for the first frame packet. Only used when using internal triggering.", 0.0025, 0, .02)
00071
00072 gen.add("brightness", int_t, SensorLevels.RECONFIGURE_CLOSE, "The camera brightness for automatic gain/exposure.", 58, 1, 64)
00073 gen.add("auto_black_level", bool_t, SensorLevels.RECONFIGURE_CLOSE, "Enables the automatic black-level detection.", False)
00074 gen.add("black_level_filter_length", int_t, SensorLevels.RECONFIGURE_CLOSE, "Base 2 logarithm of the number of frames the black-level algorithm should average over.", 4, 0, 7)
00075 gen.add("black_level_step_size", int_t, SensorLevels.RECONFIGURE_CLOSE, "Maximum per-frame change in the auto black-level.", 2, 0, 31)
00076 gen.add("black_level", int_t, SensorLevels.RECONFIGURE_CLOSE, "Sets the black level.", 0, -127, 127)
00077 gen.add("max_exposure", double_t, SensorLevels.RECONFIGURE_CLOSE, "Maximum exposure time in seconds in automatic exposure mode. Zero for automatic.", 0, 0, .1)
00078
00079 gen.add("auto_exposure", bool_t, SensorLevels.RECONFIGURE_CLOSE, "Sets the camera exposure duration to automatic. Causes the exposure setting to be ignored.", True)
00080 gen.add("exposure", double_t, SensorLevels.RECONFIGURE_CLOSE, "Maximum camera exposure time in seconds. The valid range depends on the video mode.", 0.01, 0, 0.1)
00081 gen.add("auto_gain", bool_t, SensorLevels.RECONFIGURE_CLOSE, "Sets the analog gain to automatic. Causes the gain setting to be ignored.", True)
00082 gen.add("gain", int_t, SensorLevels.RECONFIGURE_CLOSE, "The camera analog gain.", 32, 16, 127)
00083 gen.add("companding", bool_t, SensorLevels.RECONFIGURE_CLOSE, "Turns on companding (a non-linear intensity scaling to improve sensitivity in dark areas).", True)
00084
00085 gen.add("auto_exposure_alternate", bool_t, SensorLevels.RECONFIGURE_CLOSE, "Sets the alternate camera exposure duration to automatic. Causes the exposure_alternate setting to be ignored.", True)
00086 gen.add("exposure_alternate", double_t, SensorLevels.RECONFIGURE_CLOSE, "Alternate camera exposure in seconds. The valid range depends on the video mode.", 0.01, 0, .1)
00087 gen.add("auto_gain_alternate", bool_t, SensorLevels.RECONFIGURE_CLOSE, "Sets the alternate analog gain to automatic. Causes the gain_alternate setting to be ignored.", True)
00088 gen.add("gain_alternate", int_t, SensorLevels.RECONFIGURE_CLOSE, "The alternate camera analog gain.", 32, 16, 127)
00089 gen.add("companding_alternate", bool_t, SensorLevels.RECONFIGURE_CLOSE, "Turns on companding for the alternate imager register set.", True)
00090 gen.add("test_pattern", bool_t, SensorLevels.RECONFIGURE_CLOSE, "Turns on the camera's test pattern.", False)
00091 gen.add("packet_debug", bool_t, SensorLevels.RECONFIGURE_RUNNING, "Enable debug mode for dropped packets in diagnostics", False)