-
Notifications
You must be signed in to change notification settings - Fork 334
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
[JTC] Invalidate empty trajectory messages #902
[JTC] Invalidate empty trajectory messages #902
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #902 +/- ##
==========================================
- Coverage 47.71% 47.47% -0.24%
==========================================
Files 41 41
Lines 3871 3865 -6
Branches 1833 1818 -15
==========================================
- Hits 1847 1835 -12
- Misses 751 768 +17
+ Partials 1273 1262 -11
Flags with carried forward coverage won't be shown. Click here to find out more.
|
joint_trajectory_controller/test/test_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
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.
LGTM. Thanks for the change
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.
Looking good to me, just a small proposal to rename test for clarity.
Maybe I tend to have tooooooooo long test names lately, but this brings clarity what is tested.
/** | ||
* @brief invalid_message_nonzero_vel Test invalid velocity at trajectory end | ||
*/ | ||
TEST_P(TrajectoryControllerTestParameterized, invalid_message_nonzero_vel) |
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.
Just a bit more clarity.
TEST_P(TrajectoryControllerTestParameterized, invalid_message_nonzero_vel) | |
TEST_P( | |
TrajectoryControllerTestParameterized, | |
expect_invalid_when_message_with_nonzero_end_velocity_and_when_param_false) |
joint_trajectory_controller/test/test_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
fed4ea8
to
fa9d013
Compare
fa9d013
to
df699c0
Compare
(cherry picked from commit 99fadce)
(cherry picked from commit 99fadce)
Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 2. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](docker/login-action@v1...v2) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
I introduced a bug with #567: If an empty trajectory (no points) is received with
allow_nonzero_velocity_at_trajectory_end=true
thentrajectory.points.back()
is undefined behavior and may result in a segfault.I added now a check to skip empty trajectories. Or is there a point for accepting them?
Trajectory::sample()
will return false with an empty trajectory.ros2_controllers/joint_trajectory_controller/src/trajectory.cpp
Lines 68 to 73 in 999eae5