Dear all,
I would like to ask two questions regarding collision checking using commonroad_dc.
-
If I create the collision checker of one scenario and split the target trajectory (ego_vehicle_state_list) into multiple pycrcc.RectOBB as follows:
# create collision checker of the scenario self.collision_checker_scenario = create_collision_checker(self.scenario) self.collision_checker_scenario.add_collision_object(road_boundary_sg_triangles) for i in range(len(ego_vehicle_state_list)): pos1 = ego_vehicle_state_list[i].position[0] pos2 = ego_vehicle_state_list[i].position[1] theta = ego_vehicle_state_list[i].orientation ego = pycrcc.TimeVariantCollisionObject(i) ego.append_obstacle(pycrcc.RectOBB(0.5 * self.length, 0.5 * self.width, theta, pos1, pos2)) # return the collision time if self.collision_checker_scenario.collide(ego): return i*self.dT
Will this consider the dynamic behaviors of the moving vehicles, i.e., the algorithm also checks the different positions of other vehicles in different time steps (not just the collision of the entire trajectory)?
- I would like to use trajectory_queries.trajectories_collision_static_obstacles to check the collision between ego vehicle and static obstacles, not just road boundary. But this function only accepts that static obstacles are the object of commonroad_dc.pycrcc.ShapeGroup(). How could I create a ShapeGroup object? I didn’t find related information in the API documentation.
Thank you so much in advance!
Best regards,
Yuanfei