STEPS:
0. Install Homebrew
1. Install ' Docker for Mac 18.03+ ', configure CPUs (n Cpus,bazel open n thread compilation), memory (>2g, compile min memory, 4G recommended), Swap (>2g, recommended 2G )
2 . Git clone ... Apollo ...
3. Enter the Apollo catalogue, pull Docker image for Apollo (first run will pull 5G images)
./docker/scripts/dev_start.sh
* Note that the dev_start.sh here need to be modified to fit the Docker for Mac feature and need to be changed to manually configure Port mappings:
Replace
--net host \
With Bellow, both 8887 and 8888 works.
-p 8887:8887 -p 8888:8888 \
4. Enter the Apollo container by using
./docker/scripts/dev_into.sh
5. the Docker for Mac implementation is based on lightweight virtual machine technology, and the network and file systems are well-shared.
The/apollo folder in container directly maps the working folders in the host./apollo
6. compiling
./apollo.sh Build
(OR)
./apollo.sh build_no_perception DBG
The compilation may be interrupted because the MacBook 13 "is poorly performing or the network is not good (a small file may be downloaded in the compilation).
Reboot Docker after direct exit, empty container, restart Apollo container enter and then compile
Bazel will automatically skip the compiled project.
The entire compilation process will probably be ~1h, requiring about 10G of hard disk space.
7. Run after successful compilation
./scripts/bootstrap.sh
Start
[Email protected]_dev_docker:/apollo$./scripts/bootstrap.sh
Started Supervisord with Dev conf
Start Roscore ...
voice_detector:started
dreamview:started
Dreamview is running at http://localhost:8888
8. Open the Chrome input address on the host Mac localhost:8888
Enter the Dreamview front-end Interface
From the dropdown box selet "Navigation" mode.
9. Replay Demo Rosbag
To see if the system works, use the demo ' bag ' which feeds the system.
Download Demo DataSet Demo_2.5.bag (~ approx. 3G)
# get rosbag note that the command download is requiredpython ./docs/demo_guide/rosbag_helper.py demo_2.5.bag
运行演示数据集 demo_2.5.bag
# You can now replay this demo "bag" in a loop with the ‘-l‘ flagrosbag play -l demo_2.5.bag
Dreamview should show a running vehicle now.
Comments:
1. Docker for Mac support is good, Mac can be used as code writing and compiling environment, simulation demo
2. Entire compilation run space, approximately 50G +,mac ssd!,macbook 13 "long compilation Time
Macbook Pro "Compile Apollo 2.5