Skip to content
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

SRC-4962 Add command effort type #115

Open
wants to merge 3 commits into
base: noetic-devel
Choose a base branch
from

Conversation

mykolasjuraitis
Copy link
Contributor

Proposed changes

Add command effort type. It allows controllers to indicate type of effort commands for actuators.

Checklist

If the task is applicable to this pull request (see applicability criteria in brackets), make sure it is completed before checking the corresponding box. Otherwise, tick the box right away. Make sure that ALL boxes are checked BEFORE the PR is merged.

  • Manually tested that added code works as intended (if any functional/runnable code is added).
  • Added automated tests (if a new class is added (Python or C++), interface of that class must be unit tested).
  • Tested on real hardware (if the changed or added code is used with the real hardware).
  • Added documentation (For any new feature, explain what it does and how to use it. Write the documentation in a relevant space, e.g. Github, Confluence, etc.)

@mykolasjuraitis mykolasjuraitis requested review from toliver and a team as code owners July 1, 2021 12:58
{
}

bool enable_; //!< Enable this actuator
double effort_; //!< Force to apply (in Nm)
double effort_; //!< Effor to apply, unit depends on effort_command_type_ field
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in the comment "effor"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in fa9de9e.

double effort_; //!< Effor to apply, unit depends on effort_command_type_ field
EffortCommandType effort_command_type_; //!< Type of effort in effort_ field

void set_effort_command(double effort, EffortCommandType effort_command_type)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a set method? None of the other fields have one.
Maybe it's better to keep the style uniform?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idea was for all new code to use setter method because both fields should be set at the same time. Happy to remove it.

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.

2 participants