Skip to content
This repository was archived by the owner on Dec 1, 2020. It is now read-only.

feature/PM-460-complete-odrive-python-interface #3

Merged
merged 8 commits into from
Jun 17, 2020

Conversation

JorisWeeda
Copy link
Contributor

Closes PM-460

Description

In order to successfully integrate the Odrive in the OS of the exoskeleton the functionalities which are now available in the iMotionCube should also be integrated in the Odrive Interface. This PR adds all the necessary parameters and functionalities to complete the Odrive interface.

Changes

  • Added all the required function
  • Added a type check to every function

@JorisWeeda JorisWeeda requested a review from Roelemans May 30, 2020 09:34
@JorisWeeda JorisWeeda requested a review from a team as a code owner May 30, 2020 09:34
@JorisWeeda JorisWeeda requested review from Olavhaasie and removed request for a team May 30, 2020 09:34
@property
def motor_error(self):
"""Return the axis specific error."""
return self._axis.motor.error

@property
def current_state(self):
"""Return the current state of the motor."""
Copy link
Contributor

Choose a reason for hiding this comment

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

What is included in the "current_state"? Is that an error state? Is that the motor position?

Copy link
Contributor Author

@JorisWeeda JorisWeeda Jun 4, 2020

Choose a reason for hiding this comment

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

current state is more or less an action state of the specified axis, this link should provide more information.

Copy link
Contributor Author

@JorisWeeda JorisWeeda Jun 5, 2020

Choose a reason for hiding this comment

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

I have added the states as well as all the possible modes as class dictionary variables. This way the operator can access these variables if necessary

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm perhaps add a comment/docstring explaining what kind of "modes" this can be or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added some small descriptive comments at the top to explain better what states and modes do.

@JorisWeeda JorisWeeda requested a review from Roelemans June 5, 2020 09:23
Copy link
Contributor

@Roelemans Roelemans left a comment

Choose a reason for hiding this comment

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

Two small questions (one on earlier comment)

@property
def motor_error(self):
"""Return the axis specific error."""
return self._axis.motor.error

@property
def current_state(self):
"""Return the current state of the motor."""
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm perhaps add a comment/docstring explaining what kind of "modes" this can be or something?

@JorisWeeda JorisWeeda requested a review from Roelemans June 9, 2020 08:50
@Olavhaasie Olavhaasie removed their request for review June 15, 2020 08:47
.travis.yml Outdated
@@ -43,7 +43,7 @@ jobs:
env: ROS_DISTRO=melodic CLANG_FORMAT_CHECK=file
- name: "flake8"
language: python
python: 3.7
python: 2.7
Copy link
Contributor

Choose a reason for hiding this comment

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

Wasn't ODrive code in python 3? :O

Choose a reason for hiding this comment

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

Yis 💁‍♂️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

odrive supports both python 3 and 2

@Roelemans Roelemans merged commit 4d00cd2 into master Jun 17, 2020
@Roelemans Roelemans deleted the feature/PM-460-complete-odrive-python-interface branch June 17, 2020 11:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants