UniversalRobots / Universal_Robots_ROS2_Driver

Universal Robots ROS2 driver supporting CB3 and e-Series
BSD 3-Clause "New" or "Revised" License
436 stars 227 forks source link

Incorrect state interface name in error message #328

Closed stephanie-eng closed 2 years ago

stephanie-eng commented 2 years ago

The error messages for having an incorrect state interface for all state interfaces say that position is expected for the state interfaces. The velocity and effort state interfaces should probably say that velocity/effort is expected instead of position.

https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/blob/ff3517dff7bd69fafd755b07b6fecc31b0a3ebc5/ur_robot_driver/src/hardware_interface.cpp#L109-L120

fmauch commented 2 years ago

URPositionHardwareInterface is the name of the class and therefore, the reference in the logger is not wrong. I agree that this class naming is not ideal, though.

stephanie-eng commented 2 years ago

@fmauch No, I'm not referring to the class name, I mean for the error this line in the error message:

https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/blob/ff3517dff7bd69fafd755b07b6fecc31b0a3ebc5/ur_robot_driver/src/hardware_interface.cpp#L112

To be

joint.state_interfaces[1].name.c_str(), hardware_interface::HW_IF_VELOCITY);

And similar for effort

fmauch commented 2 years ago

Ah, thanks for clarifying. You're absolutely right!