Apollo: (Question) Simulate algorithms

Created on 16 Feb 2018  ·  6Comments  ·  Source: ApolloAuto/apollo

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?

Simulation & Dreamview Question

Most helpful comment

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"'
  1. replay rosbag
    rosbag play demo_2.0_np.bag

  2. start your own planning node with your own algorithm

Have fun!

All 6 comments

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"'
  1. replay rosbag
    rosbag play demo_2.0_np.bag

  2. start your own planning node with your own algorithm

Have fun!

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

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.

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.

@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.

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!

Was this page helpful?
0 / 5 - 0 ratings