Parameter & Key Constants - Bigfire3/waymo GitHub Wiki
Nodes can be configured via ROS2 parameters or internal constants:
lane_detection_node
- See code for detailed parameter descriptions (
block_size
,c_value
,min_thickness
,max_thickness
,center_factor
, ROI parameters). center_factor
: Crucial for scaling the lane offset into a steering command (Default:0.03
). Tuning this affects lane following smoothness and ability to take curves.
obstacle_detection_node
distance_to_stop
: Minimum frontal distance to trigger stop (Default:0.25
m).angle_range_min
/max
: Defines the frontal detection cone (Defaults correspond to approx. +/- 11.5°).
passing_obstacle_node
- Uses internal constants defined at the top of the file:
LINEAR_SPEED
,ANGULAR_SPEED
: Speeds during the maneuver.SIDEWAYS_DISTANCE
: Target lateral distance for lane change.SIDE_SCAN_ANGLE_MIN_DEG
,SIDE_SCAN_ANGLE_MAX_DEG
: Angular range for checking if the obstacle is passed (Note: Current values might reflect left side based on user testing environment).SIDE_SCAN_CLEAR_DISTANCE
: Distance threshold to consider the side clear.WAIT_DURATION_BEFORE_CHECK
: Pause duration before starting the side check.
traffic_light_detection_node
(SpecificColorDetector)
- Uses internal, hardcoded values for detection (see code):
HSV Color Range
: Currently targets dark pink/magenta ([160, 50, 50] to [180, 255, 255]). Should be made ROS parameters for flexibility.min_blob_area
: Minimum area in pixels for a detected color blob to be considered valid (Currently: 100). Should be made a ROS parameter.ROI
: Image cropping factor (Currently: Top 50%). Should be made a ROS parameter.show_debug_windows
: Boolean flag in code to enable/disable OpenCV debug windows (Default:False
).
sign_detection_node
publish_template_matching
(Boolean, Default:True
): Enables/disables publishing the debug image for template matching.publish_binary_sign
(Boolean, Default:True
): Enables/disables publishing the debug image of the binarized frame used for detection.- Internal: Templates are loaded from
share/waymo/traffic_signs/ *.png
. Thesetup.py
ensures these are installed.
parking_node
- Uses internal, hardcoded constants defined at the top of the
parking_node.py
file for maneuver parameters:PARKING_LINEAR_SPEED
: Uniform linear speed for most forward movements.MANEUVER_ANGULAR_SPEED_TURN
: Angular speed for turns.MAX_ANGULAR_Z_LANE_FOLLOW
: Maximum angular velocity when using lane offset for guidance.- Laser Scan Parameters for Spot Detection:
INITIAL_SCAN_ANGLE_MIN/MAX_DEG
: Angular range for the first laser check (after visual sign).INITIAL_SPOT_DETECTION_DISTANCE
: Distance threshold for the first laser check.SPOT_SCAN_ANGLE_MIN/MAX_DEG
: Angular range for checking if a parking spot is clear.PARKING_SPOT_CLEAR_DISTANCE
: Distance threshold to consider a parking spot clear.
- Durations and Distances:
INITIAL_STOP_DURATION
: How long to wait after initial laser detection.DRIVE_TO_FIRST_SPOT_DURATION
: Time to drive to the first potential parking spot.DRIVE_TO_NEXT_SPOT_DURATION
: Time to drive to subsequent potential parking spots.STOP_BEFORE_SCAN_DURATION
: Brief stop before performing the detailed spot scan.PARKING_DURATION
: How long to wait once parked.MOVE_SPOT_DISTANCE
: Distance to move into/out of the parking spot.
- Turn Control:
TURN_ANGLE_90_DEG
: Target angle for 90-degree turns (can be slightly adjusted).GOAL_TOLERANCE_ANGLE_RAD
: Tolerance for completing a turn.
MAX_PARKING_ATTEMPTS
: How many parking spots to try before aborting.
state_manager_node
drivingspeed
: Base driving speed duringFOLLOW_LANE
(Default:0.15
m/s).- (Internal)
control_loop_period
: Timer frequency for control loop (Default: 0.005s -> 200 Hz).