TinyURDF 1.0.0
Loading...
Searching...
No Matches
model.h
Go to the documentation of this file.
1#ifndef INCLUDE_TINYURDF_CORE_MODEL_H_
2#define INCLUDE_TINYURDF_CORE_MODEL_H_
3
4// Copyright 2025 Wissem CHIHA
5
6#include <loguru/loguru.hpp>
7#include <string>
8#include <vector>
9
10#include "common/object_base.h"
11#include "core/joint.h"
12#include "core/link.h"
13
21class Model final : public ObjectBase
22{
23 public:
24 Model();
25 Model(const Model& rhs);
26 void clear() override;
27 void setName(const std::string& n);
28 std::string getName() const;
29 bool isA(const char* name) const override;
30 std::string toString() const override;
31 const char* getTypename() const override;
32 bool empty() const override;
33 void setLink(std::shared_ptr<Link> link);
34 void setLink(std::vector<std::shared_ptr<Link>> link);
35 void setJoint(std::vector<std::shared_ptr<Joint>> joint);
36 void setJoint(std::shared_ptr<Joint> joint);
37 void setJoint(std::shared_ptr<Joint> joint, const std::string& parent,
38 const std::string& child);
39 std::vector<std::shared_ptr<Joint>> getJoints() const;
40 std::vector<std::shared_ptr<Link>> getLinks() const;
41 std::vector<std::shared_ptr<Material>> getMaterials() const;
42 std::vector<std::string> getMaterialsName() const;
43 ~Model();
44
45 private:
46 std::string name;
47 std::vector<std::shared_ptr<Joint>> joints;
48 std::vector<std::shared_ptr<Link>> links;
49};
50#endif // INCLUDE_TINYURDF_CORE_MODEL_H_
Base class for representing a multi-body system.
Definition model.h:22
void setJoint(std::vector< std::shared_ptr< Joint > > joint)
Definition model.cc:76
const char * getTypename() const override
Definition model.cc:56
std::vector< std::shared_ptr< Joint > > getJoints() const
Definition model.cc:95
std::vector< std::string > getMaterialsName() const
Definition model.cc:132
std::vector< std::shared_ptr< Material > > getMaterials() const
Definition model.cc:105
std::string toString() const override
Definition model.cc:40
void setLink(std::shared_ptr< Link > link)
Definition model.cc:66
void setName(const std::string &n)
Definition model.cc:25
~Model()
Definition model.cc:146
bool isA(const char *name) const override
Definition model.cc:35
std::vector< std::shared_ptr< Link > > getLinks() const
Definition model.cc:100
std::string getName() const
Definition model.cc:30
bool empty() const override
Definition model.cc:61
void clear() override
Definition model.cc:18
Model()
Definition model.cc:6
Definition object_base.h:9