Stop simulation flag

Base flags

class FlagStopSimualtions

class rostok.criterion.flags_simualtions.FlagStopSimualtions

Abstract class for stopping flags

build(chrono_system: ChSystem, in_robot: Robot, obj: ChBody)

Build flag on the chrono system, robot and object

Parameters:
  • chrono_system (chrono.ChSystem) – chrono system to build

  • in_robot (robot.Robot) – robot to build

  • obj (chrono.ChBody) – object to build

get_flag_state()

Getter flag state

Returns:

Current state of flag

Return type:

bool

class FlagMaxTime

class rostok.criterion.flags_simualtions.FlagMaxTime(max_time_simulation)

Flag to stop simulation in case of maximum time

Parameters:

max_time_simulation (float) – Max seconds simulation

get_flag_state()

Getter flag state

Returns:

Current state of flag

Return type:

bool

Flags by contact

class FlagWithContact

class rostok.criterion.flags_simualtions.FlagWithContact

Abstract class of stop flag simulation base on contact with bodies

get_flag_state()

Getter flag state

Returns:

Current state of flag

Return type:

bool

is_contact()

Check state of contact bodies

Returns:

True when contact is exsist

Return type:

bool

class FlagSlipout

class rostok.criterion.flags_simualtions.FlagSlipout(time_to_contact: float = 3.0, time_without_contact: float = 0.2)

Class stop flag chrono simulation when an object slips out

Parameters:
  • time_to_contact (float) – Max time from start simulation to contact. Defaults to 3..

  • time_without_contact (float) – Max time without contact. Defaults to 0.2.

get_flag_state()

Getter flag state

Returns:

Current state of flag

Return type:

bool

class FlagNotContact

class rostok.criterion.flags_simualtions.FlagNotContact(time_to_contact: float = 3.0)

Flag to stop chrono-modeling when the maximum time without contact from start is reached

Parameters:

time_to_contact (float) – Max time without contact. Defaults to 3..

get_flag_state()

Getter flag state

Returns:

Current state of flag

Return type:

bool