MCPcopy Create free account
hub / github.com/dartsim/dart / MjcfParser

Function MjcfParser

python/dartpy/utils/MjcfParser.cpp:44–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42namespace python {
43
44void MjcfParser(py::module& m)
45{
46 auto sm = m.def_submodule("MjcfParser");
47
48 ::py::class_<utils::MjcfParser::Options>(sm, "Options")
49 .def(
50 ::py::init<
51 const common::ResourceRetrieverPtr&,
52 const std::string&,
53 const std::string&>(),
54 ::py::arg("resourceRetretrieverOrNullptrriever") = nullptr,
55 ::py::arg("geomSkeletonNamePrefix") = "__geom_skel__",
56 ::py::arg("siteSkeletonNamePrefix") = "__site_skel__")
57 .def_readwrite("mRetriever", &utils::MjcfParser::Options::mRetriever)
58 .def_readwrite(
59 "mGeomSkeletonNamePrefix",
60 &utils::MjcfParser::Options::mGeomSkeletonNamePrefix)
61 .def_readwrite(
62 "mSiteSkeletonNamePrefix",
63 &utils::MjcfParser::Options::mSiteSkeletonNamePrefix);
64
65 // resource retriever APIs
66 sm.def(
67 "readWorld",
68 &utils::MjcfParser::readWorld,
69 ::py::arg("uri"),
70 ::py::arg("options") = utils::MjcfParser::Options());
71}
72
73} // namespace python
74} // namespace dart

Callers 1

dart_utilsFunction · 0.85

Calls 1

OptionsClass · 0.50

Tested by

no test coverage detected