Skip to content

raisim::contact::BisectionContactSolver ​

class · #include <raisim/contact/BisectionContactSolver.hpp>

RaiSim's iterative contact solver: a Gauss-Seidel-style sweep over the constraint rows in which each frictional contact is solved with a bisection method. It is owned by the World (World::getContactSolver()); users typically only tune its SolverConfiguration.

Nested classes ​

Constructors & destructor ​

BisectionContactSolver ​

cpp
explicit BisectionContactSolver() = default

Public member functions ​

solve ​

cpp
void solve(ContactProblems &contact)

Solve the constraint rows in place: writes Single3DContactProblem::imp_i and applies the impulses to the objects' velocities.

Parameters

ParameterDescription
contact (in, out)Constraint rows built by the World.

solveWithTendons ​

cpp
void solveWithTendons(ContactProblems &contact, TendonSystem &tendons)

Same as solve() but also solves the rows of a tendon system together with the contacts.

Parameters

ParameterDescription
contact (in, out)Constraint rows built by the World.
tendons (in, out)Tendon system whose rows are solved jointly.

updateConfig ​

cpp
void updateConfig(SolverConfiguration config)

Replace the solver configuration.

Parameters

ParameterDescription
config (in)New configuration.

setTimestep ​

cpp
void setTimestep(double dt)

Set the simulation time step used by the solver.

Parameters

ParameterDescription
dt (in)Time step in seconds.

setOrder ​

cpp
void setOrder(bool order)

Set the sweep direction of the next solve. Each solve flips the direction afterwards; scenes with pin constraints always sweep forward.

Parameters

ParameterDescription
order (in)true: first-to-last row, false: last-to-first.

getOrder ​

cpp
bool getOrder() const

Returns The sweep direction of the next solve (true: forward). See setOrder().

getPinCorrectionRate ​

cpp
double getPinCorrectionRate() const

Returns The rate (1/s) at which pin position errors are corrected: clamp(0.2 * erp, 0, 0.3) / dt.

getLoopCounter ​

cpp
int getLoopCounter() const

Returns The number of iterations performed by the last solve.

getWarmStartComparisons ​

cpp
uint64_t getWarmStartComparisons() const

Returns The number of cached contacts the last warm start compared with current contacts.

getConfig ​

cpp
SolverConfiguration &getConfig()

Returns Mutable reference to the solver configuration.

cpp
const SolverConfiguration &getConfig() const

Returns The solver configuration.

RaiSim — physics for robotics and AI.