Carma-platform v4.2.0
CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication.
SplineI.hpp
Go to the documentation of this file.
1#pragma once
2
3/*
4 * Copyright (C) 2022 LEIDOS.
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
7 * use this file except in compliance with the License. You may obtain a copy of
8 * the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15 * License for the specific language governing permissions and limitations under
16 * the License.
17 */
18
19#include <vector>
20#include <carma_wm/Geometry.hpp>
21
23{
24namespace smoothing
25{
30{
31public:
36 virtual ~SplineI(){};
37
43 virtual void setPoints(const std::vector<lanelet::BasicPoint2d>& points) = 0;
44
52 virtual lanelet::BasicPoint2d operator()(double t) const = 0;
53
61 virtual lanelet::BasicPoint2d first_deriv(double x) const = 0;
62
70 virtual lanelet::BasicPoint2d second_deriv(double x) const = 0;
71};
72}; // namespace smoothing
73}; // namespace inlanecruising_plugin
Interface to a spline interpolator that can be used to smoothly interpolate between points.
Definition: SplineI.hpp:30
virtual lanelet::BasicPoint2d first_deriv(double x) const =0
Get the BasicPoint2d representing the first_deriv along the curve at t-th step.
virtual lanelet::BasicPoint2d operator()(double t) const =0
Get the BasicPoint2d coordinate along the curve at t-th step.
virtual ~SplineI()
Virtual destructor to ensure delete safety for pointers to implementing classes.
Definition: SplineI.hpp:36
virtual void setPoints(const std::vector< lanelet::BasicPoint2d > &points)=0
Set key points which the spline will interpolate between.
virtual lanelet::BasicPoint2d second_deriv(double x) const =0
Get the BasicPoint2d representing the first_deriv along the curve at t-th step.