Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

accel_brake_map_calibrator sometimes produce invalid map file #1904

Open
3 tasks done
VRichardJP opened this issue Sep 17, 2022 · 4 comments
Open
3 tasks done

accel_brake_map_calibrator sometimes produce invalid map file #1904

VRichardJP opened this issue Sep 17, 2022 · 4 comments
Assignees
Labels
component:control Vehicle control algorithms and mechanisms. (auto-assigned) component:vehicle Vehicle-specific implementations, drivers, packages. (auto-assigned) status:help-wanted Assistance or contributors needed. status:stale Inactive or outdated issues. (auto-assigned) type:bug Software flaws or errors.

Comments

@VRichardJP
Copy link
Contributor

Checklist

  • I've read the contribution guidelines.
  • I've searched other issues and no duplicate issues were found.
  • I'm convinced that this is not my fault but a bug.

Description

I went through the accel/brake map calibration of one vehicle today. After driving with a joystick for a while I saved the file with the /accel_brake_map_calibrator/update_map_dir service.

But upon testing, the raw_vehicle_cmd_converter would always crash on loading the generated data (in interpolation_utils::validateKeys). I inspected the file and saw that sometimes the column values were the same over consecutive rows. Like this:

0.3,-1.48,-1.5,-1.48,...
0.4,-1.48,-1.5,-1.85,...

I manually edited the value so that accel values are strictly increasing. Like so:

0.3,-1.48,-1.5,-1.48,...
0.4,-1.49,-1.51,-1.85,...

And the raw_vehicle_cmd_converter is not crashing anymore.

I don't know whether it is normal for the interpolation to crash when values are not strictly increasing. But either the interpolation of the calibrator should be fixed

Expected behavior

accel/brake maps generated by the accel_brake_map_calibrator should always be valid.

Actual behavior

sometimes incompatible maps are generated

Steps to reproduce

  1. calibrate

Versions

  • Ubuntu 20.04
  • ROS2 galactic
  • master (~1 month old)

Possible causes

No response

Additional context

No response

@BonoloAWF BonoloAWF added the type:bug Software flaws or errors. label Sep 20, 2022
@xmfcx xmfcx added component:control Vehicle control algorithms and mechanisms. (auto-assigned) component:vehicle Vehicle-specific implementations, drivers, packages. (auto-assigned) labels Sep 20, 2022
@takayuki5168 takayuki5168 added the status:help-wanted Assistance or contributors needed. label Sep 22, 2022
@takayuki5168
Copy link
Contributor

@VRichardJP Thanks for your bug report! I guess this should be fixed. In this case, the interpolated function has a discontinuity.

@TakaHoribe How about asking this bug fix to a PT student. Or just setting help_wanted sounds fine.

@VRichardJP
Copy link
Contributor Author

example of brake_map.csv generated from the calibrator:
brake_map.csv

0.6, 0.7 and 0.8 rows have not been calibrated (too strong brake), most values are the same and raw_vehicle_cmd_converter crashes at runtime when using this map.

@stale
Copy link

stale bot commented Nov 26, 2022

This pull request has been automatically marked as stale because it has not had recent activity.

@stale stale bot added the status:stale Inactive or outdated issues. (auto-assigned) label Nov 26, 2022
@xmfcx
Copy link
Contributor

xmfcx commented Dec 13, 2022

@TakaHoribe @takayuki5168 any updates on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:control Vehicle control algorithms and mechanisms. (auto-assigned) component:vehicle Vehicle-specific implementations, drivers, packages. (auto-assigned) status:help-wanted Assistance or contributors needed. status:stale Inactive or outdated issues. (auto-assigned) type:bug Software flaws or errors.
Projects
None yet
Development

No branches or pull requests

5 participants