-
Notifications
You must be signed in to change notification settings - Fork 292
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
[JointTrajectoryController] Add velocity-only command option for JTC with closed loop controller #239
[JointTrajectoryController] Add velocity-only command option for JTC with closed loop controller #239
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.
This looks good. Can you add some tests?
joint_trajectory_controller/src/joint_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
joint_trajectory_controller/src/joint_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
joint_trajectory_controller/src/joint_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
I can. I will follow the currently existing tests in the jtc package and add one to test velocity interface. |
Maybe you are lucky and can add simply a new parameterized test. Check the end of the file (before the last test). Last test should also be changed because it will fail if VELOCITY interface is enabled. |
cd44621
to
497c3e3
Compare
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.
It looks good, just some minor comment to polish things
joint_trajectory_controller/src/joint_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
joint_trajectory_controller/include/joint_trajectory_controller/joint_trajectory_controller.hpp
Outdated
Show resolved
Hide resolved
joint_trajectory_controller/include/joint_trajectory_controller/joint_trajectory_controller.hpp
Outdated
Show resolved
Hide resolved
joint_trajectory_controller/include/joint_trajectory_controller/joint_trajectory_controller.hpp
Outdated
Show resolved
Hide resolved
joint_trajectory_controller/src/joint_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
joint_trajectory_controller/src/joint_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
joint_trajectory_controller/src/joint_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
joint_trajectory_controller/src/joint_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
joint_trajectory_controller/src/joint_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
9e695fb
to
992608a
Compare
992608a
to
ffaf028
Compare
@destogl what is the decision with this? |
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.
This looks fine! thanks!
|
||
if (traj_controller_->get_has_velocity_command_interface()) | ||
{ | ||
EXPECT_GT(0.0, joint_vel_[0]); |
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.
Does this mean that velocity can/should be smaller then 0
?
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.
@destogl The idea was to set jumbled order of joint names and to set velocity with a wrong sign. The test is initialized, and the commands and states are set to zero. Here I want joints to go from {0.0, 0.0, 0.0} to {1.0, 2.0, 3.0} with velocity {-0.1, -0.1, -0.1} and if the velocity command interface is active, I know that PID should revert these velocity values into positive ones.
@bmagyar what do you think about it?
joint_trajectory_controller/src/joint_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
joint_trajectory_controller/src/joint_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
joint_trajectory_controller/test/test_trajectory_controller.cpp
Outdated
Show resolved
Hide resolved
joint_trajectory_controller/test/test_trajectory_controller_utils.hpp
Outdated
Show resolved
Hide resolved
joint_trajectory_controller/test/test_trajectory_controller_utils.hpp
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.
I still approve this after @bmagyar's changes. We should only clarify if we should reset initial velocity to 0.0 or to current velocity of the hardware.
joint_trajectory_controller/src/joint_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.
@bmagyar you can go with merge
Introduce velocity-only command interface for
JointTrajectoryController
and extend tests for its usage.