Biorbd Release_1.13.0
Loading...
Searching...
No Matches
BiorbdModel.cpp
1#define BIORBD_API_EXPORTS
2#include "BiorbdModel.h"
3
4#include <rbdl/Model.h>
5
6#include <rbdl/Kinematics.h>
7
8#include "ModelReader.h"
9#include "RigidBody/ExternalForceSet.h"
10#include "RigidBody/GeneralizedCoordinates.h"
11#include "RigidBody/NodeSegment.h"
12#include "Utils/String.h"
13
14using namespace BIORBD_NAMESPACE;
15
16utils::String getVersion() { return BIORBD_VERSION; }
17
18Model::Model() : m_path(std::make_shared<utils::Path>()) {}
19
21 : m_path(std::make_shared<utils::Path>(path)) {
22 Reader::readModelFile(*m_path, this);
23}
24
25utils::Path Model::path() const { return *m_path; }
26
28 bool useLinearForces,
29 bool useSoftContacts) {
30 return rigidbody::ExternalForceSet(*this, useLinearForces, useSoftContacts);
31}
rigidbody::ExternalForceSet externalForceSet(bool useLinearForces=true, bool useSoftContacts=true)
Get an external forces set designed for the current model.
utils::Path path() const
Returns the path of .bioMod file used to load the model. If no file was used, it remains empty.
Model()
Construct an empty model that can be manually filled.
static Model readModelFile(const utils::Path &path)
Create a biorbd model from a bioMod file.
An External force set that can apply forces to the model while computing the dynamics.
Collection of methods to manipulate path.
Definition Path.h:16
Wrapper around the std::string class with augmented functionality.
Definition String.h:18