-
GPU: GTX-1080 or GTX-1080TI
-
OS: Ubuntu 16.04.7 (https://releases.ubuntu.com/16.04/)
-
Apollo 2.5: https://github.com/ApolloAuto/apollo/tree/r2.5.0
-
Rosbag file: https://github.com/ApolloAuto/apollo/releases/download/v2.5.0/demo_2.5.bag. After downloading, move the file to
apollo/data/bag
-
Install Nvidia driver:
sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt-get update sudo apt-get install nvidia-384
-
Install Cuda-8.0:
- Follow this instruction: https://rodrigodzf.github.io/setup/cuda/2019/04/15/cuda-setup.html
-
Install Docker:
- Follow this instruction: https://docs.docker.com/engine/install/ubuntu/
-
Go to apollo folder. Open file
./docker/script/dev_start.sh
, then adding two lines in commanddocker run -it
-v /usr/src:/usr/src -v /lib/modules:/lib/modules
-
Start and get into the docker with root authority
./docker/scripts/dev_start.sh docker exec -it apollo_dev /bin/bash
-
If you receive the error 408 timeout when run
dev_start.sh
, please follow this instruction to set network mtu to 1200 (http://www.microhowto.info/howto/change_the_mtu_of_a_network_interface.html) -
Install nvidia-384 driver and CUDA-8.0: same as host machine.
-
Install cuDNN (you may need to create an Nvidia developer account to download the install file, so I upload it to Teams https://teams.microsoft.com/_#/files/General?threadId=19%3A5f36071370c94195b1175facc74ff92a%40thread.tacv2&ctx=channel&context=cudnn7&rootfolder=%252Fsites%252FVinAI-AutoPilot%252FShared%2520Documents%252FGeneral%252FPlatformTeam%252FApollo%2520study%252FInstallation%2520file%252Fcudnn7). After download:
sudo dpkg -i libcudnn7*.deb
-
Install GLFW3.2: Please use the script in this folder https://teams.microsoft.com/_#/files/General?threadId=19%3A5f36071370c94195b1175facc74ff92a%40thread.tacv2&ctx=channel&context=Installation%2520file&rootfolder=%252Fsites%252FVinAI-AutoPilot%252FShared%2520Documents%252FGeneral%252FPlatformTeam%252FApollo%2520study%252FInstallation%2520file.
-
Create config file in
/usr/local/cuda/
with namenvblas.conf
. Put this line into the file:NVBLAS_CPU_BLAS_LIB /usr/lib/libopenblas.so
-
Run:
export NVBLAS_CONFIG_FILE=/usr/local/cuda/nvblas.conf
-
Commit a new docker image (in host):
docker commit CONTAINER_ID apolloauto/apollo:NEW_DOCKER_IMAGE_TAG
You can get container id by using the command below and find
apollo_dev
docker:docker container list
-
Exit docker then start the new docker image (in host) and get into docker:
./docker/scripts/dev_start.sh -l -t NEW_DOCKER_IMAGE_TAG ./docker/scripts/dev_into.sh
-
Go to file
./modules/perception/obstacle/onboard/visualization_subnode.cc
. Remove those lines:if (lidar_event_id_ != -1 || fusion_event_id_ != -1) { lidar_object_data_ = dynamic_cast<LidarObjectData*>( shared_data_manager_->GetSharedData("LidarObjectData")); if (lidar_object_data_ == nullptr) { AERROR << "Failed to get LidarObjectData."; return false; } AINFO << "Init shared datas successfully, data: " << lidar_object_data_->name(); }
scene_shared_data_ = dynamic_cast<SceneSharedData*>( shared_data_manager_->GetSharedData("SceneSharedData")); if (scene_shared_data_ == nullptr) { AERROR << "Failed to get SceneSharedData."; return false; }
SubnodeHelper::ProduceSharedDataKey(trigger_ts, trigger_device_id, &data_key_sensor); SetLidarContent(data_key_sensor, content, timestamp);
AINFO << "set lidar content"; SubnodeHelper::ProduceSharedDataKey(trigger_ts, trigger_device_id, &data_key_sensor); SetLidarContent(data_key_sensor, content, timestamp);
-
Go to file
./modules/perception/onboard/event_manager.cc
. Add those lines below line 94, abovequeue->pop(event);
if(queue->size() == 0){ return true; }
-
Go to file
./modules/perception/obstacle/camera/visualizer/glfw_fusion_viewer.cc
. Add this line aboveglfwCreateWindow
called.glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API);
-
Go to file
./module/perception/onboard/subnode.cc
. Remove those lines:if (type_ == DAGConfig::SUBNODE_IN) { AINFO << "Subnode == SUBNODE_IN, EXIT THREAD. subnode:" << DebugString(); return; }
-
In Docker:
./apollo.sh build_opt_gpu
-
After build, run bootstrap:
bootstrap.sh
-
Open another terminal tab, get into the docker by using
./docker/script/dev_into.sh
. Run rosbag file.rosbag play data/bag/demo_2.5.bag -l --clock
-
Keep rosbag playing, back to previous tab and launch perception with visulizer:
./scripts/perception_offline_visualizer.sh