def _state_check(self):
        """
        Check States and filter to update info
        """
        result_1 = self.engine.physics_world.static_world.contactTest(self.chassis.node(), True)
        result_2 = self.engine.physics_world.dynamic_world.contactTest(self.chassis.node(), True)
        contacts = set()
        for contact in result_1.getContacts() + result_2.getContacts():
            node0 = contact.getNode0()
            node1 = contact.getNode1()
            node = node0 if node1.getName() == MetaDriveType.VEHICLE else node1
            name = node.getName()
            if name == MetaDriveType.LINE_SOLID_SINGLE_WHITE:
                self.on_white_continuous_line = True
            elif name == MetaDriveType.LINE_SOLID_SINGLE_YELLOW:
                self.on_yellow_continuous_line = True
            elif name == MetaDriveType.CROSSWALK:
                self.on_crosswalk = True
            elif name == MetaDriveType.LINE_BROKEN_SINGLE_YELLOW or name == MetaDriveType.LINE_BROKEN_SINGLE_WHITE:
                self.on_broken_line = True
            elif name == MetaDriveType.TRAFFIC_LIGHT:
                light = get_object_from_node(node)
                if light.status == MetaDriveType.LIGHT_GREEN:
                    raise ValueError("Green light should not be in the contact test!")
                    self.green_light = True
                elif light.status == MetaDriveType.LIGHT_RED:
                    self.red_light = True
                elif light.status == MetaDriveType.LIGHT_YELLOW:
                    self.yellow_light = True
                elif light.status == MetaDriveType.LIGHT_UNKNOWN:
                    # unknown didn't add
                    continue
                else:
                    raise ValueError("Unknown light status: {}".format(light.status))
                name = light.status
            # they work with the function in collision_callback.py to double-check the collision
            elif name == MetaDriveType.VEHICLE:
                self.crash_vehicle = True
            elif name == MetaDriveType.BUILDING:
                self.crash_building = True
            elif MetaDriveType.is_traffic_object(name):
                self.crash_object = True
            elif name in [MetaDriveType.PEDESTRIAN, MetaDriveType.CYCLIST]:
                self.crash_human = True
            else:
                # didn't add
                continue
            contacts.add(name)
        # side walk detect
        res = rect_region_detection(
            self.engine,
            self.position,
            np.rad2deg(self.heading_theta),
            self.LENGTH,
            self.WIDTH,
            CollisionGroup.Sidewalk,
            in_static_world=False  # Sidewalk will be hosted in the dynamic_world. So here we set to False.
        )
        if res.hasHit() and res.getNode().getName() == MetaDriveType.BOUNDARY_LINE:
            self.crash_sidewalk = True
            contacts.add(MetaDriveType.BOUNDARY_LINE)

        elif res.hasHit() and res.getNode().getName() == MetaDriveType.BOUNDARY_SIDEWALK:
            self.crash_sidewalk = True
            contacts.add(MetaDriveType.BOUNDARY_SIDEWALK)

        elif res.hasHit() and res.getNode().getName() == MetaDriveType.GUARDRAIL:
            self.crash_sidewalk = True
            contacts.add(MetaDriveType.GUARDRAIL)

        # elif res.hasHit():
        #     print("Unclassified collision: ", res.getNode().getName())

        # only for visualization detection
        if self.render:
            debug_static_world = self.engine.global_config["debug_static_world"] and self.engine.global_config["debug"]
            res = rect_region_detection(
                self.engine,
                self.position,
                np.rad2deg(self.heading_theta),
                self.LENGTH,
                self.WIDTH,
                CollisionGroup.LaneSurface,
                in_static_world=not debug_static_world
            )
            if not res.hasHit():
                contacts.add(MetaDriveType.GROUND)
            else:
                if MetaDriveType.is_lane(res.getNode().getName()):
                    contacts.add(res.getNode().getName())
                else:
                    contacts.add(MetaDriveType.GROUND)

        self.contact_results.update(contacts)

        Check States and filter to update info
        
metadrive/component/vehicle/base_vehicle.py