# -------------------------------------------------------------------
#  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	= 100	// Hz

sensorLabel		= CAMERA1

grabber_type	    = flycap_stereo 
preview_decimation  = 1 // 5

# 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
# ----------------------------------------------------------------

# ======= LEFT CAMERA ===========
# Camera selection:
#fcs_LEFT_camera_index = 0      // (Default=0) If open_by_guid==false, will open the i'th camera based on this 0-based index.
fcs_LEFT_open_by_guid = true    // (Default=false) Set to true to force opening a camera by its GUID, in \a camera_guid
fcs_LEFT_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:
fcs_LEFT_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.
fcs_LEFT_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.
fcs_LEFT_grabmode    = DROP_FRAMES // 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/)
fcs_LEFT_numBuffers  = 1                  // (Default=30) Number of images that can be stored in the buffer, if enabled with grabMode.
fcs_LEFT_grabTimeout = 5000                // (Default=5000) Time in milliseconds that RetrieveBuffer() and WaitForBufferEvent() will wait for an image before timing out and returning. 

fcs_LEFT_trigger_enabled = true // (default=false) Enable non-free-running mode, only capturing when a given input trigger signal is detected. Refer to PGR docs.
fcs_LEFT_trigger_polarity = 0      // (default=0) Refer to PGR docs.
fcs_LEFT_trigger_source   = 0      // (default=0) Refer to PGR docs.
fcs_LEFT_trigger_mode     = 0      // (default=0) Refer to PGR docs.

fcs_LEFT_strobe_enabled   = false // (default=false) Enable the generation of a strobe signal in GPIO. Refer to PGR docs.
#fcs_LEFT_strobe_source    = 1     // (default=0)  Refer to PGR docs.
#fcs_LEFT_strobe_polarity  = 0     // (default=0)  Refer to PGR docs.
#fcs_LEFT_strobe_delay     = 0.0   // (default=0.0) Delay in ms. Refer to PGR docs.
#fcs_LEFT_strobe_duration  = 1.0   // (default=1.0) Pulse durationin ms. Refer to PGR docs.

fcs_LEFT_shutter_auto     = false   // (default=true)
fcs_LEFT_shutter_time_ms  = 15.0     // (default=4.0) Shutter time, if shutter_auto=false


# ======= RIGHT CAMERA ===========
# Camera selection:
#fcs_RIGHT_camera_index = 0      // (Default=0) If open_by_guid==false, will open the i'th camera based on this 0-based index.
fcs_RIGHT_open_by_guid = true    // (Default=false) Set to true to force opening a camera by its GUID, in \a camera_guid
fcs_RIGHT_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:
fcs_RIGHT_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.
fcs_RIGHT_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.
fcs_RIGHT_grabmode    = DROP_FRAMES // 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/)
fcs_RIGHT_numBuffers  = 1                  // (Default=30) Number of images that can be stored in the buffer, if enabled with grabMode.
fcs_RIGHT_grabTimeout = 5000                // (Default=5000) Time in milliseconds that RetrieveBuffer() and WaitForBufferEvent() will wait for an image before timing out and returning. 

fcs_RIGHT_trigger_enabled = true // (default=false) Enable non-free-running mode, only capturing when a given input trigger signal is detected. Refer to PGR docs.
#fcs_RIGHT_trigger_polarity = 0      // (default=0) Refer to PGR docs.
fcs_RIGHT_trigger_source   = 0      // (default=0) Refer to PGR docs.
fcs_RIGHT_trigger_mode     = 0      // (default=0) Refer to PGR docs.

fcs_RIGHT_strobe_enabled   = false // (default=false) Enable the generation of a strobe signal in GPIO. Refer to PGR docs.
#fcs_RIGHT_strobe_source    = 1     // (default=0)  Refer to PGR docs.
#fcs_RIGHT_strobe_polarity  = 0     // (default=0)  Refer to PGR docs.
#fcs_RIGHT_strobe_delay     = 0.0   // (default=0.0) Delay in ms. Refer to PGR docs.
#fcs_RIGHT_strobe_duration  = 1.0   // (default=1.0) Pulse durationin ms. Refer to PGR docs.

fcs_RIGHT_shutter_auto     = false   // (default=true)
fcs_RIGHT_shutter_time_ms  = 15.0     // (default=4.0) Shutter time, if shutter_auto=false

