traffic_light_map_based_detector#

一、收发topic#

  1. 该节点订阅topic

    • “input/vector_map” - HD map

    • “input/camera_info” -相机内参等,用于初始化针孔摄像机模型以及后面生成camera pose

    • “input/route” -规划路线,如果有就只判断这个路线上的红绿灯,若无就判断所有的红绿灯

  2. 该节点发出去的topic

    • “output/rois” -红绿灯的roi

    • “debug/markers” -用于debug的图片

二、参数#

  • 只有vibration参数,用于计算从map到camera的tf,以及roi

三、回调函数#

  • 1. “input/vector_map” - MapBasedDetector::mapCallback

    1. 用输入的input_msg,创建一个新的Lanelet地图(lanelet_mapptr)。

    2. 使用fromBinMsg函数从输入消息中解析出地图数据,并将其存储在lanelet_map_ptr_中。

    3. 查询地图中的所有车道(lanelets)和交通灯(traffic lights)。

    4. 所有找到的车道和交通灯都被存储在all_lanelets和all_lanelet_traffic_lights中。

    5. 对于找到的每个交通灯,检查每个交通灯是否是线段(LineString)。如果不是,那么将跳过并继续检查下一个交通灯。

  • 2. “input/camera_info” - MapBasedDetector::cameraInfoCallback

    1. get transform from map frame to camera frame。

    2. visible_traffic_lights : for each traffic light in map check if in range and in view angle of camera

    3. Get the ROI from the lanelet and the intrinsic matrix of camera to determine where it appears in image.

  • 3. “input/route” - MapBasedDetector::routeCallback

    1. 检查是否接收到地图(lanelet_mapptr)。如果没有接收到地图,将发出一个警告并返回。

    2. 从输入消息的各个段和原语中提取出路线车道(route_lanelets)。

    3. 对于每个段中的每个原语,它尝试从地图中获取对应的车道。如果找不到对应的原语,将发出一个错误并返回。

    4. 查询出路线车道中的所有交通灯(route_lanelet_traffic_lights)。

    5. 对于每个交通灯,检查其是否为LineString类型(isLineString())。如果不是,将跳过并继续下一个交通灯。

    6. 对于每个是LineString类型的交通灯,将这个交通灯加入到路线交通灯集合(route_traffic_lightsptr)中。

四、问题#

  1. vibration这个参数怎么确定