-
Notifications
You must be signed in to change notification settings - Fork 305
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
Extend interfaces melodic #395
Extend interfaces melodic #395
Conversation
31aa5e8
to
9e3e40e
Compare
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.
These changes should all be run through an auto-formatter. There are a lot of stylistic differences between the new changes and the rest of the codebase.
I realized while going through some of the comments I had were about established patterns. This is already a fairly large PR, so perhaps it makes more sense to stick with the established patterns and those changes should be pulled out into follow-ups (ie. replacing 0
with nullptr
, adding consts
all over the place, etc.)
hardware_interface/include/hardware_interface/actuator_state_interface.h
Outdated
Show resolved
Hide resolved
hardware_interface/include/hardware_interface/actuator_state_interface.h
Outdated
Show resolved
Hide resolved
hardware_interface/include/hardware_interface/actuator_state_interface.h
Outdated
Show resolved
Hide resolved
hardware_interface/include/hardware_interface/actuator_state_interface.h
Outdated
Show resolved
Hide resolved
hardware_interface/include/hardware_interface/internal/resource_manager.h
Outdated
Show resolved
Hide resolved
transmission_interface/include/transmission_interface/differential_transmission.h
Outdated
Show resolved
Hide resolved
transmission_interface/include/transmission_interface/transmission.h
Outdated
Show resolved
Hide resolved
transmission_interface/include/transmission_interface/transmission.h
Outdated
Show resolved
Hide resolved
transmission_interface/include/transmission_interface/transmission_interface_loader.h
Outdated
Show resolved
Hide resolved
transmission_interface/src/differential_transmission_loader.cpp
Outdated
Show resolved
Hide resolved
a7fbbd2
to
60d67db
Compare
@matthew-reynolds could you please give it another pass? I think it should be ready now |
60d67db
to
550190f
Compare
The feedback from the controller is way too slow to be used on an actual robot. A robot that had 15 rad.s^-2 on each wheel as an acceleration limit could not even reach 2 rad.s^-2 This is in line with ros_controllers#23
550190f
to
7e76196
Compare
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.
There's a breaking change in the DifferentialTransmission constructor that should be fixed up. Once that's fixed up, there are a couple of style nitpicks but LGTM.
Beyond the code itself, I've got a couple questions about the usages and need for these changes, but I suspect you've already thought them through and I'll understand better once some more documentation is present. Don't want to hold up the PR while I'm getting conceptually on the same page, since the code itself looks good.
We should definitely get some documentation going that explains:
effort
vstorque_sensor
andpos
vsabsolute_position
- The usage of the
JointModeHandle
(Once it's fleshed out) - What
ignore_transmission_for_absolute_encoders
does inDifferentialTransmission
and how the loader can read it
Also, for changelogs down the road, it should be pointed out that this mega-PR:
- Adds
absolute_position
andtorque_sensor
data types to JointStateHandle and ActuatorStateHandle, as well as the corresponding transformations to Transmissions - Changes the way velocity joint saturation limits are calculated (Now uses prev commanded vel rather than measured vel).
- Exposes raw data pointers in JointStateHandle and JointCommandHandle (Previously only in actuator handles)
- Adds a new JointModeHandle "for switching a hardware interface between different controller modes"
(Might be worth updating the PR description so that people reading this in the future don't need to go digging through comments)
Also, a final comment: Why torque_sensor
rather than torque
?
hardware_interface/include/hardware_interface/joint_mode_interface.h
Outdated
Show resolved
Hide resolved
hardware_interface/include/hardware_interface/joint_state_interface.h
Outdated
Show resolved
Hide resolved
transmission_interface/include/transmission_interface/differential_transmission_loader.h
Outdated
Show resolved
Hide resolved
* \pre Actuator, joint position and torque sensor vectors must have the same 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.
Could be missing something, but is there a reason we don't have the same "To call this method it is not required that all other data vectors contain valid data, and can even remain empty" blurb here?
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.
my mistake, fixed!
transmission_interface/include/transmission_interface/differential_transmission.h
Outdated
Show resolved
Hide resolved
transmission_interface/include/transmission_interface/simple_transmission.h
Outdated
Show resolved
Hide resolved
transmission_interface/include/transmission_interface/transmission.h
Outdated
Show resolved
Hide resolved
transmission_interface/src/differential_transmission_loader.cpp
Outdated
Show resolved
Hide resolved
hardware_interface/include/hardware_interface/joint_mode_interface.h
Outdated
Show resolved
Hide resolved
transmission_interface/include/transmission_interface/differential_transmission.h
Outdated
Show resolved
Hide resolved
7e76196
to
78112b9
Compare
For lack of a better alternative, this is how we try to show that this is a read-only value, not something ppl can use for commanding. |
78112b9
to
ebb481e
Compare
I think I did all the requested changes, back to you ;) |
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.
Thanks for reworking the new DifferentialTransmission
constructors, with that squared away looks good to me!
Looks good to merge, a couple tiny outstanding things:
- this comment about
actuatorToJointTorqueSensor()
's function comment was not answered - this and this comment were marked resolved but the code wasn't updated. Not a big deal, especially if we plan on running a formatter soonish.
Also, a final comment: Why torque_sensor rather than torque?
For lack of a better alternative, this is how we try to show that this is a read-only value, not something ppl can use for commanding.
Got it. Feels a bit inconsistent with absolute_pos
, since they're both read-only sensors, but absolute_position_sensor
is certainly quite wordy.
…djust tests Add pointer accessors for torque sensor and absoute position encoders
ebb481e
to
49512bf
Compare
The outstanding ones should be pushed, thanks for spotting them! |
👍 Looks great! |
Thanks a lot for the reviews! |
Looking back at this again: Did something change since pal-robotics-forks/ros_controllers#41 (comment)? From @adolfo-rt in that thread, Feb 2015:
I'm wondering if there has been further discussion since then that prompted the |
It wasn't an accident. After that conclusion, we also came to the realization that companies working with Suboptimal is better than no solution at all. |
Got it - Thanks for clarifying :) |
absolute_position
andtorque_sensor
data types toJointStateHandle
andActuatorStateHandle
, as well as the corresponding transformations toTransmission
sJointStateHandle
andJointCommandHandle
. Previously only available in actuator handles.JointModeHandle
for switching a hardware interface between different controller modes