apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Two question about how to update vehicle calibration for throttle and brakes

Open follow123 opened this issue 8 years ago • 6 comments

Based on the doc "how_to_update_vehicle_calibration.md" and apollo\modules\tools\calibration, I want to understand how to calibrate the throttle and brakes in Apollo2.5, because I want to update the calibration table. But I found something that I can not understand: (1)This doc told me when I want to collect data, I should "run python data_collector.py {dir}/{command}.txt for different commands. Run each command multiple times". But read the code in data_collector.py, it's not really like this. Maybe this doc is only applicable to Apollo2.0. (2)In apollo\modules\tools\calibration\process.py, why just the data["imu"] was filtered? In order to remove the shake? Why "speed" and "cmd" does not need to be filted? And how to define the filter param?b, a = signal.butter(6, 0.05, 'low') Where the "6" and "0.05" came from? Next, why do this data['imu'] = np.append(data['imu'][-SPEED_DELAY / 10:], data['imu'][0:-SPEED_DELAY / 10])? Is it related to time delay SPEED_DELAY? How to determine the value of time delay SPEED_DELAY? I look forward to your answer. Thanks.

follow123 avatar May 15 '18 08:05 follow123

The python scrpts are updated,So did not need to pass the cammand pararmeter,just run

python data_collector.py

then type in the canmmand.

gengqx avatar May 15 '18 09:05 gengqx

@gengqx I know this. question(1) just want to say the doc how_to_update_vehicle_calibration.md maybe need to be updated. My main problem is (2), about the processing of data["imu"]. Because I want to use the Apollo's logic to deal with my own data.Do you know why Apollo do this?

Thank for your answer very much.

follow123 avatar May 15 '18 10:05 follow123

@follow123

  1. Thanks for your advice, will update so the code can be consistent with the document.

  2. The raw IMU data is quit noisy in general, that is why we added ButterWidth to filter noise of certain frequency, remember that the choice of filter order and cutoff frequency might be associate with the IMU type.

  3. Yes, the delayed speed is measured between the time diff between the speed command sent to the car and the actual speed feedback from the car, and this number can vary from car to car as well.

Capri2014 avatar May 19 '18 03:05 Capri2014

@Capri2014 thanks for your reply. Can I understand like this: because of the delay, at time t1 I got the acc at t0(t0 < t1), so I need change the order of acc, that is to say, I need to do data['imu'] = np.append(data['imu'][-SPEED_DELAY / 10:], data['imu'][0:-SPEED_DELAY / 10]) , Right or No?

follow123 avatar May 21 '18 00:05 follow123

@Capri2014 data['imu'] = np.append(data['imu'][-SPEED_DELAY / 10:], data['imu'][0:-SPEED_DELAY / 10]) means I need to change the order of data['imu']'s vaule, to transfer the value behind of the data['imu'][-SPEED_DELAY / 10] to front, and the vaule front of the data['imu'][-SPEED_DELAY / 10] to behind. Why not delete the acceleration that be front of the data['imu'][-SPEED_DELAY / 10]?

follow123 avatar May 21 '18 01:05 follow123

@follow123 I have the same question.Have you solved it?And would you mind telling me why?Thanks a lot!

quuen avatar May 28 '19 09:05 quuen