-
Notifications
You must be signed in to change notification settings - Fork 190
Obstacle rewrite #2440
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
Open
rishiso
wants to merge
16
commits into
ros2
Choose a base branch
from
obstacle-rewrite
base: ros2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Obstacle rewrite #2440
Changes from 13 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
110bf36
Removing dynamic obstacles
rishiso 353ec7b
Saving changes
rishiso 02bb409
Fix Code Style On obstacle-rewrite (#2441)
github-actions[bot] 4c2d0ca
Saving progress
rishiso 2fdd670
Done?
rishiso c09df1d
Build works
rishiso 0465ac2
Fix Code Style On obstacle-rewrite (#2479)
github-actions[bot] 8229a64
Improvements
rishiso ee5ebc9
More improvements
rishiso 9071d5f
More
rishiso 3a5d40d
One more
rishiso 269fcb9
Fix Code Style On obstacle-rewrite (#2480)
github-actions[bot] e87cb16
Update src/rj_planning/include/rj_planning/plan_request.hpp
rishiso f8ee6e0
Rename
rishiso 9cf2509
Fix Code Style On obstacle-rewrite (#2487)
github-actions[bot] 67198ea
Adjusting params
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,4 +28,4 @@ COLCON_CURRENT_PREFIX="$(builtin cd -q "`dirname "${(%):-%N}"`" > /dev/null && p | |
| _colcon_prefix_chain_zsh_source_script "$COLCON_CURRENT_PREFIX/local_setup.zsh" | ||
|
|
||
| unset COLCON_CURRENT_PREFIX | ||
| unset _colcon_prefix_chain_zsh_source_script | ||
| unset _colcon_prefix_chain_zsh_source_script | ||
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,29 +1,53 @@ | ||
| #pragma once | ||
| #include <rj_common/context.hpp> | ||
| #include <rj_common/planning/robot_constraints.hpp> | ||
| #include <rj_geometry/circle.hpp> | ||
| #include <rj_geometry/point.hpp> | ||
| #include <rj_geometry/segment.hpp> | ||
| #include <rj_geometry/shape.hpp> | ||
| #include <rj_geometry/stadium_shape.hpp> | ||
|
|
||
| namespace planning { | ||
|
|
||
| class Obstacle { | ||
| public: | ||
| Obstacle() = default; | ||
| Obstacle(std::shared_ptr<rj_geometry::Shape> obs, std::shared_ptr<rj_geometry::Shape> pad) | ||
| : obstacle(obs), padding(pad) {} | ||
|
|
||
| virtual bool obstacle_hit(rj_geometry::Point pt); | ||
| virtual bool padding_hit(rj_geometry::Point pt); | ||
| virtual bool obstacle_near(rj_geometry::Point pt, float thresh); | ||
| virtual bool padding_near(rj_geometry::Point pt, float thresh); | ||
| virtual shared_ptr<rj_geometry::ShapeSet> get_shapes(); | ||
| virtual std::shared_ptr<rj_geometry::Shape> get_obstacle(); | ||
| virtual std::shared_ptr<rj_geometry::Shape> get_padding(); | ||
| virtual ~Obstacle() = default; | ||
| Obstacle(const Obstacle& other) = default; | ||
| Obstacle(Obstacle&& other) = default; | ||
| Obstacle& operator=(const Obstacle& other) = default; | ||
| Obstacle& operator=(Obstacle&& other) = default; | ||
|
|
||
| virtual bool obstacle_hit(rj_geometry::Point pt) { return obstacle->hit(pt); } | ||
|
|
||
| virtual bool obstacle_hit(const rj_geometry::Segment& seg) { return obstacle->hit(seg); } | ||
|
|
||
| virtual bool padding_hit(rj_geometry::Point pt) { return padding->hit(pt); } | ||
|
|
||
| virtual bool padding_hit(const rj_geometry::Segment& seg) { return padding->hit(seg); } | ||
|
|
||
| virtual bool obstacle_near(rj_geometry::Point pt, float thresh) { | ||
| return obstacle->near_point(pt, thresh); | ||
| } | ||
|
|
||
| virtual bool padding_near(rj_geometry::Point pt, float thresh) { | ||
| return padding->near_point(pt, thresh); | ||
| } | ||
|
|
||
| // Convenience methods: hit() delegates to padding_hit() for compatibility | ||
| virtual bool hit(rj_geometry::Point pt) { return padding_hit(pt); } | ||
rishiso marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| virtual bool hit(const rj_geometry::Segment& seg) { return padding_hit(seg); } | ||
|
|
||
| virtual std::shared_ptr<rj_geometry::Shape> get_obstacle() { return obstacle; } | ||
|
|
||
| virtual std::shared_ptr<rj_geometry::Shape> get_padding() { return padding; } | ||
|
|
||
| protected: | ||
| std::shared_ptr<rj_geometry::Shape> obstacle; | ||
| std::shared_ptr<rj_geometry::Shape> padding; | ||
| std::shared_ptr<rj_geometry::Point> velocity; | ||
rishiso marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| rj_geometry::ShapeSet shapes; | ||
| }; | ||
|
|
||
| } // namespace planning | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The install/ directory should not be included in the pull request. According to the .gitignore file, this directory should be excluded from version control. These are generated build artifacts that should not be committed to the repository.