ORCA: Optimization-based framework for Robotic Control Applications
Contact.h
Go to the documentation of this file.
1 //| This file is a part of the ORCA framework.
2 //|
3 //| Copyright 2018, Fuzzy Logic Robotics
4 //| Copyright 2017, ISIR / Universite Pierre et Marie Curie (UPMC)
5 //|
6 //| Main contributor(s): Antoine Hoarau, Ryan Lober, and
7 //| Fuzzy Logic Robotics <info@fuzzylogicrobotics.com>
8 //|
9 //| ORCA is a whole-body reactive controller framework for robotics.
10 //|
11 //| This software is governed by the CeCILL-C license under French law and
12 //| abiding by the rules of distribution of free software. You can use,
13 //| modify and/ or redistribute the software under the terms of the CeCILL-C
14 //| license as circulated by CEA, CNRS and INRIA at the following URL
15 //| "http://www.cecill.info".
16 //|
17 //| As a counterpart to the access to the source code and rights to copy,
18 //| modify and redistribute granted by the license, users are provided only
19 //| with a limited warranty and the software's author, the holder of the
20 //| economic rights, and the successive licensors have only limited
21 //| liability.
22 //|
23 //| In this respect, the user's attention is drawn to the risks associated
24 //| with loading, using, modifying and/or developing or reproducing the
25 //| software by the user in light of its specific status of free software,
26 //| that may mean that it is complicated to manipulate, and that also
27 //| therefore means that it is reserved for developers and experienced
28 //| professionals having in-depth computer knowledge. Users are therefore
29 //| encouraged to load and test the software's suitability as regards their
30 //| requirements in conditions enabling the security of their systems and/or
31 //| data to be ensured and, more generally, to use and operate it in the
32 //| same conditions as regards security.
33 //|
34 //| The fact that you are presently reading this means that you have had
35 //| knowledge of the CeCILL-C license and that you accept its terms.
36 
37 
38 #pragma once
39 
42 
43 namespace orca
44 {
45 namespace constraint
46 {
47 
48 class Contact : public common::TaskBase
49 {
50 
51 public:
52  Contact(const std::string& name);
53 
54  void setBaseFrame(const std::string& base_ref_frame);
55 
56  void setControlFrame(const std::string& control_frame);
57 
58  const std::string& getBaseFrame() const;
59 
60  const std::string& getControlFrame() const;
61 
62  void setCurrentWrenchValue(const Eigen::Matrix<double,6,1>& current_wrench_from_ft_sensor);
63 
64  double getFrictionCoeff() const;
65 
66  double getMargin() const;
67 
68  void setAngleOffset(double angle_offset);
69 
70  void setFrictionCoeff(double coeff);
71 
72  void setMargin(double margin);
73 
74  void setConeOrientation(const Eigen::Matrix3d& R);
75 
76  const Eigen::Matrix3d& getConeOrientation() const;
77 
78  void setNumberOfFaces(int nfaces);
79 
80 protected:
81  void onCompute(double current_time, double dt){}
82  void onResize(){}
83 private:
84  std::shared_ptr<LinearizedCoulombConstraint> friction_cone_;
85  std::shared_ptr<ContactExistenceConditionConstraint> ex_condition_;
86 };
87 
88 } // namespace constraint
89 } // namespace orca
void onCompute(double current_time, double dt)
Definition: Contact.h:81
const Eigen::Matrix3d & getConeOrientation() const
Definition: Contact.cc:58
void setNumberOfFaces(int nfaces)
Definition: Contact.cc:63
Definition: Contact.h:48
double getFrictionCoeff() const
Definition: Contact.cc:28
void setMargin(double margin)
Definition: Contact.cc:48
const std::string & getControlFrame() const
Definition: Contact.cc:23
void setBaseFrame(const std::string &base_ref_frame)
Definition: Contact.cc:68
double getMargin() const
Definition: Contact.cc:33
void setCurrentWrenchValue(const Eigen::Matrix< double, 6, 1 > &current_wrench_from_ft_sensor)
Definition: Contact.cc:81
void onResize()
Definition: Contact.h:82
Contact(const std::string &name)
Definition: Contact.cc:8
void setAngleOffset(double angle_offset)
Definition: Contact.cc:38
Definition: CartesianAccelerationPID.h:44
void setConeOrientation(const Eigen::Matrix3d &R)
Definition: Contact.cc:53
void setFrictionCoeff(double coeff)
Definition: Contact.cc:43
void setControlFrame(const std::string &control_frame)
Definition: Contact.cc:74
The common base class for tasks and constraints.
Definition: TaskBase.h:59
const std::string & getBaseFrame() const
Definition: Contact.cc:18