提交 73da289e 编写于 作者: S storypku 提交者: Chang Songhong

Docs: remove deprecated "Debug Dreamview" doc

上级 95f0a4ca
Please refer to the [Apollo Cyber RT FAQ](https://github.com/ApolloAuto/apollo/tree/master/docs/cyber/CyberRT_FAQs.md) under docs/cyber directory.
Please refer to [Apollo CyberRT FAQ](../cyber/CyberRT_FAQs.md) under the
`docs/cyber` directory.
# DreamView FAQs
## I’m having difficulty connecting to localhost:8888 (Dreamview).
## I had difficulty connecting to <http://localhost:8888> (Dreamview Web UI).
The Dreamview web server is provided by the dreamview node(A node is an
executable in ROS concept). Before accessing the Dreamview page, you need to
build the system(including dreamview node) within the docker container following
The Dreamview web server is provided by the dreamview node (A node is an
executable in CyberRT terminology). Before accessing Dreamview Web UI, make sure
Apollo is built within Apollo development Docker container following
[Apollo Software Installation Guide](../quickstart/apollo_software_installation_guide.md).
Once built, dreamview node will be started after the step
Once built, dreamview node will be started by running
`bash scripts/bootstrap.sh`.
So if you can not access Dreamview, please check:
- Make sure you have dreamview process running correctly. In the latest version,
`bash scripts/bootstrap.sh` will report `dreamview: ERROR (spawn error)` if
dreamview fails to start. For early version, please check with command:
`supervisorctl status dreamview` or `ps aux | grep dreamview`. If dreamview is
not running, please refer to
[How to Debug a Dreamview Start Problem](../howto/how_to_debug_dreamview_start_problem.md)
or go to
[Dreamview does not load successfully](#Dreamview-does-not-start-even-though-the-build-is-successful).
- Make sure you have the Dreamview process running correctly. In the latest
version, `bash scripts/bootstrap.sh` will report
`dreamview: ERROR (spawn error)` if dreamview fails to start. You can also
check with command: `ps aux | grep dreamview`.
- Make sure the address and port are not blocked by the firewall.
- Make sure you're using <apollo_host_ip>:8888 instead of localhost:8888 if you
are not accessing the Dreamview page through the host machine.
- Make sure you're using `<apollo_host_ip>:8888` instead of `localhost:8888` if
you are accessing the Dreamview UI through another host.
---
......@@ -40,7 +36,7 @@ To do so,
2. Restart apollo
This way, dreamview can be accessed from http://localhost:<PORT_NUMBER>
(http://localhost:5555 from the example)
(http://localhost:5555 for this example)
---
......@@ -52,7 +48,7 @@ please install them
---
## How to draw anything in DreamView (e.g. an arrow)
## How to draw anything in Dreamview (e.g. an arrow)
Dreamview uses https://github.com/mrdoob/three.js as graphics library. You can
modify the frontend code to draw an arrow using the corresponding API of the
......@@ -112,144 +108,6 @@ each time the sim_control is restarted. ![](images/sim_control_2.0.png)
---
## Dreamview does not start even though the build is successful
There are 2 steps to deducing this issue:
1. Identify if the issue is due to pcl lib through gdb: this can be done by
finding the coredump file under `/apollo/data/core/` with name
**_core_dreamview.\$PID_**. If you see logs like:
```
@in_dev_docker:/apollo$ gdb bazel-bin/modules/dreamview/dreamview data/core/core_dreamview.378
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.3) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from bazel-bin/modules/dreamview/dreamview...done.
warning: exec file is newer than core file.
[New LWP 378]
[New LWP 379]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
warning: the debug information found in "/home/caros/secure_upgrade/depend_lib/libyaml-cpp.so.0.5.1" does not match "/home/caros/secure_upgrade/depend_lib/libyaml-cpp.so.0.5" (CRC mismatch).
Core was generated by `/apollo/bazel-bin/modules/dreamview/dreamview --flagfile=/apollo/modules/dreamv'.
Program terminated with signal SIGILL, Illegal instruction.
#0 0x00007f79ebd32bec in double boost::math::detail::erf_inv_imp<double, boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy> >(double const&, double const&, boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy> const&, mpl_::int_<64> const*) () from /usr/local/lib/libpcl_sample_consensus.so.1.7
(gdb) bt
#0 0x00007f79ebd32bec in double boost::math::detail::erf_inv_imp<double, boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy> >(double const&, double const&, boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy> const&, mpl_::int_<64> const*) () from /usr/local/lib/libpcl_sample_consensus.so.1.7
#1 0x00007f79ebcf7f1e in _GLOBAL__sub_I_sac.cpp () from /usr/local/lib/libpcl_sample_consensus.so.1.7
#2 0x00007f79f3e1a2da in call_init (l=<optimized out>, argc=argc@entry=2, argv=argv@entry=0x7ffc7bc11c78, env=env@entry=0x7ffc7bc11c90) at dl-init.c:78
#3 0x00007f79f3e1a3c3 in call_init (env=<optimized out>, argv=<optimized out>, argc=<optimized out>, l=<optimized out>) at dl-init.c:36
#4 _dl_init (main_map=0x7f79f402e1c8, argc=2, argv=0x7ffc7bc11c78, env=0x7ffc7bc11c90) at dl-init.c:126
#5 0x00007f79f3e0b29a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#6 0x0000000000000002 in ?? ()
#7 0x00007ffc7bc134bd in ?? ()
#8 0x00007ffc7bc134eb in ?? ()
#9 0x0000000000000000 in ?? ()
(gdb) q
@in_dev_docker:/apollo$ addr2line -C -f -e /usr/local/lib/libpcl_sample_consensus.so.1.7.2 0x375bec
double boost::math::detail::erf_inv_imp<double, boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy> >(double const&, double const&, boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy> const&, mpl_::int_<64> const*)
??:?
```
More info:
```
~/playground/apollo$ git rev-parse HEAD
321bc25633fe2115e8ea4b2e68555c8c0d301b41
~/playground/apollo$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
apolloauto/apollo dev-x86_64-20180320_1118 6a23927e28c3 7 days ago 6.92GB
apolloauto/apollo yolo3d_volume-x86_64-latest 562d2b2b5a71 11 days ago 70.6MB
apolloauto/apollo map_volume-sunnyvale_big_loop-latest 80aca30fa08a 3 weeks ago 1.3GB
apolloauto/apollo localization_volume-x86_64-latest be947abaa650 2 months ago 5.74MB
apolloauto/apollo map_volume-sunnyvale_loop-latest 36dc0d1c2551 2 months ago 906MB
build cmd:
in_dev_docker:/apollo$ ./apollo.sh build_no_perception dbg
```
2. Compile pcl and copy the pcl library files to `/usr/local/lib`:
Inside docker:
```
(to keep pcl in host, we save pcl under /apollo)
cd /apollo
git clone https://github.com/PointCloudLibrary/pcl.git
git checkout -b 1.7.2 pcl-1.7.2
```
then hack CMakeLists.txt with :
```
~/playground/apollo/pcl$ git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f0a5600..42c182e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,6 +7,15 @@ endif()
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "possible configurations" FORCE)
+if (CMAKE_VERSION VERSION_LESS "3.1")
+# if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
+ message("Build with c++11 support")
+# endif ()
+else ()
+ set (CMAKE_CXX_STANDARD 11)
+endif ()
+
# In case the user does not setup CMAKE_BUILD_TYPE, assume it's RelWithDebInfo
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "build type default to RelWithDebInfo, set to Release to improve performance" FORCE)
```
Then build with:
```
cd pcl
mkdir build
cd build
cmake ..
(We don't know the parameters that Apollo used, so we keep it by default)
#backup pcl lib
mkdir -p /usr/local/lib/pcl.origin
mv /usr/local/lib/libpcl* /usr/local/lib/pcl.origin
#replace with our build
cp -a lib/* /usr/local/lib/
ldconfig
```
And finally restart Dreamview using
```
bash scripts/bootstrap.sh stop
bash scripts/bootstrap.sh start
```
---
## I want to plot my own graphs for my algorithms, where should I go?
Go to the PnC Monitor section in
......
......@@ -9,30 +9,6 @@ successfully able to use them.
---
## I’m having difficulty connecting to localhost:8888 (Dreamview).
The Dreamview web server is provided by the dreamview node(A node is an
executable in ROS concept). Before accessing the Dreamview page, you need to
build the system(including dreamview node) within the docker container following
the
[Software Installation Guide](../quickstart/apollo_software_installation_guide.md).
Once built, dreamview node will be started after the step
`bash scripts/bootstrap.sh`.
So if you can not access Dreamview, please check:
- Make sure you have dreamview process running correctly. In the latest version,
`bash scripts/bootstrap.sh` will report `dreamview: ERROR (spawn error)` if
dreamview fails to start. For early version, please check with command:
`supervisorctl status dreamview` or `ps aux | grep dreamview`. If dreamview is
not running, please refer to
[How to Debug a Dreamview Start Problem](../howto/how_to_debug_dreamview_start_problem.md).
- Make sure the address and port are not blocked by the firewall.
- Make sure you're using <apollo_host_ip>:8888 instead of localhost:8888 if you
are not accessing the Dreamview page through the host machine.
---
## How can I perform step-by-step debugging?
The majority of bugs can be found through logging (using AERROR, AINFO, ADEBUG).
......@@ -61,15 +37,14 @@ the BUILD files properly and apollo.sh will build your module automatically
## Build error "docker: Error response from daemon: failed to copy files: userspace copy failed":
An error message like this means that your system does not have enough space to
build Apollo and the build process will fail. To resolve this issue, run the
following to free up some space:
build Apollo. To resolve this issue, run the
following command to free up some space on your host:
```
docker/setup_host/cleanup_resources.sh
```
If it does not work, delete the Apollo repo, free up some space and then try
again.
Run `bash apollo.sh clean -a` inside Docker to free more.
---
......
# 软件 FAQ
## 除了 Ubuntu 之外,其他操作系统还能使用吗?
## 除了 Ubuntu 之外,能用其它操作系统吗?
我们只对 Ubuntu 进行了测试,这意味着它是我们目前正式支持的唯一操作系统。欢迎开发
者尝试不同的操作系统,如果能够成功地使用它们,可以分享补丁与社区。
......@@ -10,22 +10,18 @@
Dreamview 网页服务器由 Dreamview 节点提供。在访问 Dreamview 页面之前,您需要按
[Apollo 软件安装指南](../quickstart/apollo_software_installation_guide.md)
译 DOCKER 容器内的系统(包括 Dreamview 节点)。一旦编译成功,Dreamview 节点将在
步骤 "bash scripts/bootstrap.sh" 之后启动。
步骤 `bash scripts/bootstrap.sh`启动。
因此,如果你不能访问 Dreamview,请检查:
- 确保您的 Dreamview 进程正确运行。在最新版本中,如果 Dreamview 无法启动
`bash scripts/bootstrap.sh`会报告`dreamview: ERROR (spawn error)`。对于早期
版本,请使用命令检查:`supervisorctl status dreamview` 或者
`ps aux | grep dreamview`。如果 Dreamview 没有运行,请参
[如何调试 ValueVIEW 启动问题](../howto/how_to_debug_dreamview_start_problem.md)
`bash scripts/bootstrap.sh`会报告`dreamview: ERROR (spawn error)`。或使用命
令检查: `ps aux | grep dreamview`
- 确保地址和端口不被防火墙拦截。
- 如果您没有通过主机访问 Dreamview 页面,确保您使用的是<Apollo_host_ip>:8888 而
不是 localhost:8888
- 如果您是通过其它主机访问 Dreamview 页面,确保您使用的是
`<apollo_host_ip>:8888` 而不是 `localhost:8888`
## 我如何进行分步调试?
大多数 bug 可以通过日志记录找到(使用 AERROR, AINFO, ADEBUG)。如果需要一步一步
的调试,我们建议使用 gdb
## 我如何运行离线可视化感知?
的调试,我们建议使用 GDB.
......@@ -51,7 +51,7 @@ Note:
> The `--loop` option enables record to keep playing in a loop playback mode.
## Open **http://127.0.0.1:8888** in your favorate browser (e.g. Chrome) to access Apollo Dreamview
## Open <http://127.0.0.1:8888> in your favorate browser (e.g. Chrome) to access Apollo Dreamview
The following screen should be shown to you and the car in Dreamview is happy to
move around!
......
......@@ -43,7 +43,7 @@ cyber_recorder play -f docs/demo_guide/demo_3.5.record --loop
选项 `--loop` 用于设置循环回放模式.
## 在浏览器中输入**localhost:8888**访问 Apollo Dreamview
## 在浏览器中输入<http://localhost:8888>访问 Apollo Dreamview
如下图所示: ![](images/dv_trajectory.png) 如果一切正常,现在您应该能看到一辆汽
车在模拟器里移动。
......
......@@ -15,11 +15,9 @@
- [How to migrate to the updated apollo master from previous versions.md](how_to_migrate_to_the_updated_apollo_master_from_old_versions.md)
## Debugging and troubleshooting
- [How to debug dreamview start problem](how_to_debug_dreamview_start_problem.md)
- [How to troubleshoot your ESD CAN device](how_to_troubleshoot_esdcan.md)
### Chinese versions
- [How to debug dreamview start problem](how_to_debug_dreamview_start_problem_cn.md)
- [How to troubleshoot your ESD CAN device](how_to_troubleshoot_esdcan_cn.md)
## Extended modules
......@@ -81,4 +79,4 @@
### Chinese versions
- [How to generate and push images into Docker](how_to_generate_and_push_docker_images_cn.md)
- [How to solve slow pull from cn](how_to_solve_slow_pull_from_cn.md)
- [How to solve slow pull from CN](how_to_solve_slow_pull_from_cn.md)
## How to Debug the Dreamview Start Problem
### Steps to Start Dreamview
If you encounter problems when starting Dreamview in the `docker/scripts/dev` sequence, first check if you are using the correct commands as shown below.
```bash
$ bash docker/scripts/dev_start.sh
$ bash docker/scripts/dev_into.sh
$ bash apollo.sh build
$ bash scripts/bootstrap.sh
```
### Dreamview Fails to Start
If Dreamview fails to start, use the script below to check the Dreamview startup log and restart Dreamview.
```bash
# Start Dreamview in foreground to see any error message it prints out during startup
$ bash scripts/dreamview.sh start_fe
# check dreamview startup log
$ cat data/log/dreamview.out
terminate called after throwing an instance of 'CivetException'
what(): null context when constructing CivetServer. Possible problem binding to port.
$ sudo apt-get install psmisc
# to check if dreamview is running from other terminal
$ sudo lsof -i :8888
# kill other running/pending dreamview
$ sudo fuser -k 8888/tcp
# restart dreamview again
$ bash scripts/dreamview.sh
```
### Debug dreamview with gdb
If you get nothing in dreamview startup logs, you can try to debug dreamview with gdb, use the following commands:
```
$ gdb --args /apollo/bazel-bin/modules/dreamview/dreamview --flagfile=/apollo/modules/dreamview/conf/dreamview.conf
# or
$ source scripts/apollo_base.sh;
$ start_gdb dreamview
```
Once gdb is launched, press `r` and `enter` key to run, if dreamview crashes, then get the backtrace with `bt`.
### CPU does not support FMA/FMA3 instructions
If you see an error `Illegal instruction` and something related with **libpcl_sample_consensus.so.1.7** in gdb backtrace, then you probably need to rebuild pcl lib from source by yourself and replace the one in the docker.
This usually happens when you're trying to run Apollo/dreamview on a machine that the CPU does not support FMA/FMA3 instructions, it will fail because the prebuilt pcl lib shipped with docker image is compiled with FMA/FMA3 support.
There are 2 steps to resolve this issue:
1. Identify if the issue is due to pcl lib through gdb:
find the coredump file under /apollo/data/core/ with name core_dreamview.$PID.
If you see logs like:
```
@in_dev_docker:/apollo$ gdb bazel-bin/modules/dreamview/dreamview data/core/core_dreamview.378
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.3) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from bazel-bin/modules/dreamview/dreamview...done.
warning: exec file is newer than core file.
[New LWP 378]
[New LWP 379]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
warning: the debug information found in "/home/caros/secure_upgrade/depend_lib/libyaml-cpp.so.0.5.1" does not match "/home/caros/secure_upgrade/depend_lib/libyaml-cpp.so.0.5" (CRC mismatch).
Core was generated by `/apollo/bazel-bin/modules/dreamview/dreamview --flagfile=/apollo/modules/dreamv'.
Program terminated with signal SIGILL, Illegal instruction.
#0 0x00007f79ebd32bec in double boost::math::detail::erf_inv_imp<double, boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy> >(double const&, double const&, boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy> const&, mpl_::int_<64> const*) () from /usr/local/lib/libpcl_sample_consensus.so.1.7
(gdb) bt
#0 0x00007f79ebd32bec in double boost::math::detail::erf_inv_imp<double, boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy> >(double const&, double const&, boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy> const&, mpl_::int_<64> const*) () from /usr/local/lib/libpcl_sample_consensus.so.1.7
#1 0x00007f79ebcf7f1e in _GLOBAL__sub_I_sac.cpp () from /usr/local/lib/libpcl_sample_consensus.so.1.7
#2 0x00007f79f3e1a2da in call_init (l=<optimized out>, argc=argc@entry=2, argv=argv@entry=0x7ffc7bc11c78, env=env@entry=0x7ffc7bc11c90) at dl-init.c:78
#3 0x00007f79f3e1a3c3 in call_init (env=<optimized out>, argv=<optimized out>, argc=<optimized out>, l=<optimized out>) at dl-init.c:36
#4 _dl_init (main_map=0x7f79f402e1c8, argc=2, argv=0x7ffc7bc11c78, env=0x7ffc7bc11c90) at dl-init.c:126
#5 0x00007f79f3e0b29a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#6 0x0000000000000002 in ?? ()
#7 0x00007ffc7bc134bd in ?? ()
#8 0x00007ffc7bc134eb in ?? ()
#9 0x0000000000000000 in ?? ()
(gdb) q
@in_dev_docker:/apollo$ addr2line -C -f -e /usr/local/lib/libpcl_sample_consensus.so.1.7.2 0x375bec
double boost::math::detail::erf_inv_imp<double, boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy> >(double const&, double const&, boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::promote_double<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy> const&, mpl_::int_<64> const*)
??:?
```
More info:
```
~/playground/apollo$ git rev-parse HEAD
321bc25633fe2115e8ea4b2e68555c8c0d301b41
~/playground/apollo$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
apolloauto/apollo dev-x86_64-20180320_1118 6a23927e28c3 7 days ago 6.92GB
apolloauto/apollo yolo3d_volume-x86_64-latest 562d2b2b5a71 11 days ago 70.6MB
apolloauto/apollo map_volume-sunnyvale_big_loop-latest 80aca30fa08a 3 weeks ago 1.3GB
apolloauto/apollo localization_volume-x86_64-latest be947abaa650 2 months ago 5.74MB
apolloauto/apollo map_volume-sunnyvale_loop-latest 36dc0d1c2551 2 months ago 906MB
build cmd:
in_dev_docker:/apollo$ ./apollo.sh build_no_perception dbg
```
2. Compile pcl and copy the pcl library files to `/usr/local/lib`:
See [/apollo/WORKSPACE.in](../../WORKSPACE.in) to identify your pcl library version:
- Prior to Apollo 5.0 (inclusive): pcl-1.7
- After Apollo 5.0: pcl-1.9
Inside docker:
```
(to keep pcl in host, we save pcl under /apollo)
cd /apollo
git clone https://github.com/PointCloudLibrary/pcl.git
git checkout -b <your pcl-lib version> pcl-<your pcl-lib version>
Ex: git checkout -b 1.7.2 pcl-1.7.2
git checkout -b 1.9.1 pcl-1.9.1
```
then hack CMakeLists.txt with :
```
~/playground/apollo/pcl$ git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f0a5600..42c182e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,6 +7,15 @@ endif()
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "possible configurations" FORCE)
+if (CMAKE_VERSION VERSION_LESS "3.1")
+# if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
+ message("Build with c++11 support")
+# endif ()
+else ()
+ set (CMAKE_CXX_STANDARD 11)
+endif ()
+
# In case the user does not setup CMAKE_BUILD_TYPE, assume it's RelWithDebInfo
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "build type default to RelWithDebInfo, set to Release to improve performance" FORCE)
```
Then build with:
```
cd pcl
mkdir build
cd build
cmake ..
make
(We don't know the parameters that Apollo used, so we keep it by default)
#backup pcl lib
mkdir -p /usr/local/lib/pcl.origin
mv /usr/local/lib/libpcl* /usr/local/lib/pcl.origin
#replace with our build
cp -a lib/* /usr/local/lib/
ldconfig
```
And finally restart Dreamview using
```
bash scripts/bootstrap.sh stop
bash scripts/bootstrap.sh start
```
### CPU does not support AVX instructions
If CPU does not support AVX instructions, and you gdb the coredump file under /apollo/data/core/ with name core_dreamview.$PID, you may see logs like:
```
Program terminated with signal SIGILL, Illegal instruction.
#0 0x000000000112b70a in std::_Hashtable<std::string, std::string, std::allocator<std::string>, std::__detail::_Identity, std::equal_to<std::string>, google::protobuf::hash<std::string>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, true, true> >::_Hashtable (this=0x3640288, __bucket_hint=10,
__h1=..., __h2=..., __h=..., __eq=..., __exk=..., __a=...)
---Type <return> to continue, or q <return> to quit---
at /usr/include/c++/4.8/bits/hashtable.h:828
828 _M_rehash_policy()
```
To resolve this issue, in apollo/apollo.sh, comment or delete:
```
--copt=-mavx2
```
Then try to build and start dreamview again.
## 如何调试Dreamview启动问题
### Dreamview的启动步骤
如果在`docker / scripts / dev`序列中启动Dreamview时遇到问题,请首先检查是否使用了如下所示的正确命令。
```bash
$ bash docker/scripts/dev_start.sh
$ bash docker/scripts/dev_into.sh
$ cd /apollo
$ bash apollo.sh build
$ bash scripts/dreamview.sh
```
### Dreamview启动失败
如果Dreamview无法启动,请使用下面的脚本检查Dreamview的启动日志并重新启动Dreamview。
```bash
# Start Dreamview in foreground to see any error message it prints out during startup
$ bash scripts/dreamview.sh start_fe
# check dreamview startup log
$ cat data/log/dreamview.out
terminate called after throwing an instance of 'CivetException'
what(): null context when constructing CivetServer. Possible problem binding to port.
$ sudo apt-get install psmisc
# to check if dreamview is running from other terminal
$ sudo lsof -i :8888
# kill other running/pending dreamview
$ sudo fuser -k 8888/tcp
# restart dreamview again
$ bash scripts/dreamview.sh
```
### 用gdb调试
如果dreamview的启动日志中没有任何有效内容,您可以尝试使用gdb调试dreamview,请使用以下命令:
```
$ gdb --args /apollo/bazel-bin/modules/dreamview/dreamview --flagfile=/apollo/modules/dreamview/conf/dreamview.conf
# or
$ source scripts/apollo_base.sh;
$ start_gdb dreamview
```
一旦gdb启动,按下`r``enter`键运行,如果dreamview崩溃,然后用`bt`获得回溯。
如果您在gdb backtrace中看到错误“非法指令”以及与 **libpcl_sample_consensus.so.1.7** 相关的内容,那么您可能需要自己从源代码重建pcl lib并替换docker中的那个。
这通常发生在您尝试在CPU不支持FMA/FMA3指令的机器上运行Apollo/dreamview时,它会失败,因为docker image附带的预构建的pcl lib是使用FMA/ FMA3支持编译的。
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册