66// All rights reserved.
77// /////////////////////////////////////////////////////////////////////////////
88
9- #ifndef SIMPLE_MPC_FOOTTRAJ_HPP_
10- #define SIMPLE_MPC_FOOTTRAJ_HPP_
9+ #pragma once
1110
1211#include " simple-mpc/fwd.hpp"
1312#include < ndcurves/fwd.h>
@@ -19,14 +18,11 @@ namespace simple_mpc
1918 * @brief Foot trajectory generation
2019 */
2120
22- typedef Eigen::Vector3d point3_t ;
23- typedef ndcurves::bezier_curve<float , double , false , point3_t > curve_translation;
24- typedef ndcurves::piecewise_curve<float , double , false , point3_t > piecewise_curve;
21+ using point3_t = Eigen::Vector3d;
22+ using piecewise_curve = ndcurves::piecewise_curve<float , double , false , point3_t >;
2523
2624 class FootTrajectory
2725 {
28- /* *
29- */
3026 protected:
3127 std::map<std::string, point3_t > initial_poses_;
3228 std::map<std::string, point3_t > final_poses_;
@@ -38,18 +34,21 @@ namespace simple_mpc
3834 size_t T_;
3935
4036 public:
41- FootTrajectory () {};
42- virtual ~FootTrajectory () {};
37+ explicit FootTrajectory () {};
4338 FootTrajectory (
4439 const std::map<std::string, point3_t > & initial_poses, double swing_apex, int T_fly, int T_contact, size_t T);
40+ virtual ~FootTrajectory () {};
4541
4642 void updateApex (double swing_apex)
4743 {
4844 swing_apex_ = swing_apex;
4945 }
46+
5047 piecewise_curve defineTranslationBezier (const point3_t & trans_init, const point3_t & trans_final);
48+
5149 std::vector<point3_t > createTrajectory (
5250 int time_to_land, point3_t & initial_trans, point3_t & final_trans, piecewise_curve trajectory_swing);
51+
5352 void updateTrajectory (
5453 bool update,
5554 int landing_time,
@@ -63,9 +62,3 @@ namespace simple_mpc
6362 };
6463
6564} // namespace simple_mpc
66-
67- /* --- Details -------------------------------------------------------------- */
68- /* --- Details -------------------------------------------------------------- */
69- /* --- Details -------------------------------------------------------------- */
70-
71- #endif // SIMPLE_MPC_HPP_
0 commit comments