logic_point.cc 1.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
/******************************************************************************
 * Copyright 2017 The Apollo Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *****************************************************************************/

/**
* @file logic_point.cpp
* @brief logic point
*/

#include "modules/planning/common/logic_point.h"

/**
 * @namespace apollo::planning
 * @brief apollo::planning
 */
namespace apollo {
namespace planning {

D
Dong Li 已提交
31 32
LogicPoint::LogicPoint(const double x, const double y, const double s,
                       const double heading, const double kappa,
33 34 35 36 37 38
                       const double dkappa)
    : ::apollo::common::math::Vec2d(x, y),
      _s(s),
      _heading(heading),
      _kappa(kappa),
      _dkappa(dkappa),
D
Dong Li 已提交
39
      _lane_id("") {}
40

D
Dong Li 已提交
41
double LogicPoint::s() const { return _s; }
42

D
Dong Li 已提交
43
double LogicPoint::heading() const { return _heading; }
44

D
Dong Li 已提交
45
double LogicPoint::kappa() const { return _kappa; }
46

D
Dong Li 已提交
47
double LogicPoint::dkappa() const { return _dkappa; }
48

D
Dong Li 已提交
49
void LogicPoint::set_lane_id(const std::string &lane_id) { _lane_id = lane_id; }
50

D
Dong Li 已提交
51
const std::string &LogicPoint::lane_id() const { return _lane_id; }
52

D
Dong Li 已提交
53 54
}  // namespace planning
}  // namespace apollo