TinyURDF 1.0.0
A Modern C++ Library for Parsing and Visualizing URDF Model Files
Loading...
Searching...
No Matches
model.h
Go to the documentation of this file.
1#ifndef TINYURDF_MODEL_H
2#define TINYURDF_MODEL_H
3
4// Copyright 2025 Wissem CHIHA
5
6#include <string>
7
8#include <loguru/loguru.hpp>
9
10#include "object_base.h"
11#include "property_base.h"
12#include "utils.h"
13#include "joint.h"
14#include "link.h"
15
23class Model : public ObjectBase{
24public:
25 Model();
26 Model(const Model& rhs);
27 void clear() override;
28 void setName(const std::string& n);
29 std::string getName() const;
30 bool isA(const char* name) override;
31 void print(std::ostream& os) override;
32 const char* getTypename() override;
33 bool empty() const override;
34 void setLink(std::shared_ptr<Link> link);
35 void setLink(std::vector<std::shared_ptr<Link>> link);
36 void setJoint(std::vector<std::shared_ptr<Joint>> joint);
37 void setJoint(std::shared_ptr<Joint> joint);
38 void setJoint(std::shared_ptr<Joint> joint, const std::string& parent, const std::string& child);
39 std::vector<std::shared_ptr<Joint>> getJoints() const;
40 std::vector<std::shared_ptr<Link>> getLinks() const;
41 ~Model();
42private:
43 std::string name;
44 std::vector<std::shared_ptr<Joint>> joints;
45 std::vector<std::shared_ptr<Link>> links;
46};
47#endif // TINYURDF_MODEL_H_
base class for representing a multi-body system
Definition model.h:23
void setJoint(std::vector< std::shared_ptr< Joint > > joint)
Definition model.cc:71
void print(std::ostream &os) override
Definition model.cc:37
std::vector< std::shared_ptr< Joint > > getJoints() const
Definition model.cc:90
bool isA(const char *name) override
Definition model.cc:32
const char * getTypename() override
Definition model.cc:51
void setLink(std::shared_ptr< Link > link)
Definition model.cc:61
void setName(const std::string &n)
Definition model.cc:22
~Model()
Definition model.cc:100
std::vector< std::shared_ptr< Link > > getLinks() const
Definition model.cc:95
std::string getName() const
Definition model.cc:27
bool empty() const override
Definition model.cc:56
void clear() override
Definition model.cc:15
Model()
Definition model.cc:3
Definition object_base.h:11