Localization Module Cannot Start
Hi,
I am using apollo_2.5.0 version without an nVidia GPU on Linux. However, when I try starting the localization module by command:bash scripts/localization.sh or supervisorctl start localization, I just found the localization module will stop automatically before it enters into the RegisterLocalizationMethods(); function. To solve the problem, I changed the default MSF localization method to RTK localization method by modifing the localization_config.pb.txt, and then the localization module can work normally.
But I still want to know how we can run the localization module with the MSF localization module since currently it even cannot finish its initialization. Thank you for your help!
Try to launch msf localization with --noenable_lidar_localization option first and check whether you can pass the init stage.
Hi @jilinzhou , following your advice, I changed
--enable_lidar_localization=true , which is in the localization.conf, to --enable_lidar_localization=false, then tried starting the localization module again. However, it still cannot pass the init stage.
To debug it, the easiest way is to start each module from the command line one after the other and trace the log messages. Specifically for your issue, the only modules you need before launching the localization node are:
- roscore
- canbus
- gnss ros drivers
After all these nodes are successfully launched, you can launch the localization module. From the log messages, you can then figure out which function it hangs or returns unexpected error.
Hi developers, to be more specific about my problem, actually I am trying to launch the MSF localization module to do some simulations, so I am not doing experiments with some real cars. Instead, I am just replaying the demo bag and want to see how the localization module works.
Here is the commands I use when I try to launch the localization module.
./apollo.sh build_no_perception dbg
bash scripts/bootstrap.sh
supervisorctl start localization
The localization module will soon automatically stop and restart, again and again.
Then I look at the log file created by localization module. By adding some log cmd in the source code, I have found that the module has finished its initilization, but it seems like the module is stopped around the function:
localization_ =
localization_factory_.CreateObject(config_.localization_type()); (localization.cc)
I am so confused since with RTK localization method, the module works well, but once I set the type to be MSF, it will never work. I will be really appreciated if someone can give me some help :)