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 andhardware_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?
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]
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?
well strangely enough, the project I used
VelocityJointInterface
in was in Gazebo, and I just checked and it's written there ashardware_interface/VelocityJointInterface
so I'm not even sure what's meant by that whole ordealThanks 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 andros_control
in general is quite confusing.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 fromros_control
toFrom the section Add transmission elements to a URDF it seems that only effort interfaces are implemented in the gazebo_ros_control plugin:
Maybe this means that using something else defaults back to
EffortJointInterface
that tutorial was written for Gazebo 1.9+ (as seen in the top right corner). My guess would be that this might be outdated
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!