-
Notifications
You must be signed in to change notification settings - Fork 120
Fixes eager interface claiming bug in franka_hardware #124
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: humble
Are you sure you want to change the base?
Conversation
fedebda
to
3e56614
Compare
3e56614
to
49976e0
Compare
if (after_slash == interface_type) { | ||
if (interface_type != "position" && interface_type != "velocity" && | ||
interface_type != "effort" && interface_type != "acceleration") { | ||
return true; |
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 is very hardcoded.
What do you actually want to achieve?
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.
On humble
today, the hardware interface assumes every hardware plugin loaded by the controller manager is a FrankaHardwareInterface
owned resource. This is often not true; for example, if a custom hardware (gripper, extra joints etc.) is loaded in the same controller manager. As a result, if you try to launch two separate hardware interfaces in the same controller manager, the FrankaHardwareInterface
crashes.
The FrankaHardwareInterface
allows for a subset of the standard interfaces: position
, velocity
, acceleration
, and effort
. The FrankaHardwareInterface
also includes non-standard interface names, e.g. 1/cartesian_pose
.
This PR first checks if the hardware interface is not one of the standard interfaces supported by the class. If not, it assumes (as it does on main
) that the interface is owned by the class. If the interface is a standard interface, then it checks that the "joint" part of the interface name is a joint owned by the class.
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.
@AndreasKuhner do you have any thoughts on allowing for this functionality? Regardless of the hard-coding of the interface names, I think this is critical functionality for users. Should I replace "position"
with hardware_interface::HW_IF_POSITION
?
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 think for a custom solution it works. But for our 'bigger' picture, it would need to resolve a few more issues... But I didn't have much time so far to investigate and see what that exactly means 😓
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.
Would it be possible to merge this, or a similar PR? The behavior change is very important for users running multiple hardware types in one controller manager (which I understand to be a common use case in ros2_control
).
Closes #123
This PR matches joint name and interface name when preparing command mode switching. This allows multiple hardware interfaces (non-Franka) to be loaded alongside Franka hardware in a single
ros2_control_node
.