-
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] Accept larger number of joints
than command_joints
#809
base: master
Are you sure you want to change the base?
[JTC] Accept larger number of joints
than command_joints
#809
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #809 +/- ##
==========================================
+ Coverage 71.86% 72.61% +0.75%
==========================================
Files 41 41
Lines 3650 3652 +2
Branches 1794 1780 -14
==========================================
+ Hits 2623 2652 +29
+ Misses 707 686 -21
+ Partials 320 314 -6
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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
This pull request is in conflict. Could you fix it @christophfroehlich? |
9eae4ad
to
6aa0b2a
Compare
fa521ca
to
3369aae
Compare
3369aae
to
4b577b4
Compare
4b577b4
to
23146d8
Compare
This pull request is in conflict. Could you fix it @christophfroehlich? |
This pull request is in conflict. Could you fix it @christophfroehlich? |
This pull request is in conflict. Could you fix it @christophfroehlich? |
This pull request is in conflict. Could you fix it @christophfroehlich? |
This pull request is in conflict. Could you fix it @christophfroehlich? |
This PR softens the condition that the number of
joints
andcommand_joints
have to be equal: JTC now supports having lesscommand_joints
thanjoints
.This gives the opportunity to track the state and error of passive joints, especially joints that are not
command_joints
but a degree-of-freedom of the physical system.As an example, see the cart-pole example in the following video (a pendulum on a cart). Now it is possible to send a swing-up trajectory of the pendulum including values of the cart and the pendulum joint, JTC will do the trajectory interpolation and publishes the full state including the desired values for the pendulum joint, but it finally only can command the cart-joint.
swingup_gh.mp4
This PR does not directly address passive joints being part of a closed-loop kinematic chain, i.e., joints not being a degree-of-freedom of the system. One could track the trajectory of all joints being part of the closed loop, but the kinematics need to be solved in the hardware interface, e.g., by means of a transmission interface.
A future PR will propose a possibility to implement different control laws than PID, e.g., a state-space controller, which is in fact necessary to control the pendulum from the example above.
More implementation details
command_joints
must be a subset ofjoints
if they don't have the same size.command_joints
. (seecheck_interface_names_with_command_joints
test)~/controller_state
topic uses a singlejoint_names
vector for all fields. Hence, entries of the output field being not included incommand_joints
will be NaN.This would break rqt_joint_trajectory_controller, I used now the required state interface instead of claimed hardware interfaces from the contoller_manager msg.