guardstrikelab / carla_apollo_bridge

This project aims to provide a data and control bridge for the communication between the latest version of Apollo and Carla.
Apache License 2.0
336 stars 98 forks source link

How can I generate the local_map to launch msf_localization #187

Open wqklihbf opened 7 months ago

wqklihbf commented 7 months ago

Note: If you have a general support question and are looking for a quicker response, please checkout our discord channel for answers from the community: https://bbs.carla.org.cn/ask

In what area(s)?

/area runtime

/area operator

/area placement

/area docs

/area test-and-release

Ask your question here

  1. I first modify the file: apollo/modules/dreamview/conf/hmi_modes/mkz_standard_debug.pb.txt to launch rtk_localization
  2. I launch 5 modules, including Control, Localization, Prediction, Planning, Routing.
  3. I set the start and end points, click "Send Route Request," and then launch the Record module to get some record files.
  4. I use the msf_simple_map_creator.sh script to generate the local_map. The command is that: bash /apollo/scripts/msf_simple_map_creator.sh /apollo/record_file/0324/ /apollo/modules/localization/msf/params/velodyne_params/velodyne64_novatel_extrinsics_example.yaml 31 /apollo/records/mymap
  5. But I meet the error: 2024-03-24 18-06-43 的屏幕截图
  6. I get the folder local_map. I put it in the /apollo/modules/map/data/carla_town01/ file directory. But When I launch the msf_lcoalization, it shows like this: 2024-03-15 19-19-59 的屏幕截图 I want to know how to generate the local_map to launch msf_localization.
hliu-work commented 7 months ago

I have the same problem! +1

wqklihbf commented 7 months ago

I have the same problem! +1

Hi, I try to modify this part of the code(modules/localization/msf/local_pyramid_map/base_map/base_map_node.cc: Save()):

  FILE* file = fopen(path.c_str(), "wb");
  if (file) {
    bool success = CreateBinary(file);
    fclose(file);
    is_changed_ = false;
    return success;
  } else {
    AERROR << "Can't write to file: " << path << ".";
    return false;
  }

to 2024-04-11 21-54-47 的屏幕截图 Then some changes occurred: 2024-04-11 21-04-25 的屏幕截图 Unfortunately, this is abnormal. If you have any solutions, please let me know. Thanks, I've been troubled for a long time. Looking forward to your reply.