.. _pilot.RoadSegment: pilot.RoadSegment ================= .. cpp:namespace:: pilot::RoadSegment Class ----- `RoadSegment` represents a connection in the :ref:`RoadMap` from one :ref:`pilot.MapNode` to another. Inherits from :ref:`pilot.MapElement`. Fields ------ .. cpp:member:: int from_node :ref:`pilot.MapNode` ``id`` from where the segment begins. .. cpp:member:: int to_node :ref:`pilot.MapNode` ``id`` to where the segment goes. .. cpp:member:: char direction = 0 -1 = one way backwards, 0 = two way, 1 = one way forwards .. cpp:member:: drive_mode_e drive_mode = RELAXED_PATH_FOLLOW Drive mode to be used on this segment, see :ref:`pilot.drive_mode_e`. .. cpp:member:: orientation_mode_e orientation_mode = RELATIVE_ROAD Orientation mode to be used on this segment, see :ref:`pilot.orientation_mode_e`. .. cpp:member:: float_param_t tolerance Lateral tolerance in [meters], how much the path can be modified while driving (to avoid obstacles, etc). See :ref:`pilot.float_param_t`. .. cpp:member:: float_param_t orientation Orientation to drive at on this segment in [radians]. Actual orientation depends on `orientation_mode`. See :ref:`pilot.float_param_t`. .. cpp:member:: float_param_t orientation_tolerance Maximum deviation allowed from the target orientation on this segment in [radians]. See :ref:`pilot.float_param_t`. .. cpp:member:: float_param_t max_velocity Maximum velocity allowed on this segment in [m/s]. See :ref:`pilot.float_param_t`. .. cpp:member:: float_param_t max_yawrate Maximum yawrate allowed on this segment in [rad/s]. See :ref:`pilot.float_param_t`. .. cpp:member:: set drive_flags A set of drive flags for this segment, see :ref:`pilot.drive_flags_e`.