Apollo: Is there any way to see some terminal output while running?

Created on 16 Oct 2020  ·  5Comments  ·  Source: ApolloAuto/apollo

I want to print on terminal some information during the execution. Is there any way?

CarOS

Most helpful comment

How did you start the module?

  1. If you use dreamview, there is no output to console. Because it call std::system
    https://github.com/ApolloAuto/apollo/blob/10bac81cc272dfa2bec13875bb0342848bd933d0/modules/dreamview/backend/hmi/hmi_worker.cc#L126-L134
  1. 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 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.
    https://github.com/ApolloAuto/apollo/blob/eb2761c0fb1100d1a4a457520e7685fcadc85788/cyber/setup.bash#L37-L40

All 5 comments

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?

  1. If you use dreamview, there is no output to console. Because it call std::system
    https://github.com/ApolloAuto/apollo/blob/10bac81cc272dfa2bec13875bb0342848bd933d0/modules/dreamview/backend/hmi/hmi_worker.cc#L126-L134
  1. 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 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.
    https://github.com/ApolloAuto/apollo/blob/eb2761c0fb1100d1a4a457520e7685fcadc85788/cyber/setup.bash#L37-L40
  1. 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 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.
    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:
  2. ./docker/scripts/dev_start.sh
  3. ./docker/scripts/dev_into.sh
  1. ./apollo.sh build or should I put build_dbg option?
  2. At the end ./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
Was this page helpful?
0 / 5 - 0 ratings