Hello,
I am trying to basically set the speed of a motor through an esp32 which is connected to the motor’s ESC. According to ESC documentation, it should send a value <= 2048 to subject ID 6152 or write to service ID 256 the value<=2048 to its register ( setThrottle = 10H ).
I am trying my best to implement it without any results so far. I don’t know how to start with DSDL definitions seems nothing fit in my application.
Cyphal library examples don’t have reg/udral only Standard regulated identifiers (namespace uavcan
) GitHub - OpenCyphal/public_regulated_data_types: Regulated DSDL definitions for Cyphal (standard and third-party) .
I don’t know if other ESCs work like that, but is very important to have access to all registers of the ESC with service ID 256.
I would appreciate any help, especially with .ino code.
The described protocol has nothing to do with Cyphal or DroneCAN.
Hello Pavel ,
Thank you for your fast response.
Are you sure about that?
It mentions it clearly and I run the Heartbeat example works great with the ESC .
I believe I just need to set the PORT_ID variable either on ArduinoUAVCAN .publish or .request , and then send the msg somehow.
At one similar example at UAVCAN I saw about reg has “using namespace reg::drone::service::battery;” which classes requests to set up a PORT_ID like that “uc.subscribe<SourceTs_0_1<SOURCETS_PORT_ID>>(onSourceTs_0_1_Received);”
UAVCAN BMS example
-
256, 6152, 6153, 6154 are not a valid fixed port-ID in Cyphal or DroneCAN
-
In both Cyphal and DroneCAN, application-layer protocols are defined in terms of data structures, which in turn are defined using DSDL. The DSDL of Cyphal and DroneCAN is similar but not exactly the same.
-
The provided serialization logic as explained in the document does not match that of Cyphal or DroneCAN.
-
This is not true:
This could be true if the data types were listed in GitHub - OpenCyphal/public_regulated_data_types: Regulated DSDL definitions for Cyphal (standard and third-party), but they are not.
I recommend you request clarifications from the manufacturer. We would be happy to assist if they consulted with us.
- I have no clue, they seem to know what they are doing they have full documentation about it .
I am uploading it here .
SquareWaveESCCyphalCANCommunicationProtocol-2 (2).pdf (1.8 MB)
I understand that, but I should be able to use Non-standard regulated identifiers (namespace reg
) for those IDs.
I don’t believe that the manufacturer will help me, they will probably tell me to use ArduPilot which I think supports CyphalCAN according to their FAQ (edit: wrong it doesn’t ) . The manufacturer called MAD Motors site .
The ESC I have here .
DSDL has some definitions for actuators. Is there any example on the web / community I can try ?
I am thinking of just setting the port IDs as it says then add data and use publish function .
For example I see has some files like Scalar , Status , Vectors, could any of that possibly help me out ?
This is expressly prohibited by the Specification. If one is releasing a product for the general market, they must publish their data types to the public regulated data types repository. It doesn’t take more than a few clicks of the button to do that, so there is really no excuse not to. But even that is not the most serious deficiency of this product.
Consider switching to another supplier.