35 const std::vector<mc_rbdyn::RobotModule> & robotModules()
const;
38 std::vector<rbd::MultiBody> & mbs();
40 const std::vector<rbd::MultiBody> & mbs()
const;
43 std::vector<rbd::MultiBodyConfig> & mbcs();
45 const std::vector<rbd::MultiBodyConfig> & mbcs()
const;
48 bool hasRobot(
const std::string & name)
const;
57 unsigned int robotIndex()
const;
59 unsigned int envIndex()
const;
61 unsigned int robotIndex(
const std::string & name)
const;
89 return load(module.
name, module, params);
96 void load(
const std::vector<std::shared_ptr<RobotModule>> & modules);
102 void rename(
const std::string & oldName,
const std::string & newName);
114 Robot & loadFromUrdf(
const std::string & name,
115 const std::string & urdf,
116 const rbd::parsers::ParserParameters & parser_params = {},
117 const LoadRobotParameters & load_params = {});
119 void robotCopy(
const Robot & robot,
const std::string & copyName);
121 void removeRobot(
const std::string & name);
123 void removeRobot(
unsigned int idx);
128 const RobotModule & robotModule(
size_t idx)
const;
131 const Robot & robot()
const;
134 const Robot & env()
const;
136 Robot & robot(
size_t idx);
137 const Robot & robot(
size_t idx)
const;
139 Robot & robot(
const std::string & name);
140 const Robot & robot(
const std::string & name)
const;
148 iterator begin() noexcept;
149 const_iterator begin() const noexcept;
150 const_iterator cbegin() const noexcept;
152 iterator end() noexcept;
153 const_iterator end() const noexcept;
154 const_iterator cend() const noexcept;
156 reverse_iterator rbegin() noexcept;
157 const_reverse_iterator rbegin() const noexcept;
158 const_reverse_iterator crbegin() const noexcept;
160 reverse_iterator rend() noexcept;
161 const_reverse_iterator rend() const noexcept;
162 const_reverse_iterator crend() const noexcept;
170 size_type size() const noexcept;
178 void reserve(size_type new_cap);
186 assert(idx < robots_.size());
187 return *robots_[idx];
196 assert(idx < robots_.size());
197 return *robots_[idx];
206 assert(idx < robots_.size());
207 return *robots_.at(idx);
216 assert(idx < robots_.size());
217 return *robots_.at(idx);
224 template<
class Deleter>
252 std::vector<rbd::MultiBody>
mbs_;
253 std::vector<rbd::MultiBodyConfig>
mbcs_;
254 std::vector<rbd::MultiBodyGraph>
mbgs_;
257 void updateIndexes();
265 const RobotModule & module,
266 const LoadRobotParameters & params = {});
273 const std::string & urdf,
274 const rbd::parsers::ParserParameters & parser_params = {},
275 const LoadRobotParameters & load_params = {});