apollo icon indicating copy to clipboard operation
apollo copied to clipboard

(Question) Simulate algorithms

Open Trelsmo opened this issue 8 years ago • 6 comments

We're trying to simulate our own algorithms for perception, planning etc. Currently we want to test these without vehicle hardware(only a computer). However we can't figure out how we should initiate the simulation in dreamview. As far as we know, when running "rosbag play demo_2.0.bag" dreamveiw just plays back what's recorded earlier by the Apollo team.

tl.dr: How do you test your own algorithms using dreamview?

Trelsmo avatar Feb 16 '18 08:02 Trelsmo

Suppose you'd like to test your own planning algorithm,

  1. filter out planning topic in the rosbag rosbag filter demo_2.0.bag demo_2.0_np.bag 'topic != "/apollo/planning"'

  2. replay rosbag rosbag play demo_2.0_np.bag

  3. start your own planning node with your own algorithm

Have fun!

ycool avatar Feb 16 '18 19:02 ycool

Then we're on the right track, thanks for the answer!

Trelsmo avatar Feb 18 '18 20:02 Trelsmo

Is there a way to simulate the whole system e2e without using the bagfiles. Say that we want to try sending the car another route and view that in dreamview. As far as we understand it dreamview takes the existing gps points and displays that.

How do you use the e2e files (.h5)?

Is there a way to simulate by not using bagfiles?

Also is there a way to create own scenarios to test the system?

Thanks in advance.

Trelsmo avatar Feb 21 '18 12:02 Trelsmo

Is there a way to simulate by not using bagfiles?

Yes, you can use the simControl mode of dreamview to test with a route given by frontend (routing module needs to be running). You can enable that mode by toggling a corresponding button on control panel of dreamview.

Also is there a way to create own scenarios to test the system?

Yes, you can use the open simulation platform: https://azure.apollo.auto to test with scenarios.

siyangy avatar Feb 21 '18 19:02 siyangy

@ycool

  1. enter the docker
# start the docker (optional. If the docker was started, it isn't needed.) 
bash docker/scripts/dev_start.sh
# enter the docker
bash docker/scripts/dev_into.sh
  1. filter out planning topic in the rosbag
rosbag filter demo_2.0.bag demo_2.0_np.bag 'topic != "/apollo/planning"'
  1. replay rosbag
rosbag play demo_2.0_np.bag
  1. start your own planning node with your own algorithm.

davidhopper2003 avatar Mar 27 '18 09:03 davidhopper2003

Hi @Trelsmo,

Hope our answers resolved your questions. We will close the issue for now. If you have an additional question, please feel free to open a new issue. Our engineers are more than happy to help out.

Thank you for supporting Apollo!

vlin17 avatar Apr 06 '18 21:04 vlin17