- Move existing OndselSolver, GNN ML layer, and tooling into GNN/ directory for integration in later phases - Add Create addon scaffold: package.xml, Init.py - Add expression DAG with eval, symbolic diff, simplification - Add parameter table with fixed/free variable tracking - Add quaternion rotation as polynomial Expr trees - Add RigidBody entity (7 DOF: position + unit quaternion) - Add constraint classes: Coincident, DistancePointPoint, Fixed - Add Newton-Raphson solver with symbolic Jacobian + numpy lstsq - Add pre-solve passes: substitution + single-equation - Add DOF counting via Jacobian SVD rank - Add KindredSolver IKCSolver bridge for kcsolve integration - Add 82 unit tests covering all modules Registers as 'kindred' solver via kcsolve.register_solver() when loaded by Create's addon_loader.
104 lines
2.5 KiB
C++
104 lines
2.5 KiB
C++
/***************************************************************************
|
|
* Copyright (c) 2023 Ondsel, Inc. *
|
|
* *
|
|
* This file is part of OndselSolver. *
|
|
* *
|
|
* See LICENSE file for details about copyright. *
|
|
***************************************************************************/
|
|
|
|
#include "ConstVelConstraintIJ.h"
|
|
#include "DirectionCosineIecJec.h"
|
|
#include "ConstVelConstraintIqcJqc.h"
|
|
#include "EndFrameqc.h"
|
|
|
|
using namespace MbD;
|
|
|
|
ConstVelConstraintIJ::ConstVelConstraintIJ(EndFrmsptr frmi, EndFrmsptr frmj) : ConstraintIJ(frmi, frmj)
|
|
{
|
|
}
|
|
|
|
std::shared_ptr<ConstVelConstraintIJ> MbD::ConstVelConstraintIJ::With(EndFrmsptr frmi, EndFrmsptr frmj)
|
|
{
|
|
assert(frmi->isEndFrameqc());
|
|
assert(frmj->isEndFrameqc());
|
|
auto constVelCon = std::make_shared<ConstVelConstraintIqcJqc>(frmi, frmj);
|
|
constVelCon->initA01IeJe();
|
|
constVelCon->initA10IeJe();
|
|
return constVelCon;
|
|
}
|
|
|
|
void ConstVelConstraintIJ::calcPostDynCorrectorIteration()
|
|
{
|
|
aG = aA01IeJe->aAijIeJe + aA10IeJe->aAijIeJe - aConstant;
|
|
}
|
|
|
|
void MbD::ConstVelConstraintIJ::initA01IeJe()
|
|
{
|
|
throw SimulationStoppingError("To be implemented.");
|
|
}
|
|
|
|
void MbD::ConstVelConstraintIJ::initA10IeJe()
|
|
{
|
|
throw SimulationStoppingError("To be implemented.");
|
|
}
|
|
|
|
void ConstVelConstraintIJ::initialize()
|
|
{
|
|
this->initA01IeJe();
|
|
this->initA10IeJe();
|
|
}
|
|
|
|
void ConstVelConstraintIJ::initializeGlobally()
|
|
{
|
|
aA01IeJe->initializeGlobally();
|
|
aA10IeJe->initializeGlobally();
|
|
}
|
|
|
|
void ConstVelConstraintIJ::initializeLocally()
|
|
{
|
|
aA01IeJe->initializeLocally();
|
|
aA10IeJe->initializeLocally();
|
|
}
|
|
|
|
void ConstVelConstraintIJ::postInput()
|
|
{
|
|
aA01IeJe->postInput();
|
|
aA10IeJe->postInput();
|
|
ConstraintIJ::postInput();
|
|
}
|
|
|
|
void ConstVelConstraintIJ::postPosICIteration()
|
|
{
|
|
aA01IeJe->postPosICIteration();
|
|
aA10IeJe->postPosICIteration();
|
|
ConstraintIJ::postPosICIteration();
|
|
}
|
|
|
|
void ConstVelConstraintIJ::preAccIC()
|
|
{
|
|
aA01IeJe->preAccIC();
|
|
aA10IeJe->preAccIC();
|
|
ConstraintIJ::preAccIC();
|
|
}
|
|
|
|
void ConstVelConstraintIJ::prePosIC()
|
|
{
|
|
aA01IeJe->prePosIC();
|
|
aA10IeJe->prePosIC();
|
|
ConstraintIJ::prePosIC();
|
|
}
|
|
|
|
void ConstVelConstraintIJ::preVelIC()
|
|
{
|
|
aA01IeJe->preVelIC();
|
|
aA10IeJe->preVelIC();
|
|
ConstraintIJ::preVelIC();
|
|
}
|
|
|
|
void ConstVelConstraintIJ::simUpdateAll()
|
|
{
|
|
aA01IeJe->simUpdateAll();
|
|
aA10IeJe->simUpdateAll();
|
|
ConstraintIJ::simUpdateAll();
|
|
}
|