Simulation in ProjectChrono
Simulation scenario
Simulation
- class rostok.simulation_chrono.simulation.EnvCreator(object_list: List[Tuple[ChronoEasyShapeObject, bool]] = [])
Setup environment for robot simulation.
Add external all objects to the simulation.
- add_object(obj: ChronoEasyShapeObject, read_data: bool = False, is_fixed=False, force_torque_controller: ForceChronoWrapper | None = None)
“ Add an object to the environment
- Args:
obj (ChronoEasyShapeObject): object description and chrono body read_data (bool): define if we add a body to env_sensor is_fixed (bool): define if the object is fixed
- build_data_storage(max_number_of_steps) None
Initialize Sensor for environment and data stores for robot and environment
- Args:
max_number_of_steps (int): maximum number of steps in the simulation
Simulation utils
- class rostok.simulation_chrono.simulation_utils.SimulationResult(time: float = 0, time_vector: ~typing.List[float] = <factory>, robot_final_ds: ~rostok.virtual_experiment.sensors.DataStorage | None = None, environment_final_ds: ~rostok.virtual_experiment.sensors.DataStorage | None = None, event_container: ~typing.List[~rostok.criterion.simulation_flags.SimulationSingleEvent] = <factory>)
Data class to aggregate the output of the simulation.
- Attributes:
time (float): the total simulation time time_vector (List[float]): the vector of time steps n_steps (int): the maximum possible number of steps robot_final_ds (Optional[DataStorage]): final data store of the robot environment_final_ds (Optional[DataStorage]): final data store of the environment