Skip to content

Extend transmission urdf schema#19

Closed
Karsten1987 wants to merge 1 commit intomasterfrom
karsten/transmission_interface
Closed

Extend transmission urdf schema#19
Karsten1987 wants to merge 1 commit intomasterfrom
karsten/transmission_interface

Conversation

@Karsten1987
Copy link
Copy Markdown
Contributor

A first take on refining the transmission schema. It basically picks up the nomenclature from introduced in #10 to separate a robot hardware into actuators and sensors.

the hardware_interface tag takes an optional name (alternatively identifier to go on pair with the flexible joint state design doc) attribute which allows for a custom identifier to be chosen.

I've also removed details for the robot hardware because I think this part should live within #10.

<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<hardwareInterface>awesome_interface/FooJointInterface</hardwareInterface>
<role></role>
<actuator>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This updated version is a little too ad-hoc.

You gotta have joints and actuators. With names and all that which you forgot to add. Also, I added an example of simpletransmission here as this one only defines a 1-to-1 relationship, we can highlight additional sensors but let's not have multiple joints and actuators in it.

Here's a ref you can use to establish a more complex example: https://github.com/pal-robotics/tiago_robot/blob/kinetic-devel/tiago_description/urdf/arm/wrist.transmission.xacro#L28

The content of a `hardwareInterface` XML tag should match up with strings provided by `ros2_control` in the shape of familiar names:
`hardware_interface::PositionJointInterface, hardware_interface::VelocityJointInterface, hardware_interface::EffortJointInterface`.
By relying on strings internally in the framework but using them mostly through shared names, a standard nomenclature is kept all the while allowing custom extensions in an easy and transparent way.
Note the in the example above, since all names are merely strings, `awesome_interface/FooJointInterface` - a custom interface - can be used if it is provided by the `RobotHardware`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Note the..." sentence was supposed to highlight an important difference, let's keep it.

...
MyRobotHW : public RobotHardware<hardware_interface::PositionJointInterface, hardware_interface::VelocityJointInterface>
```
Based on the URDF snippet above, the instance of a robot hardware can be generated as described in the [hardware interface design doc](hardware_interface.md).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is largely misleading. The role of transmission parsing was never to set up an instance of robothw but to check whether a required transmission's requirements are met by the robothw which in this case serves as a HAL (hardware abstraction layer) and if it's green-lit, instantiate transmissions by "wiring" all relevant joint and actuator handles up.

However we provide a ton of tools for it and even reference (boilerplate) implementations for it, whoever implements ros2_control for their robot still holds the responsibility of setting up this HAL as that's territory we can't reasonably guess the details of.

I agree though that the content in this section is a bit of a braindump of mine.

Initially, controller and transmission loader checks could happen through a list of registered interfaces.
Once all requirements are there, this can also manifest in a few entries being added to the shared flexible joint state message instance, removing the need for a separate "registry" of interfaces.
The transmission parser is being used to set up and configure the robot hardware accordingly.
Refer to the design doc for more information.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you wanna reference another doc, please link it.

@bmagyar
Copy link
Copy Markdown
Member

bmagyar commented May 7, 2020

ping @Karsten1987 to move this over to a new design draft about a new URDF tag for ros_control

@Karsten1987 Karsten1987 deleted the karsten/transmission_interface branch June 10, 2020 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants