Robotics StackExchange | Archived questions

Why should we use EffortJointInterface as hardware_interface for transmission in URDF?

Reading the urdf/Transmission documentation, I am confused by the following statement:

<hardwareInterface> (one or more occurrences)

Specifies a supported joint-space hardware interface. Note that the value of this tag should be EffortJointInterface when this transmission is loaded in Gazebo and hardware_interface/EffortJointInterface when this transmission is loaded in RobotHW.

To me this reads as if we are forced to use EffortJointInterface when working with Gazebo and hardware_interface/EffortJointInterface when working with real robot hardware. However, I know that there are other hardware interfaces, inheriting also from CommandJointInterface such as PositionJointInterface and VelocityJointInterface.

Could someone please clarify why we should use EffortJointInterface when using the transmission tag in URDF?

Asked by fjp on 2020-03-12 08:51:11 UTC

Comments

you don't have to use EffortJointInterface, I have in fact used VelocityJointInterface in a project of mine that is driving around just fine. I think the piece that you're quoting is written unclearly and should be read more as:

Note that the value of this tag should be [Whatever interface you're using] when this transmission is loaded in Gazebo and hardware_interface/[Whatever interface you're using] when this transmission is loaded in RobotHW.

I'm open to the suggestion of something else than [Whatever interface you're using]

Asked by Joe28965 on 2020-03-12 08:58:10 UTC

Thanks @Joe28965 confirming my assumption. However, does this mean that we have to use two different urdf/xacro files? One for simulation with gazebo and another one when working with real robot hw?

Asked by fjp on 2020-03-12 09:01:26 UTC

well strangely enough, the project I used VelocityJointInterface in was in Gazebo, and I just checked and it's written there as hardware_interface/VelocityJointInterface so I'm not even sure what's meant by that whole ordeal

Asked by Joe28965 on 2020-03-12 09:05:48 UTC

Thanks again for making this clear. Then, maybe the documentation also missed to include the hardware_interface/ part. Or maybe doesn't matter as I don't know where the value of this tag is even checked? Is your implementation public? If so could you please provide a reference? As the documentation on this topic and ros_control in general is quite confusing.

Asked by fjp on 2020-03-12 09:08:52 UTC

my implementation is not public, I'm afraid (not my call). I agree with you that ros_control is quite confusing and I do not think I grasp it well enough to be able to explain to somebody else, or even if my way is correct or just a haphazard mess. This might at least help you to create the 'motors' to write the velocities from ros_control to

Asked by Joe28965 on 2020-03-12 09:17:02 UTC

From the section Add transmission elements to a URDF it seems that only effort interfaces are implemented in the gazebo_ros_control plugin:

Currently only effort interfaces are implemented. (feel free to add more)

Maybe this means that using something else defaults back to EffortJointInterface

Asked by fjp on 2020-03-12 09:41:12 UTC

that tutorial was written for Gazebo 1.9+ (as seen in the top right corner). My guess would be that this might be outdated

Asked by Joe28965 on 2020-03-12 09:49:51 UTC

I see that in this Github link all the interfaces are implemented and as @joe28965 said, the tutorial might be outdated! Correct me if I'm wrong! Thanks!

Asked by pmuthu2s on 2020-03-13 14:00:33 UTC

Thank you @pmuthu2s for the reference.

Asked by fjp on 2020-03-13 18:34:52 UTC

Answers