The source project of this merge request has been removed.
Fix Time Delay in wf_sim
Fixed bug
following bugs are fixed
- typo in launch file (invalid arg)
- time delay model (the actual delay time was 1/4 of the desired given delay parameter)
Description of the bug
The time delay was simulatied using input_buffer, and it was updated when calcModel() was called. The calcModel() function is called 4 times for each simulator calculation (because of the Runge kutta algorithm), then actual time delay was 1/4 of the desired delay.
The buffer update was moved out of the calcModel(), and add update() function to update the input_buffer.
Steps to reproduce the bug
- run wf_simulator from runtime_manager with
vehicle_model_type
= DELAY_STEER, andsteering time delay
is a positive value. - open rqt_plot, plot
vehicle_cmd/ctrl_cmd/steering
and/vehicle_status/angle
. - stop the plot, and measure the delay of the two plots, which is 1/4 of the desired delay.
Edited by Joshua Whitley