-
Notifications
You must be signed in to change notification settings - Fork 26
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
Extended python robot interfaces #36
Merged
diegoferigo
merged 19 commits into
robotology-legacy:devel
from
diegoferigo:feature/new_robot_interfaces
Sep 19, 2019
Merged
Extended python robot interfaces #36
diegoferigo
merged 19 commits into
robotology-legacy:devel
from
diegoferigo:feature/new_robot_interfaces
Sep 19, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diegoferigo
force-pushed
the
feature/new_robot_interfaces
branch
3 times, most recently
from
September 17, 2019 08:30
94fe2cc
to
01f0beb
Compare
traversaro
approved these changes
Sep 17, 2019
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 only commented a bit the interfaces.
traversaro
reviewed
Sep 17, 2019
diegoferigo
force-pushed
the
feature/new_robot_interfaces
branch
from
September 17, 2019 14:16
01f0beb
to
9e2e044
Compare
traversaro
approved these changes
Sep 17, 2019
traversaro
approved these changes
Sep 17, 2019
traversaro
approved these changes
Sep 17, 2019
diegoferigo
force-pushed
the
feature/new_robot_interfaces
branch
3 times, most recently
from
September 18, 2019 13:16
a4422ba
to
1c54427
Compare
diegoferigo
force-pushed
the
feature/new_robot_interfaces
branch
2 times, most recently
from
September 19, 2019 10:15
1657020
to
ccd50bc
Compare
to clarify that they are class objects
diegoferigo
force-pushed
the
feature/new_robot_interfaces
branch
from
September 19, 2019 11:37
ccd50bc
to
a9d21fa
Compare
Merging as soon as CI goes green |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR mainly splits and extends the former
base.Robot
interface as previously discussed in #33.In particular, these are the new interfaces introduced in 3302e17:
RobotABC
: common abstract base class shared by all implementations. It only provides avalid()
method.RobotBaseFrame
: set and get data related to the robot base, which can be either fixed or floating.RobotContacts
: get data related to the active contacts with the environment. It is quite simple for simulated robots, more challenging for real ones.RobotJoints
: set and get joint-related data. It is a small extension of what was already implemented in the previous unified interface.RobotLinks
: get link-related data.At the moment the robots simulated in Gazebo and loaded through
FactoryRobot
have not been update with the new methods. A dummy implementation is used instead 6fc9a09. A full implementation would require some work in C++, porting the same interfaces into thegympp
package. I will do it in a future PR.Few other new features have been included in this PR:
robot_features
: decorator that add a class method to unify the verification that a robot object inherits from all the interfaces required for the computation. It can be used for example for the Tasks which might not require all the interfaces from a robot implementation. You can see a typical usage in 056702e._create_spaces()
method. It is useful for readability to divide this logic and store it in a separated method. Depending on the runtime, its execution can be deferred to a later stage than class initialization.To conclude, I have a lot of new features pending (nice ones!). Since I took advantage to refactor many components of the project, I temporarily created a
devel
branch and will push everything there. As soon as tests and functionality will be fully restored, I plan to merge to master and create the first release.