OpenCyphal / specification

The Cyphal specification documents are maintained here.
https://opencyphal.org/specification
Creative Commons Attribution 4.0 International
41 stars 13 forks source link

Define and Utilize Domain-Specific Namespaces #3

Closed thirtytwobits closed 5 years ago

thirtytwobits commented 6 years ago

Domain-Specific Namespaces are sets of pre-defined messages/data-types for various types of Unmanned Autonomous Vehicles. To start with the standard should define the following DSNs:

thirtytwobits commented 6 years ago

I added this issue so we can capture debate but the more I think about it the less I feel like this is a useful proposal. For example, what do we do about types that are general to several of the domains? For example: a camera gimbal is something all of the imagined vehicle types might support. Along those lines it seems more like the differences would be outliers.

Another example: air data is pretty specific to aircraft but fast moving autonomous cars might use such a sensor.

kjetilkjeka commented 6 years ago

I like this idea. What I like about it tis that it attempts to make uavcan more suitable for general robotics or even simply just more general use. We should do so without sacrificing any niceness when used in flying robots (multicopters, planes, etc).

Let me first try to put words on what i found difficult when attempting to use uavcan for other things than flying robots:


To attempt to build further upon your suggestion I think we should also consider to split the core namespace in message types that are required for the protocol to work (GetNodeInfo, GetDataTypeInfo, NodeStatus, GlobalTimeSync, Panic, RestartNode + dynamic node ID stuff) and things that can be considered util (File, debug, etc). We should probably have (at least unofficially) stronger stability guarantee on the core stuff.

For example, what do we do about types that are general to several of the domains?

We will probably not be able to put everything in categories of domains. If we attempt to group functionality first, then we can extract out functionality only relevant for one domain. I would like to throw out the following as a basis for further discussion.

pavel-kirienko commented 6 years ago

I think we should also consider to split the core namespace in message types that are required for the protocol to work (GetNodeInfo, GetDataTypeInfo, NodeStatus, GlobalTimeSync, Panic, RestartNode + dynamic node ID stuff) and things that can be considered util (File, debug, etc).

There is only one thing that is required for the protocol to work: uavcan.protocol.NodeStatus; everything else is util, and I don't anticipate this to change. I don't think we should introduce an entirely new concept of core data types just for the sake of one data type.

A positive side effect of getting rid of DSDL signatures in the new specification is that now we're going to be able to move data types around while retaining backward compatibility. This should help with the upcoming restructuring of the standard data type definitions.

thirtytwobits commented 6 years ago

Your "ground_vehicle" example exposes more of my concern about my own proposal: i.e. many airplanes have wheels :)

While I think there's room to cleanup the "equipment" namespace what's most important about this issue is the need for the specification and implementations to allow for a vehicle system to configure only the standard types it wants and easily support custom types. Given the limited number of messages and services this capability is essential to the long-term utility of this specification.

As such I think there are three buckets that are obvious:

  1. NodeStatus – i.e. "core" since Pavel has pointed out that it is the only required message. This might be more clear if it did live in its own namespace.

  2. utility – Stuff like dynamic node allocation, debug, firmware update, etc. Most everything under "protocol" in v0. We should make it clear that this is a smorgasbord that a given vehicle system can choose from.

  3. equipment – Standard types we provide to support a COTS ecosystem. We should be clear that a vehicle system does not need to adhere to nor support these types to utilize the specification, its implementations, or the associated tools.

pavel-kirienko commented 6 years ago

I am inclined to agree with Scott – keeping domain-specific data type sets completely orthogonal would be challenging if not impossible. Therefore, as Scott said, we should focus on restructuring the existing set rather than adding domain-specific namespaces.

While I don't see much value in adding a dedicated new namespace for the sole required data type, if you both think that's useful we can do that. Preferably the name of the namespace should be self-explanatory to avoid introduction of new concepts into the specification. Perhaps required works? Or is core sufficiently clear?

Do we want to create a new namespace for COTS applications (aptly named cots) to contain non-equipment-specific data types, such as GlobalNavigationSolution? E.g. uavcan.cots.navigation.GlobalNavigationSolution, uavcan.cots.equipment.actuator.Command.

Looking at the quickly growing set of drastic differences compared to UAVCAN v0, I am beginning to think that it would be much easier to abandon backward compatibility with UAVCAN v0, and instead require nodes that must support both v0 and v1 to carry two independent implementations of the protocol, switching between them at runtime according to their configuration. This approach would enable v1 implementations to get rid of the no-longer-needed data type compatibility enforcement logic and avoid the standard data type set compatibilty issues.

pavel-kirienko commented 5 years ago

Closing as this question has lost relevance