forked from tier4/scenario_simulator_v2
-
Notifications
You must be signed in to change notification settings - Fork 1
RJD-1388/follow_trajectory #44
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
robomic
wants to merge
162
commits into
RobotecAI:master
Choose a base branch
from
tier4:RJD-1388/follow_trajectory
base: master
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
Changes from 82 commits
Commits
Show all changes
162 commits
Select commit
Hold shift + click to select a range
02b9faf
remove horrors of &-captures
robomic 6d626ac
extract distance_along_lanelet and discard_the_front_waypoint_and_rec…
robomic 642d726
remove a scary-looking lambda
robomic e9baaea
further lambda extraction
robomic b573bf0
const PolylineTrajectory, lambda extraction
robomic ca13318
flatten if-statements
robomic ffedcb8
introduce a struct for follow_trajectory
robomic a442c8e
buildUpdatedEntityStatus
robomic d3213a7
validators
robomic 9d895cb
PolylineTrajectoryFollower cleanup
robomic eba2168
add missing validator
robomic 6bbba1e
remove dead code
robomic 3958568
use const iterator
robomic ac535c3
inversion isfinite_vec3
robomic a5ed84d
typed and constexpr comparisons
robomic 834fb3a
rename
robomic 86471e7
typo
robomic 572ea56
Merge branch 'master' into RJD-1388/follow_trajectory
robomic 3c82ceb
Merge branch 'master' into RJD-1388/follow_trajectory
robomic c8dc98b
Merge branch 'master' into RJD-1388/follow_trajectory
robomic cc2908c
inverse if-statement, specify captures
robomic 6b2ba8b
Merge tag '5.3.2' into RJD-1388/follow_trajectory
robomic 01ddaa9
reorder algorithm steps
robomic abba124
debug info
robomic edf1f6e
debug info
robomic a850510
mutable polyline_trajectory
robomic 147b584
Merge branch 'master' into RJD-1388/follow_trajectory
robomic 7d12a12
acceleration validator
robomic 0ec90b2
clean up FollowWaypointController
robomic 26b87db
clean up FollowWaypointController
robomic 179601d
noSnakeCase
robomic 1c3e136
clarify comment
robomic 6f25291
mutable iterators in std::rotate
robomic fe7c1ac
move
robomic 18b3749
Merge tag '6.0.1' into RJD-1388/follow_trajectory
robomic 41711f2
free function separation, condition simplification
robomic 2f87d0b
Merge branch 'master' into RJD-1388/follow_trajectory
dmoszynski 0bd75cd
Merge branch 'master' into RJD-1388/follow_trajectory
robomic fb6fd7d
separation; EntityStatus validator/builder
robomic 9abf110
recursion removal
robomic 22791bf
line lint
robomic 02470ff
Merge branch 'master' into RJD-1388/follow_trajectory
robomic d07cca1
restructure polyline_trajectory namespace
robomic 78e1f76
cleaner error throwing
robomic 80547c9
refer to private untity_status_ field
robomic de3524c
special memeber function definitions
robomic b6ade20
dyn constraints assertions
robomic 660f8c6
Merge branch 'master' into RJD-1388/follow_trajectory
robomic a70d318
PolylineTrajectoryPositioner refactor
robomic f9bc647
spell check
robomic 1075845
Fix ValidatedEntityStatus member initialization order
TauTheLepton d72ab82
Refactor ValidatedEntityStatus to use arguments instead of class members
TauTheLepton 87e5581
Refactor ValidatedEntityStatus: step_time -> step_time_
TauTheLepton d9099ed
Refactor ValidatedEntityStatus: remove duplicated data: name
TauTheLepton b47dbeb
Refactor ValidatedEntityStatus: remove duplicated data: time
TauTheLepton 8d7ca68
Refactor ValidatedEntityStatus: remove duplicated data: bounding_box
TauTheLepton 24cf34f
Refactor ValidatedEntityStatus: remove duplicated data: lanelet_pose_…
TauTheLepton a79602a
Refactor ValidatedEntityStatus: remove duplicated data: position
TauTheLepton 64bab33
Refactor ValidatedEntityStatus: remove duplicated data: linear_speed
TauTheLepton 2eb721d
Refactor ValidatedEntityStatus: remove duplicated data: linear_accele…
TauTheLepton 8b9369d
Refactor ValidatedEntityStatus: add orientation getter
TauTheLepton 4b7b9a4
Refactor ValidatedEntityStatus: use position getter
TauTheLepton c4fd215
Fix position validation
TauTheLepton f5ba27a
Use getters
TauTheLepton b4b7cf2
Refactor ValidatedEntityStatus: add behavior parameter getter
TauTheLepton 74e3591
Refactor ValidatedEntityStatus: add current velocity getter
TauTheLepton e12c4b0
Formatting of all getters
TauTheLepton 96318b4
Make ValidatedEntityStatus data members private
TauTheLepton 08c2505
Refactor: remove duplicated data: behavior_parameter
TauTheLepton b68d9bb
Refactor: remove pointless class PolylineTrajectoryFollower
TauTheLepton 0b7b59a
Refactor: rename whole polyline_trajectory_follower directory + renam…
TauTheLepton 251d94a
Refactor: rename whole polyline_trajectory_follower directory + renam…
TauTheLepton 3cecfb1
Refactor PolylineTrajectoryPositioner & distance
TauTheLepton 1ac46c4
Refactor PolylineTrajectoryPositioner: Style changes
TauTheLepton b3a28b5
Restore previous BehaviorPluginBase getter setter macro formatting th…
TauTheLepton d88cdd1
Merge pull request #1494 from tier4/RJD-1388/follow_trajectory_fix
robomic 3b2a7c4
Merge branch 'RJD-1388/follow_trajectory' into RJD-1388/follow_trajec…
robomic a8e758b
Merge pull request #1495 from tier4/RJD-1388/follow_trajectory_update
robomic faeace9
Merge remote-tracking branch 'origin/master' into RJD-1388/follow_tra…
TauTheLepton ffcc0c0
Refactor: Use value_or
TauTheLepton 3c07074
Refactor: Move initialization to if
TauTheLepton f91f80a
Refactor: Remove implicit conversion
TauTheLepton 7b30cee
ref(traffic_simulator, geometry): add rotate and direction_to_quatern…
dmoszynski 4c9ddd5
ref(traffic_simulator) : refactor/improve PolylineTrajectoryPositioner
dmoszynski 310c306
ref(traffic_simulator): improve time_to_nerest and updateEntity in Po…
dmoszynski 75b0472
ref(traffic_simulator): separate isNearestWaypointReachable in Polyli…
dmoszynski 15f3a83
Revert trailing whitespace deletion
TauTheLepton 436aba0
Pass HdMapUtils ptr as the last argument
TauTheLepton f542ffe
Get double type by value
TauTheLepton 3173b3d
Revert previous condition
TauTheLepton 520e005
Get double type by value
TauTheLepton 4baf03d
Adjust code to pass HdMapUtils as the last argument
TauTheLepton c4ac964
Remove "magic values"
TauTheLepton ef1594c
Change the `distance::distanceAlongLanelet` to not have fallback into…
TauTheLepton 3a9115e
Merge tag '10.0.0' into RJD-1388/follow_trajectory
robomic 8a139f4
Adjust code to pass HdMapUtils as the last argument
TauTheLepton 8119a99
spellcheck
robomic b58f5d4
Merge remote-tracking branch 'origin/RJD-1388/follow_trajectory' into…
TauTheLepton b8b503b
Merge remote-tracking branch 'origin/RJD-1388/follow_trajectory' into…
TauTheLepton 54cfd44
Merge remote-tracking branch 'origin/master' into RJD-1388/follow_tra…
TauTheLepton 00c3329
Merge branch 'master' into RJD-1388/follow_trajectory
robomic edb0148
Merge tag '10.3.3' into RJD-1388/follow_trajectory
robomic b24d1de
Merge branch 'master' into RJD-1388/follow_trajectory
TauTheLepton a760e4b
Trigger SonarCloud
TauTheLepton 9537ff8
Merge branch 'master' into RJD-1388/follow_trajectory
TauTheLepton c8194f4
resolve/update comments
robomic 7002f41
Merge tag '12.1.2' into RJD-1388/follow_trajectory
robomic 0be5866
Merge branch 'master' into RJD-1388/follow_trajectory
robomic ca51fd5
Merge remote-tracking branch 'refs/remotes/origin/RJD-1388/follow_tra…
robomic 5399a17
Merge branch 'master' into RJD-1388/follow_trajectory
robomic ba43cf2
implement improvements/suggestions
robomic 433f89c
Merge remote-tracking branch 'origin/RJD-1388/follow_trajectory' into…
robomic 8877083
update comments
robomic 30e865e
Merge branch 'master' into RJD-1388/follow_trajectory
robomic 19a1de3
merge 14.0.0
robomic 1e83b87
code refinements
robomic da31345
Merge branch 'master' into RJD-1388/follow_trajectory
TauTheLepton b7c1ac2
Merge branch 'master' into RJD-1388/follow_trajectory
TauTheLepton b882ce2
merge master
robomic fcff1d1
Merge branch 'master' into RJD-1388/follow_trajectory
robomic 24d3885
FTA scenarios
robomic 627ede3
endline
robomic 9de47aa
fix distance inaccuracies
robomic ebc45c2
Merge tag '16.7.5' into RJD-1388/follow_trajectory
robomic 455c75b
Merge branch 'master' into RJD-1388/follow_trajectory
robomic d6eaa2f
Merge branch 'master' into RJD-1388/follow_trajectory
robomic d8b4495
Merge branch 'master' into RJD-1388/follow_trajectory
robomic 1d56356
Merge branch 'master' into RJD-1388/follow_trajectory
robomic 23db0f2
Merge branch 'master' into RJD-1388/follow_trajectory
robomic 2209eeb
merge master
robomic 0561734
merge master
robomic d244cb2
Merge branch 'master' into RJD-1388/follow_trajectory
takanotaiga ffb5c80
Merge branch 'master' into RJD-1388/follow_trajectory
takanotaiga 4db4822
Implement yaw_flip noise for noise_v4
HansRobo f099e4c
rename noise.v4.<config_name>.rotation into noise.v4.<config_name>.yaw
HansRobo fba8c95
Add create_selector lambda function to make selector lambda more common
HansRobo 912b969
commonize true positive calculation algorithm in noise_v2
HansRobo 3cb59ef
use same true positive calculation algorithm to noise_v2 in noise_v4
HansRobo 9127806
rename rotation to yaw in noise_v4
HansRobo d125095
Add missing parts for noise_v4
HansRobo b293464
Merge branch 'master' into RJD-1388/follow_trajectory
robomic b067e4c
Implement yaw flip noise correctly
HansRobo da68681
Apply noise v4 correctly
HansRobo cd295f9
Merge branch 'master' into RJD-1388/follow_trajectory
takanotaiga 042553b
use elliptical model for x,y,yaw in noise_v4
HansRobo 013eedd
Update documentation for noise v4 parameters
HansRobo 31b54ca
Merge branch 'master' into fix/noise_v4
HansRobo bff64de
Merge pull request #1685 from tier4/fix/noise_v4
HansRobo d3e5cc7
Bump version of scenario_simulator_v2 from version 17.5.3 to version …
actions-user a11ac14
Merge branch 'master' into RJD-1388/follow_trajectory
robomic 3483426
port distanceAlongLanelet
robomic 82b7275
Merge branch 'RJD-1388/follow_trajectory' of github.com:tier4/scenari…
robomic 96c70af
Delete apt caches with space monitoring
HansRobo 2baf7ce
delete build directory after colcon build
HansRobo f21c96e
use raw image in BuildAndRun.yaml
HansRobo ee8d3ef
use sudo with apt commands in BuildAndRun.yaml
HansRobo c527828
install libunwind-dev in BuildAndRun.yaml
HansRobo 727420a
use sudo to remove apt caches in BuildAndRun.yaml
HansRobo c486ca2
use jlumbroso/free-disk-space in BuildAndRun.yaml
HansRobo 0f5228d
Merge pull request #1689 from tier4/fix/no-space-left-on-device
HansRobo b02dc39
Bump version of scenario_simulator_v2 from version 17.6.0 to version …
actions-user b04a9d2
Merge branch 'master' into RJD-1388/follow_trajectory
HansRobo 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
32 changes: 32 additions & 0 deletions
32
common/math/geometry/include/geometry/vector3/is_finite.hpp
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2015 TIER IV, Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef GEOMETRY__VECTOR3__IS_FINITE_HPP_ | ||
#define GEOMETRY__VECTOR3__IS_FINITE_HPP_ | ||
|
||
#include <geometry/vector3/is_like_vector3.hpp> | ||
|
||
namespace math | ||
{ | ||
namespace geometry | ||
{ | ||
template <typename T, std::enable_if_t<IsLikeVector3<T>::value, std::nullptr_t> = nullptr> | ||
auto isFinite(const T & v) -> bool | ||
{ | ||
return std::isfinite(v.x) and std::isfinite(v.y) and std::isfinite(v.z); | ||
} | ||
} // namespace geometry | ||
} // namespace math | ||
|
||
#endif // GEOMETRY__VECTOR3__IS_FINITE_HPP_ |
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
76 changes: 76 additions & 0 deletions
76
...r/include/traffic_simulator/behavior/follow_trajectory/polyline_trajectory_positioner.hpp
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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
// Copyright 2015 TIER IV, Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef TRAFFIC_SIMULATOR__BEHAVIOR__FOLLOW_TRAJECTORY__POLYLINE_TRAJECTORY_POSITIONER_HPP_ | ||
#define TRAFFIC_SIMULATOR__BEHAVIOR__FOLLOW_TRAJECTORY__POLYLINE_TRAJECTORY_POSITIONER_HPP_ | ||
|
||
#include <optional> | ||
#include <traffic_simulator/behavior/follow_trajectory/follow_waypoint_controller.hpp> | ||
#include <traffic_simulator/behavior/follow_trajectory/validated_entity_status.hpp> | ||
#include <traffic_simulator/data_type/entity_status.hpp> | ||
#include <traffic_simulator/hdmap_utils/hdmap_utils.hpp> | ||
#include <traffic_simulator_msgs/msg/entity_status.hpp> | ||
#include <traffic_simulator_msgs/msg/polyline_trajectory.hpp> | ||
|
||
namespace traffic_simulator | ||
{ | ||
namespace follow_trajectory | ||
{ | ||
|
||
struct PolylineTrajectoryPositioner | ||
{ | ||
public: | ||
explicit PolylineTrajectoryPositioner( | ||
const std::shared_ptr<hdmap_utils::HdMapUtils> & hdmap_utils_ptr, | ||
const ValidatedEntityStatus & validated_entity_status, | ||
const traffic_simulator_msgs::msg::PolylineTrajectory & polyline_trajectory, | ||
const std::optional<double> target_speed, const double matching_distance, | ||
const double step_time); | ||
|
||
auto makeUpdatedEntityStatus() const -> std::optional<EntityStatus>; | ||
|
||
private: | ||
const std::shared_ptr<hdmap_utils::HdMapUtils> hdmap_utils_ptr_; | ||
const ValidatedEntityStatus validated_entity_status_; | ||
const traffic_simulator_msgs::msg::PolylineTrajectory polyline_trajectory_; | ||
const double step_time_; | ||
const double matching_distance_; | ||
|
||
const std::vector<traffic_simulator_msgs::msg::Vertex>::const_iterator | ||
nearest_waypoint_with_specified_time_it_; | ||
const geometry_msgs::msg::Point nearest_waypoint_position_; | ||
const double distance_to_nearest_waypoint_; | ||
const double total_remaining_distance_; | ||
const double time_to_nearest_waypoint_; | ||
const double total_remaining_time_; | ||
|
||
const FollowWaypointController follow_waypoint_controller_; | ||
|
||
auto totalRemainingDistance() const -> double; | ||
auto totalRemainingTime() const noexcept(false) -> double; | ||
auto isNearestWaypointWithSpecifiedTimeSameAsLastWaypoint() const -> bool; | ||
auto nearestWaypointWithSpecifiedTimeIterator() const | ||
-> std::vector<traffic_simulator_msgs::msg::Vertex>::const_iterator; | ||
auto validatedEntityTargetPosition() const noexcept(false) -> geometry_msgs::msg::Point; | ||
auto validatedEntityDesiredAcceleration() const noexcept(false) -> double; | ||
auto validatedEntityDesiredVelocity(const double desired_speed) const noexcept(false) | ||
-> geometry_msgs::msg::Vector3; | ||
auto validatedEntityDesiredSpeed(const double desired_acceleration) const noexcept(false) | ||
-> double; | ||
auto validatePredictedState(const double desired_acceleration) const noexcept(false) -> void; | ||
}; | ||
} // namespace follow_trajectory | ||
} // namespace traffic_simulator | ||
|
||
#endif // TRAFFIC_SIMULATOR__BEHAVIOR__FOLLOW_TRAJECTORY__POLYLINE_TRAJECTORY_POSITIONER_HPP_ |
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.
Uh oh!
There was an error while loading. Please reload this page.