I want to print on terminal some information during the execution. Is there any way?
If you only need to debug, the easiest way is use AERROR instead of AINFO
Using AERROR where I can see the information?
How did you start the module?
std::systemcyber_launch start modules/routing/launch/routing.launch
, logs greater than the info level will be output to the console. You can also output the info log level to console use GLOG_alsologtostderr=1, but there will be a lot of logs, I think you may not need most of them. So uses the AERROR will be better for debug.
- If you use
cyber_launch start modules/routing/launch/routing.launch, logs greater than the info level will be output to the console. You can also output the info log level to console useGLOG_alsologtostderr=1, but there will be a lot of logs, I think you may not need most of them. So uses theAERRORwill be better for debug.
https://github.com/ApolloAuto/apollo/blob/eb2761c0fb1100d1a4a457520e7685fcadc85788/cyber/setup.bash#L37-L40
To use this method, how should I compile apollo?
I give these commands:./docker/scripts/dev_start.sh./docker/scripts/dev_into.sh
./apollo.sh build or should I put build_dbg option? ./scripts/cyber_launch.sh start?You can refer to the official documentation to start apollo. doc
Then use cmd like below
cyber_launch start modules/routing/launch/routing.launch
Most helpful comment
How did you start the module?
std::systemhttps://github.com/ApolloAuto/apollo/blob/10bac81cc272dfa2bec13875bb0342848bd933d0/modules/dreamview/backend/hmi/hmi_worker.cc#L126-L134
cyber_launch start modules/routing/launch/routing.launch, logs greater than the info level will be output to the console. You can also output the info log level to console useGLOG_alsologtostderr=1, but there will be a lot of logs, I think you may not need most of them. So uses theAERRORwill be better for debug.https://github.com/ApolloAuto/apollo/blob/eb2761c0fb1100d1a4a457520e7685fcadc85788/cyber/setup.bash#L37-L40