pyrobopath.toolpath_scheduling.toolpath_collision.event_causes_collision#

pyrobopath.toolpath_scheduling.toolpath_collision.event_causes_collision(event: ContourEvent, agent: Hashable, schedule: MultiAgentToolpathSchedule, agent_models: Dict[Hashable, AgentModel], threshold: float)[source]#

Determines if adding ‘event’ to ‘schedule’ will cause a collision in the resulting trajectory.

The events in schedule from event.start_time() to schedule.end_time() are checked for collision. This is necessary because adding an event at a previous time can cause collisions in the future.

Parameters:
  • event (ContourEvent) – The event to be added (with Event.data = Contour)

  • agent (Hashable) – The agent for the event

  • schedule (MultiAgentToolpathSchedule) – A schedule that is assumed collision-free

  • agent_models (Dict[str, AgentModel]) – Context info about the system

  • threshold (float) – The maximum collision checking step distance (in units equivalent to points in event)

Returns:

True if event causes collision, False else

Return type:

bool