Skip to content

Conversation

@christophfroehlich
Copy link
Contributor

@christophfroehlich christophfroehlich commented Apr 8, 2023

As suggested by @bmagyar, the new trajectory should be even ignored if the last velocity point is nonzero.

  • This is valid for both interfaces (topic + actions).
  • I think there might be use-cases, where this is intentionally (maybe receiving topics from a MPC with moving horizon, where the end of the trajectory is not a steady state). Therefore, I added a parameter to be able to deactivate this behavior. To avoid breaking changes, I deactivated this by default now but give a deprecation warning if allow_nonzero_velocity_stop==true.

I also added a test for that, please review #603 first.

@christophfroehlich christophfroehlich changed the title Hold the position after the goal was reached successfully [JTC] Hold the position after the goal was reached successfully Apr 8, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #567 (ff3096c) into master (e7f9962) will decrease coverage by 3.31%.
The diff coverage is 26.60%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master     #567      +/-   ##
==========================================
- Coverage   35.78%   32.48%   -3.31%     
==========================================
  Files         189        7     -182     
  Lines       17570      665   -16905     
  Branches    11592      357   -11235     
==========================================
- Hits         6287      216    -6071     
+ Misses        994      157     -837     
+ Partials    10289      292    -9997     
Flag Coverage Δ
unittests 32.48% <26.60%> (-3.31%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ontroller/test/test_load_diff_drive_controller.cpp 12.50% <0.00%> (ø)
diff_drive_controller/src/odometry.cpp 42.16% <11.11%> (ø)
diff_drive_controller/src/speed_limiter.cpp 46.55% <11.11%> (ø)
...ive_controller/test/test_diff_drive_controller.cpp 17.62% <12.08%> (ø)
...troller/include/diff_drive_controller/odometry.hpp 20.00% <20.00%> (ø)
...iff_drive_controller/src/diff_drive_controller.cpp 39.22% <35.50%> (ø)
...de/diff_drive_controller/diff_drive_controller.hpp 100.00% <100.00%> (ø)

... and 189 files with indirect coverage changes

@destogl
Copy link
Member

destogl commented Apr 10, 2023

As suggested by @bmagyar, the new trajectory should be even ignored if the last velocity point is nonzero.

I don't agree with this at all. If we have velocity only input, we want to continue moving between trajectories. This is not so unusual scenario, e.g., when we have joystick input. I would rather like to see a timeout if we have velocity-only input to stop the input.

@christophfroehlich
Copy link
Contributor Author

Ok, I did not think of using JTC with Joystick, but rejecting it always did not seem to make sense for me too.
So you mean we should even not hold the position automatically but only after some timeout reached?

@destogl
Copy link
Member

destogl commented Apr 11, 2023

So you mean we should even not hold the position automatically but only after some timeout reached?

Exactly, I think we want to avoid run away if only velocity is used.

@christophfroehlich
Copy link
Contributor Author

now I'm confused :D maybe we should discuss this in the next WG meeting
I think there are different use-cases, and you have others in mind than I do..

@BarisYazici
Copy link

any update merging this PR?

@christophfroehlich
Copy link
Contributor Author

We recently decided to merge several smaller changes (#567 #558 and some optional time-out for topic interface) for JTC into a feature branch, test them thoroughly together, and merge them then together into master.
I fear that this will take some more weeks to happen.

@christophfroehlich christophfroehlich changed the base branch from master to jtc-features May 8, 2023 17:47
@christophfroehlich
Copy link
Contributor Author

christophfroehlich commented May 8, 2023

@BarisYazici you could help out by reviewing #558 and this PR. I think everyone can do this without special permissions (goto Files changed -> Review Changes on top right corner)

@christophfroehlich christophfroehlich changed the title [JTC] Hold the position after the goal was reached successfully [JTC] Reject trajectories with nonzero terminal velocity May 11, 2023
@christophfroehlich
Copy link
Contributor Author

I've split this PR into two, the more important one is #608

@destogl
Copy link
Member

destogl commented Jun 2, 2023

I've split this PR into two, the more important one is #608

@christophfroehlich in which order should this be merged?

@christophfroehlich
Copy link
Contributor Author

the order listed in #607 would be fine

@mergify
Copy link
Contributor

mergify bot commented Jun 20, 2023

This pull request is in conflict. Could you fix it @christophfroehlich?

1 similar comment
@mergify
Copy link
Contributor

mergify bot commented Jun 26, 2023

This pull request is in conflict. Could you fix it @christophfroehlich?

@christophfroehlich
Copy link
Contributor Author

The failing test is not related to this PR, but shows the flakiness of the JTC tests 😕

@bmagyar bmagyar merged commit 811ae4d into ros-controls:jtc-features Jul 3, 2023
christophfroehlich added a commit to christophfroehlich/ros2_controllers that referenced this pull request Jul 17, 2023
…s#567)

* Reject receiving trajectory of last velocity point is non-zero

* Update docs

* Add tests

* Change to parameterized test

* Rename parameter

* not true -> false

---------

Co-authored-by: Bence Magyar <[email protected]>
christophfroehlich added a commit to christophfroehlich/ros2_controllers that referenced this pull request Jul 17, 2023
…s#567)

* Reject receiving trajectory of last velocity point is non-zero

* Update docs

* Add tests

* Change to parameterized test

* Rename parameter

* not true -> false

---------

Co-authored-by: Bence Magyar <[email protected]>
bmagyar added a commit that referenced this pull request Jul 17, 2023
* Reject receiving trajectory of last velocity point is non-zero

* Update docs

* Add tests

* Change to parameterized test

* Rename parameter

* not true -> false

---------

Co-authored-by: Bence Magyar <[email protected]>
mergify bot pushed a commit that referenced this pull request Jul 17, 2023
* Reject receiving trajectory of last velocity point is non-zero

* Update docs

* Add tests

* Change to parameterized test

* Rename parameter

* not true -> false

---------

Co-authored-by: Bence Magyar <[email protected]>
(cherry picked from commit 99b67d7)
mergify bot pushed a commit that referenced this pull request Jul 17, 2023
* Reject receiving trajectory of last velocity point is non-zero

* Update docs

* Add tests

* Change to parameterized test

* Rename parameter

* not true -> false

---------

Co-authored-by: Bence Magyar <[email protected]>
(cherry picked from commit 99b67d7)
@christophfroehlich christophfroehlich deleted the jtc_hold_on_success branch July 25, 2023 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants