-
Notifications
You must be signed in to change notification settings - Fork 364
[Transmissions] Add force
and current
interfaces
#2588
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
base: master
Are you sure you want to change the base?
[Transmissions] Add force
and current
interfaces
#2588
Conversation
force
and current
interfaces
3bd5b9d
to
d6a2549
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2588 +/- ##
==========================================
- Coverage 89.45% 89.42% -0.03%
==========================================
Files 147 147
Lines 16636 16752 +116
Branches 1400 1408 +8
==========================================
+ Hits 14881 14980 +99
- Misses 1218 1227 +9
- Partials 537 545 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
std::vector<JointHandle> joint_effort_; | ||
std::vector<JointHandle> joint_torque_; | ||
std::vector<JointHandle> joint_force_; | ||
std::vector<JointHandle> joint_curret_; |
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.
std::vector<JointHandle> joint_curret_; | |
std::vector<JointHandle> joint_current_; |
joint_effort_ = get_ordered_handles(joint_handles, joint_names, hardware_interface::HW_IF_EFFORT); | ||
joint_torque_ = get_ordered_handles(joint_handles, joint_names, hardware_interface::HW_IF_TORQUE); | ||
joint_force_ = get_ordered_handles(joint_handles, joint_names, hardware_interface::HW_IF_FORCE); | ||
joint_curret_ = |
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.
joint_curret_ = | |
joint_current_ = |
if ( | ||
joint_position_.size() != 2 && joint_velocity_.size() != 2 && joint_effort_.size() != 2 && | ||
joint_torque_.size() != 2 && joint_absolute_position_.size() != 2) | ||
joint_torque_.size() != 2 && joint_force_.size() != 2 && joint_curret_.size() != 2 && |
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.
joint_torque_.size() != 2 && joint_force_.size() != 2 && joint_curret_.size() != 2 && | |
joint_torque_.size() != 2 && joint_force_.size() != 2 && joint_current_.size() != 2 && |
joint_effort_.size() != actuator_effort_.size() && | ||
joint_torque_.size() != actuator_torque_.size() && | ||
joint_force_.size() != actuator_force_.size() && | ||
joint_curret_.size() != actuator_current_.size() && |
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.
joint_curret_.size() != actuator_current_.size() && | |
joint_current_.size() != actuator_current_.size() && |
} | ||
|
||
auto & act_cur = actuator_current_; | ||
auto & joint_cur = joint_curret_; |
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.
auto & joint_cur = joint_curret_; | |
auto & joint_cur = joint_current_; |
} | ||
|
||
auto & act_cur = actuator_current_; | ||
auto & joint_cur = joint_curret_; |
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.
auto & joint_cur = joint_curret_; | |
auto & joint_cur = joint_current_; |
to_string(get_names(joint_effort_)), to_string(get_names(actuator_effort_)), | ||
to_string(get_names(joint_torque_)), to_string(get_names(actuator_torque_)), | ||
to_string(get_names(joint_force_)), to_string(get_names(actuator_force_)), | ||
to_string(get_names(joint_curret_)), to_string(get_names(actuator_current_)), |
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.
to_string(get_names(joint_curret_)), to_string(get_names(actuator_current_)), | |
to_string(get_names(joint_current_)), to_string(get_names(actuator_current_)), |
if ( | ||
joint_position_.size() != 2 && joint_velocity_.size() != 2 && joint_effort_.size() != 2 && | ||
joint_torque_.size() != 2 && joint_absolute_position_.size() != 2) | ||
joint_torque_.size() != 2 && joint_force_.size() != 2 && joint_curret_.size() != 2 && |
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 means that the handles are mandatory, and not optional. Does this make sense here? Shouldn't this plugin be more general?
Follow up on #2310.
Same concept and approach, only this time we add force and current interfaces.
As before, adding these two new interfaces is backwards compatible. If force and current interfaces are not available then the contents from this PR do nothing.