roboracing-software icon indicating copy to clipboard operation
roboracing-software copied to clipboard

Drag Race PID node updates

Open btdubs opened this issue 4 years ago • 1 comments

Goal: Add PID node functionality to our stack and convert the drag_race_controller to use this new node as well as general drag race improvements.

Notes: There is a very nice PID node ROS implementation that we want to add to our stack to replace the quick library put together for the drag race. Remove the PID library that is in rr_iarrc and replace the usage of it in drag_race_controller with the new PID node implementation.

Part two of this issue is to add features to the drag race controller. There are a set amount of line window samples taken to form the line and then an arbitrary one is hard coded as the window used for error calculator. Make a launch parameter input of a look-ahead distance and the node will automatically select the point closest matching that distance from which to calculate error term. Next, update the controller to have launch configurable initial starting window locations (also see future work). Finally, The controller should be updated to handle possible line losses. Currently, if the controller loses one line, it places a fake line in the "middle area" to try to not suddenly turn. Find a way to estimate based on the last few known positions and possibly other information where the line is even if not visually detected.

New Files Created (at least): <None> Files Edited (at least):

  • in rr_iarrc/src/drag_centerline_planner/
    • drag_centerline_planner.cpp
    • PID.cpp
    • PID.h
  • in rr_iarrc/launch/planners/
    • urc_centerline_planner.launch
    • drag_centerline_planner.launch

Returning Member Mentor: Brian Cochran @btdubs --Ask him questions! When you believe you have finished the success criteria below, submit a pull request to merge your code into master.

Success Criteria:

  • Launch PID node with launch file
  • Publishing to PID node topic outputs a value on expected topics
  • Multiple PID nodes can be run at once without interference
  • Launching drag_race_controller also launches a PID node
  • Any lookahead distance can be selected without node crash
  • drag_race_controller runs in simulation similar to current implementation
  • drag_race_controller has "better" failure mode than current implementation when a line is lost such as not driving off course

Future Work (if you want to give it a try, but don't waste too much time on it):

  • Instead of cold searching every frame for the line, use data from past frames to decide where to start the sliding window.
  • Consider ways to automatically detect ideal sliding window size given images.

btdubs avatar Sep 15 '19 04:09 btdubs

Update: the code should be mostly done on the update/pid branch. Still need to test it, though

dmulloy2 avatar Nov 03 '19 23:11 dmulloy2