MVSim
Lightweight simulator for 2.5D vehicles and robots
DefaultFriction.h
1 /*+-------------------------------------------------------------------------+
2  | MultiVehicle simulator (libmvsim) |
3  | |
4  | Copyright (C) 2014-2026 Jose Luis Blanco Claraco |
5  | Copyright (C) 2017 Borys Tymchenko (Odessa Polytechnic University) |
6  | Distributed under 3-clause BSD License |
7  | See COPYING |
8  +-------------------------------------------------------------------------+ */
9 
10 #pragma once
11 
12 #include <box2d/b2_friction_joint.h>
13 #include <mvsim/FrictionModels/FrictionBase.h>
14 #include <mvsim/TParameterDefinitions.h>
15 
16 namespace mvsim
17 {
23 {
24  DECLARES_REGISTER_FRICTION(DefaultFriction)
25  public:
26  DefaultFriction(VehicleBase& my_vehicle, const rapidxml::xml_node<char>* node);
27 
28  // See docs in base class.
29  virtual mrpt::math::TVector2D evaluate_friction(
30  const FrictionBase::TFrictionInput& input) const override;
31 
32  private:
33  double mu_ = 0.8;
34  double C_damping_ = 0.01;
35  double C_rr_ = 0.0;
36 
37  public:
38  const TParameterDefinitions params_ = {
39  {"mu", {"%lf", &mu_}}, {"C_damping", {"%lf", &C_damping_}}, {"C_rr", {"%lf", &C_rr_}}};
40 };
41 } // namespace mvsim
Definition: DefaultFriction.h:23
virtual mrpt::math::TVector2D evaluate_friction(const FrictionBase::TFrictionInput &input) const override
Definition: FrictionBase.h:29
Definition: VehicleBase.h:44
Definition: FrictionBase.h:41