# -------------------------------------------------------------------
#  Config file for the "rawlog-grabber" application
# Read more online: 
# http://www.mrpt.org/list-of-mrpt-apps/application-rawlog-grabber/
# -------------------------------------------------------------------

#  Each section [XXXXX] (but [global]) setups a thread in the RawLogGrabber 
#   standalone application. Each thread collects data from some
#   sensor or device, then the main thread groups and orders them before
#   streaming everything to a rawlog file.
#
#  The name of the sections can be arbitrary and independent of the sensor label. 
#   The driver for each sensor is actually determined by the field "driver", which must
#   match the name of some class in mrpt::hwdrivers implementing CGenericSensor.


# =======================================================
#  Section: Global settings to the application
#   
# =======================================================
[global]
# The prefix can contain a relative or absolute path.
# The final name will be <PREFIX>_date_time.rawlog
rawlog_prefix		= dataset

# Milliseconds between thread launches
time_between_launches	= 800

use_sensoryframes	= 0

GRABBER_PERIOD_MS	= 1000

# =======================================================
#  SENSOR: CameraFlyCap
#   
# =======================================================
[CameraFlyCap]
driver			= CCameraSensor
process_rate	= 80	// Hz

sensorLabel		= CAMERA1

grabber_type	    = flycap 
preview_decimation  = 1

# For externaly stored images, the format of image files (default=jpg)
#external_images_format = jpg

# For externaly stored images: whether to spawn an independent process to save the image files.
external_images_own_thread  = true

# If external_images_own_thread=1, this changes the number of threads to launch
#  to save image files. The default is determined from mrpt::system::getNumberOfProcessors()
#  and should be OK unless you want to save processor time for other things.
#external_images_own_thread_count = 2    // >=1

# (Only when external_images_format=jpg): Optional parameter to set the JPEG compression quality:
#external_images_jpeg_quality = 95    // [1-100]. Default: 95

pose_x			= 0  // position on the robot (meters)
pose_y			= 0
pose_z			= 0
pose_yaw		= 0	// Angles in degrees
pose_pitch		= 0
pose_roll		= 0

# -------- FlyCapture specific parameters ------------------------
# See docs for : mrpt::hwdrivers::TCaptureOptions_FlyCapture2
# ----------------------------------------------------------------
# Camera selection:
flycap_camera_index = 0      // (Default=0) If open_by_guid==false, will open the i-th camera based on this 0-based index.
flycap_open_by_guid = false  // (Default=false) Set to true to force opening a camera by its GUID, in \a camera_guid
#flycap_camera_guid  = 11223344-55667788-99AABBCC-DDEEFF00  // GUID of the camera to open, only when open_by_guid==true. Hexadecimal blocks separated by dashes ("-")

# Camera settings:
flycap_videomode   = VIDEOMODE_1280x960RGB // (Default="", which means default) A string with a video mode, from the list available in [FlyCapture2::VideoMode](http://www.ptgrey.com/support/downloads/documents/flycapture/Doxygen/html/), eg. "VIDEOMODE_640x480Y8", etc.
flycap_framerate   = FRAMERATE_30        // (Default="", which means default) A string with a framerate, from the list available in [FlyCapture2::FrameRate](http://www.ptgrey.com/support/downloads/documents/flycapture/Doxygen/html/), eg. "FRAMERATE_30", etc.
flycap_grabmode    = BUFFER_FRAMES       // (Default="BUFFER_FRAMES") A string with a grab mode, from the list available in [FlyCapture2::GrabMode](http://www.ptgrey.com/support/downloads/documents/flycapture/Doxygen/html/)
flycap_numBuffers  = 30                  // (Default=30) Number of images that can be stored in the buffer, if enabled with grabMode.
flycap_grabTimeout = 5000                // (Default=5000) Time in milliseconds that RetrieveBuffer() and WaitForBufferEvent() will wait for an image before timing out and returning. 
flycap_trigger_enabled = false // (default=false) Enable non-free-running mode, only capturing when a given input trigger signal is detected. Refer to PGR docs.
#flycap_trigger_polarity = 0      // (default=0) Refer to PGR docs.
#flycap_trigger_source   = 0      // (default=0) Refer to PGR docs.
#flycap_trigger_mode     = 0      // (default=0) Refer to PGR docs.
flycap_strobe_enabled   = false // (default=false) Enable the generation of a strobe signal in GPIO. Refer to PGR docs.
#flycap_strobe_source    = 1     // (default=0)  Refer to PGR docs.
#flycap_strobe_polarity  = 0     // (default=0)  Refer to PGR docs.
#flycap_strobe_delay     = 0.0   // (default=0.0) Delay in ms. Refer to PGR docs.
#flycap_strobe_duration  = 1.0   // (default=1.0) Pulse durationin ms. Refer to PGR docs.

#flycap_autoexposure_auto 	= true // (default=true)
#flycap_autoexposure_abs 	= true // (default=true) Numeric mode (absolute or integer values)
#flycap_autoexposure_onoff	= true // (default=true) Activate this feature
#flycap_autoexposure_EV		= 0.0  // (default=0.0) Exposure Value, if autoexposure_auto=false
#flycap_shutter_auto	        = true// (default=true)
#flycap_shutter_abs		= true // (default=true) Numeric mode (absolute or integer values)
#flycap_shutter_time_ms  	= 4.0  // (default=4.0) Shutter time, if shutter_auto=false
#flycap_gain_auto		= true // (default=true)
#flycap_gain_abs		= true // (default=true) Numeric mode (absolute or integer values)
#flycap_gain_dB			= 0.0  // (default=0.0) Sensor gain, if gain_auto=false

flycap_stereo_mode	= 1	// (default=0) Obtain images as stereo pairs with Flycapture2
flycap_get_rectified	= 1	// (default=0) Rectify stereo images (needs Triclops installed)
flycap_rect_width	= 320	// (default=640) Width for output rectified images
flycap_rect_height	= 240	// (default=480) Height for output rectified images

