Add mjm_attachBody to the C API.

PiperOrigin-RevId: 617207000
Change-Id: I1fe59ba0d79938a4a383b115997c31dd6c71b8e5
This commit is contained in:
Alessio Quaglino
2024-03-19 09:59:48 -07:00
committed by Copybara-Service
parent 91192393a0
commit cc85a38f3c
9 changed files with 310 additions and 26 deletions
+3
View File
@@ -154,6 +154,7 @@ class mjCModel : public mjCModel_, private mjSpec {
mjCModel();
mjCModel(const mjCModel& other);
mjCModel& operator=(const mjCModel& other);
mjCModel& operator+=(const mjCModel& other);
~mjCModel();
void CopyFromSpec(); // copy spec to private attributes
void PointToLocal();
@@ -202,6 +203,8 @@ class mjCModel : public mjCModel_, private mjSpec {
mjCDef* FindDef(std::string name); // find default class name
mjCDef* AddDef(std::string name, int parentid); // add default class to array
mjCBase* FindObject(mjtObj type, std::string name); // find object given type and name
mjCBody* FindBody(mjCBody* body, std::string name); // find body given name
mjCFrame* FindFrame(mjCBody* body, std::string name); // find frame given name
bool IsNullPose(const mjtNum* pos, const mjtNum* quat); // detect null pose
// accessors