NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
msg_traj.h
Go to the documentation of this file.
1 /* Copyright (c) 2017, United States Government, as represented by the
2  * Administrator of the National Aeronautics and Space Administration.
3  *
4  * All rights reserved.
5  *
6  * The Astrobee platform is licensed under the Apache License, Version 2.0
7  * (the "License"); you may not use this file except in compliance with the
8  * License. You may obtain a copy of 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
16  * under the License.
17  */
18 
19 #ifndef TRAJ_OPT_BASIC_MSG_TRAJ_H_
20 #define TRAJ_OPT_BASIC_MSG_TRAJ_H_
21 
25 #include <vector>
26 
27 namespace traj_opt {
28 class MsgTrajectory : public Trajectory {
29  public:
30  explicit MsgTrajectory(const TrajData &traj);
31 
32  bool evaluate(decimal_t t, uint derr, VecD &out) const override;
33  decimal_t getTotalTime() const override;
34  decimal_t getCost() override;
35  TrajData serialize() override;
36 
37  protected:
39  std::vector<std::vector<boost::shared_ptr<Poly>>> polyies_;
40  std::vector<std::vector<std::vector<boost::shared_ptr<Poly>>>> derrives_;
41  uint num_secs_;
42  std::vector<decimal_t> dts;
43  uint deg_;
44 };
45 } // namespace traj_opt
46 #endif // TRAJ_OPT_BASIC_MSG_TRAJ_H_
traj_opt::MsgTrajectory
Definition: msg_traj.h:28
traj_opt::MsgTrajectory::num_secs_
uint num_secs_
Definition: msg_traj.h:41
trajectory.h
traj_opt::Trajectory
Definition: trajectory.h:35
traj_opt::MsgTrajectory::polyies_
std::vector< std::vector< boost::shared_ptr< Poly > > > polyies_
Definition: msg_traj.h:39
traj_data.h
traj_opt::TrajData
Definition: traj_data.h:61
traj_opt::decimal_t
double decimal_t
Definition: types.h:35
traj_opt::MsgTrajectory::derrives_
std::vector< std::vector< std::vector< boost::shared_ptr< Poly > > > > derrives_
Definition: msg_traj.h:40
traj_opt
Definition: msg_traj.h:27
traj_opt::MsgTrajectory::serialize
TrajData serialize() override
Definition: msg_traj.cpp:119
traj_opt::MsgTrajectory::traj_
TrajData traj_
Definition: msg_traj.h:38
traj_opt::MsgTrajectory::evaluate
bool evaluate(decimal_t t, uint derr, VecD &out) const override
Definition: msg_traj.cpp:67
traj_opt::MsgTrajectory::deg_
uint deg_
Definition: msg_traj.h:43
traj_opt::MsgTrajectory::getCost
decimal_t getCost() override
Definition: msg_traj.cpp:120
traj_opt::MsgTrajectory::MsgTrajectory
MsgTrajectory(const TrajData &traj)
Definition: msg_traj.cpp:24
traj_opt::MsgTrajectory::getTotalTime
decimal_t getTotalTime() const override
Definition: msg_traj.cpp:113
traj_opt::VecD
Eigen::Matrix< decimal_t, Eigen::Dynamic, 1 > VecD
Definition: types.h:49
traj_opt::MsgTrajectory::dts
std::vector< decimal_t > dts
Definition: msg_traj.h:42
polynomial_basis.h