# ------------------------------------------------------------------------------------------
# Example configuration file for MRPT 2.5 Reactive Navigation engine.
# See C++ documentation: http://reference.mrpt.org/svn/classmrpt_1_1nav_1_1_c_reactive_navigation_system3_d.html
# This .ini file is missing information about the equipped sensors and the Short-Term memory
# For more detailed information, please see the App "ReactiveNav3D-Demo" within MRPT
# ------------------------------------------------------------------------------------------

[ROBOT_CONFIG]
Name = MyRobot	#Optional

#Indicate the geometry of the robot as a set of prisms.
#Format - (LEVELX_HEIGHT, LEVELX_VECTORX, LEVELX_VECTORY)

#Number of height levels used to model the robot
HEIGHT_LEVELS = 2

#Geometrical description of each level
LEVEL1_HEIGHT = 0.6
LEVEL1_VECTORX = 0.3 0.3 -0.3 -0.3
LEVEL1_VECTORY = -0.3 0.3 0.3 -0.3

LEVEL2_HEIGHT = 0.4
LEVEL2_VECTORX = 0.05 0.05 -0.05 -0.05
LEVEL2_VECTORY = -0.1 0.1 0.1 -0.1


# ----------------------------------------------------
#	Parameters for navigation
# ----------------------------------------------------
[NAVIGATION_CONFIG]
# 0: Virtual Force Field (VFF)
# 1: Nearness Diagram (ND)
HOLONOMIC_METHOD = 1

weights = 0.5 0.05 0.5 2.0 0.2 0.1
# 1: Free space
# 2: Dist. in sectors			
# 3: Heading toward target
# 4: Closer to target (euclidean)
# 5: Hysteresis
# 6: Security Distance

DIST_TO_TARGET_FOR_SENDING_EVENT = 0.5	# Minimum. distance to target for sending the end event. Set to 0 to send it just on navigation end

VMAX_MPS = 0.70			# Translational speed limit (m/s)
WMAX_DEGPS = 60			# Rotational speed limit (deg/s) 
ROBOTMODEL_DELAY = 0	# un-used param, must be present for compat. with old mrpt versions 
ROBOTMODEL_TAU = 0		# un-used param, must be present for compat. with old mrpt versions
MAX_DISTANCE_PTG = 2	# Marks the maximum distance regarded by the reactive navigator (m)
GRID_RESOLUTION = 0.02 	# Resolutions used to build the collision_grid (m)
SPEEDFILTER_TAU = 0.1	# The 'TAU' time constant of a 1st order lowpass filter for speed commands (s)  

# PTGs: See classes derived from mrpt::nav::CParameterizedTrajectoryGenerator ( http://reference.mrpt.org/svn/classmrpt_1_1nav_1_1_c_parameterized_trajectory_generator.html)# refer to papers for details.
#------------------------------------------------------------------------------
# Types:
# 1 - Circular arcs \n"
# 2 - alpha - A, Trajectories with asymptotical heading
# 3 - C|C,S, R = vmax/wmax, Trajectories to move backward and then forward
# 4 - C|C,s, like PTG 3, but if t > threshold -> v = w = 0
# 5 - CS, Trajectories with a minimum turning radius
# 6 - alpha - SP, Trajectories built upon a spiral segment

PTG_COUNT      = 3

PTG0_Type      = 1
PTG0_nAlfas    = 121
PTG0_v_max_mps = 1.0
PTG0_w_max_gps = 60
PTG0_K         = 1.0

PTG1_Type        = 2
PTG1_nAlfas      = 121
PTG1_v_max_mps   = 1.0
PTG1_w_max_gps   = 60
PTG1_cte_a0v_deg = 57
PTG1_cte_a0w_deg = 57

PTG2_Type      = 1
PTG2_nAlfas    = 121
PTG2_v_max_mps = 1.0
PTG2_w_max_gps = 60
PTG2_K         = -1.0


#	Parameters for the "Nearness diagram" Holonomic method
# --------------------------------------------------------
[ND_CONFIG]
factorWeights = 1.0 2.0 0.5 1.0
# 1: Free space
# 2: Dist. in sectors
# 3: Closer to target (euclidean)
# 4: Hysteresis
WIDE_GAP_SIZE_PERCENT            = 0.25
MAX_SECTOR_DIST_FOR_D2_PERCENT   = 0.25
RISK_EVALUATION_SECTORS_PERCENT  = 0.25
RISK_EVALUATION_DISTANCE         = 0.7  # In normalized ps-meters [0,1]
TARGET_SLOW_APPROACHING_DISTANCE = 0.8	# For stop gradually
TOO_CLOSE_OBSTACLE               = 0.03 # In normalized ps-meters

#	Parameters for the "VFF" Holonomic method
# ----------------------------------------------------
[VFF_CONFIG]
# Used to decrease speed gradually when the target is going to be reached
TARGET_SLOW_APPROACHING_DISTANCE = 0.8	
# Use it to control the relative weight of the target respect to the obstacles
TARGET_ATTRACTIVE_FORCE = 7.5


