GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: include/tsid/formulations/contact-level.hpp Lines: 0 1 0.0 %
Date: 2021-09-10 01:23:06 Branches: 0 0 - %

Line Branch Exec Source
1
//
2
// Copyright (c) 2021 University of Trento
3
//
4
// This file is part of tsid
5
// tsid is free software: you can redistribute it
6
// and/or modify it under the terms of the GNU Lesser General Public
7
// License as published by the Free Software Foundation, either version
8
// 3 of the License, or (at your option) any later version.
9
// tsid is distributed in the hope that it will be
10
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
11
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
// General Lesser Public License for more details. You should have
13
// received a copy of the GNU Lesser General Public License along with
14
// tsid If not, see
15
// <http://www.gnu.org/licenses/>.
16
//
17
18
#ifndef __tsid_contact_level_hpp__
19
#define __tsid_contact_level_hpp__
20
21
#include "tsid/math/fwd.hpp"
22
#include "tsid/contacts/contact-base.hpp"
23
24
namespace tsid
25
{
26
27
  /** Data structure collecting information regarding a single contact.
28
   * In particular, this structure contains the index of the force corresponding
29
   * to this contact in the force vector used as decision variable in the QP.
30
   * Moreover it contains all the default constraints associated to a contact for representing
31
   * the motion constraints (contact points do not move), the friction cone constraints
32
   * and the force regularization cost.
33
   */
34
  struct ContactLevel
35
  {
36
    EIGEN_MAKE_ALIGNED_OPERATOR_NEW
37
38
    contacts::ContactBase & contact;
39
    std::shared_ptr<math::ConstraintBase> motionConstraint;
40
    std::shared_ptr<math::ConstraintInequality> forceConstraint;
41
    std::shared_ptr<math::ConstraintEquality> forceRegTask;
42
    unsigned int index; /// index of 1st element of associated force variable in the force vector
43
44
    ContactLevel(contacts::ContactBase & contact);
45
  };
46
47
}
48
49
#endif // ifndef __tsid_contact_level_hpp__