Apollo: How to run apollo with out dreamview etc. run on single component?

Created on 14 Feb 2019  ·  10Comments  ·  Source: ApolloAuto/apollo

Using scripts directly run demo in dreamview can not understand apollo well, how to run on single node like rosrun to test single unit?

To be specificlly, if I want test a single image on yolo3d, what should I run?

Build Question

Most helpful comment

@jinfagang Finally managed to get all the tools in modules/perception/camera/tools to work. That code is very messy and I had to make many, many changes, but the results are good.

I am able to run obstacle detection and lane detection on the sample images in the repo. All my changes to get it to work are on this branch https://github.com/aboarya/apollo/tree/attemping_offline_perception

If you just want to quickly see results, I think you can clone my repo, check out the branch, get into docker container and run:

$ mkdir -p /tmp/front_6mm/
$ bazel run //modules/perception/camera/tools/offline:offline_obstacle_pipeline
# the test image will be output to /tmp/front_6mm/ and should have bounding boxes using Yolo detection
$ bazel run //modules/perception/camera/tools/lane_detection:lane_denseline_eval
# several images will be output to /apollo/result/ that have lanes detected

Example sample image for lane detection
Example sample image for obstacle detection

All 10 comments

@jinfagang
(1) start docker, build apollo
(2) use "cyber_launch start" followed by the launch file of the module you want to run. e.g:
cyber_launch start modules/planning/launch/planning.launch

"cyber_launch -h" to see the usage of cyber_launch

@jmtao OK, I want test yolo3d on a single image or an video, how to test that? Which launch file should I start and if there any test image can using for ?

@jinfagang
There's an offline obstacle detector cc file which runs yolo3d on the images in the testdata directory.

If you look in the modules/perception/camera/tools/offline directory, there's the list of files used to create the offline_obstacle_pipline binary.

You can build and run it in one command as follows:

# dev into container
user@in_dev_docker:/apollo$ bazel run //modules/perception/camera/tools/offline:offline_obstacle_pipeline

But there are many problems with this code. Once you resolve some bad file paths, you will have problem in how the YoloObstacleDetector component is registered. I am still trying to solve this

@aboarya Thank u for your useful info! If you have progress pls let me know

@jinfagang Finally managed to get all the tools in modules/perception/camera/tools to work. That code is very messy and I had to make many, many changes, but the results are good.

I am able to run obstacle detection and lane detection on the sample images in the repo. All my changes to get it to work are on this branch https://github.com/aboarya/apollo/tree/attemping_offline_perception

If you just want to quickly see results, I think you can clone my repo, check out the branch, get into docker container and run:

$ mkdir -p /tmp/front_6mm/
$ bazel run //modules/perception/camera/tools/offline:offline_obstacle_pipeline
# the test image will be output to /tmp/front_6mm/ and should have bounding boxes using Yolo detection
$ bazel run //modules/perception/camera/tools/lane_detection:lane_denseline_eval
# several images will be output to /apollo/result/ that have lanes detected

Example sample image for lane detection
Example sample image for obstacle detection

@aboarya Thanks, have you run yolo3d ? I really want to see the 3d output result, the obstacle detection image above seems 2d. Would u separate the project extract simple executable out for runing off line?

@jinfagang Yolo3d (to my understanding) is just a transformation from the camera's 2d input into 3d space using the brown camera model; i.e. using the camera's intrinsic and extrinsic settings.

I think you may be thinking about the HD maps?

@aboarya Yolo3d is not just 2d detectors convert to 3d space with camera intrinsics and extrinsic with lidar so on. it's a model produce 3d location (using 6d pose though) directly which is totally different from 2d detectors. Anyway, 2d detectors transform into 3d has a lot of trouble ( at least you have to know depth of that point and should be very accurate). I does not know which using in Apollo now but I saw a talk they claims that they can do a 3d detector based on mono cameras.

@jinfagang @aboarya Thanks for the meaningful discussion and offline perception patches. We will make the tool cleaner and easier to use

bazel run //modules/perception/camera/tools/lane_detection:lane_denseline_eval

Hi, the link is failed,can you give me the new link? Thank you !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ahuer2435 picture ahuer2435  ·  3Comments

chasingw picture chasingw  ·  3Comments

lesun90 picture lesun90  ·  3Comments

BenBaek picture BenBaek  ·  3Comments

chilihua picture chilihua  ·  3Comments