-
Notifications
You must be signed in to change notification settings - Fork 186
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
Intermediate Pathgen #2266
Intermediate Pathgen #2266
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks awesome
@@ -216,6 +216,8 @@ bool RobotFactoryPosition::am_closest_kicker() { | |||
} | |||
|
|||
void RobotFactoryPosition::set_default_position() { | |||
set_current_position<Line>(); | |||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing shouldn't be pushed to ros2 😄
@@ -145,8 +146,8 @@ class RobotFactoryPosition : public Position { | |||
// SPDLOG_INFO("we are never leaving defense :)"); | |||
// return; | |||
// } | |||
SPDLOG_INFO("Robot {}: change {}", robot_id_, current_position_->get_name()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return to prior spot. probably don't want logs to get flooded with positions that aren't changing
std::vector<rj_geometry::Point> get_intermediates(const LinearMotionInstant& start, | ||
const LinearMotionInstant& goal); | ||
|
||
const double MIN_SCALE = 0.5, MAX_SCALE = 1.5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use constexpr
here and for the other variables below because we already know the values
constexpr double MIN_SCALE = 0.5, MAX_SCALE = 1.5; | ||
constexpr double MIN_ANGLE = 20, MAX_ANGLE = 140; | ||
constexpr int NUM_INTERMEDIATES = 10; | ||
constexpr double STEP_SIZE = 0.1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use right style: kConstantName
|
||
std::vector<rj_geometry::Point> get_intermediates(const LinearMotionInstant& start, | ||
const LinearMotionInstant& goal) { | ||
std::random_device rd; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add intermediate that works to list of new random ones. Cache that so know have one that works. (only cache if know works). Cache means adding to array of possibilities so still find optimal one. This helps because might be finding worse random positions later and veering off path.
automated style fixes Co-authored-by: sanatd33 <sanatd33@users.noreply.github.com>
11a98b3
to
b053c40
Compare
automated style fixes Co-authored-by: sid-parikh <sid-parikh@users.noreply.github.com>
double scale = scale_dist(gen); | ||
|
||
// Generate random tuples of distances and angles | ||
inter_tuples.emplace_back(abs(angle), signbit(angle) ? -1 : 1, scale); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good
* initial test of tigers system * clean up and add comment * added line test * fix line issue * made comments and removed from settle * Fix Code Style On intermediate-pathgen (#2267) automated style fixes Co-authored-by: sanatd33 <sanatd33@users.noreply.github.com> * make pr changes * add cache inter * start cacching intermediates * add params * use abs angle * Fix Code Style On intermediate-pathgen (#2269) automated style fixes Co-authored-by: sid-parikh <sid-parikh@users.noreply.github.com> --------- Co-authored-by: rishiso <rishisoni.5678@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: sanatd33 <sanatd33@users.noreply.github.com> Co-authored-by: petergarud <peter.garud04@gmail.com> Co-authored-by: sid-parikh <sid-parikh@users.noreply.github.com>
* initial test of tigers system * clean up and add comment * added line test * fix line issue * made comments and removed from settle * Fix Code Style On intermediate-pathgen (#2267) automated style fixes Co-authored-by: sanatd33 <sanatd33@users.noreply.github.com> * make pr changes * add cache inter * start cacching intermediates * add params * use abs angle * Fix Code Style On intermediate-pathgen (#2269) automated style fixes Co-authored-by: sid-parikh <sid-parikh@users.noreply.github.com> --------- Co-authored-by: rishiso <rishisoni.5678@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: sanatd33 <sanatd33@users.noreply.github.com> Co-authored-by: petergarud <peter.garud04@gmail.com> Co-authored-by: sid-parikh <sid-parikh@users.noreply.github.com>
Description
Creates a new path planner to replace RRT. The main idea is to create one (or more) intermediate points that can segment a straight line path to avoid obstacles. This is heavily based on the TIGERS path planner, specifically referencing their 2019 TDP.