# ESC support in UAVCAN v1

**URL:** <https://forum.opencyphal.org/t/esc-support-in-uavcan-v1/1130>\
**Category:** Applications & Usage\
**Created:** [February 18, 2021, 3:32pm UTC](https://forum.opencyphal.org/t/esc-support-in-uavcan-v1/1130 "2021-02-18T15:32:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![romain145](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/romain145/32/797_2.png) [@romain145](https://forum.opencyphal.org/u/romain145)\
**Post date:** [February 18, 2021, 3:32pm UTC](https://forum.opencyphal.org/t/esc-support-in-uavcan-v1/1130/1 "2021-02-18T15:32:15Z")

</div>

Hi,  
I have some questions about supporting an ESC with UAVCAN v1.

This document is a good starting point:

> <https://github.com/UAVCAN/public_regulated_data_types/blob/master/reg/drone/service/actuator/esc/_.0.1.uavcan>

There are no regulated data types specific to ESCs.  
How to send commands to the ESC?  
Commands would be setpoints like: speed, torque, duty etc…  
Configuration parameters are also required to set maximum speed, current, acceleration, etc…

Are there types defined somewhere else, or do they need to be defined for ESCs? In which case I’d be happy to help.  
Thanks

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [February 18, 2021, 8:59pm UTC](https://forum.opencyphal.org/t/esc-support-in-uavcan-v1/1130/2 "2021-02-18T20:59:37Z")

</div>

The document you referenced is the ESC network service specification you are looking for. It is not yet stable (it’s v0.1 at the moment), but it is complete and there is a chance that it will make it to v1.0 with no substantial changes.

> [@romain145](#):
>
> There are no regulated data types specific to ESCs.  
> How to send commands to the ESC?  
> Commands would be setpoints like: speed, torque, duty etc…

The document has a diagram that is intended to explain how to implement and use the service:

 

```auto
# SUBJECT
# NAME SUBJECT TYPE SUBJECT-ID
# +----------------+
# | Controller |---------+------------+----... setpoint reg.drone.service.actuator.common.sp.* S
# | |-------+-)----------+-)----... readiness reg.drone.service.common.Readiness S+1
# +----------------+ | | | |
# ^ ^ ^ ^ ^ ^ ^ ^ v v v v
# | | | | | | | | +---------+ +---------+
# | | | | | | | | |Drive i=0| |Drive i=1| ...
# | | | | | | | | +---------+ +---------+
# | | | | | | | | | | | | | | | |
# | | | | | | | +-----+ | | | | | | | feedback reg.drone.service.actuator.common.Feedback S+(i+1)*5+1
# | | | | | | +---------+ | | | | | | status reg.drone.service.actuator.common.Status S+(i+1)*5+2
# | | | | | +-------------+ | | | | | power reg.drone.physics.electricity.PowerTs S+(i+1)*5+3
# | | | | +-----------------+ | | | | dynamics reg.drone.physics.dynamics.rotation.PlanarTs S+(i+1)*5+4
# | | | | | | | |
# | | | +---------------------------+ | | |
# | | +-------------------------------+ | |
# | +-----------------------------------+ |
# +---------------------------------------+

```

 

For example, if you need to publish a setpoint for a group of six ESC, you publish a message of type [`reg.drone.service.actuator.common.sp.Vector6.0.1`](https://github.com/UAVCAN/public_regulated_data_types/blob/master/reg/drone/service/actuator/common/sp/Vector6.0.1.uavcan); if you want RPM and such, you subscribe to six subjects (one per ESC) of type [`reg.drone.physics.dynamics.rotation.PlanarTs.0.1`](https://github.com/UAVCAN/public_regulated_data_types/blob/master/reg/drone/physics/dynamics/rotation/PlanarTs.0.1.uavcan); and so on.

It is also possible to apply constraints on acceleration, speed, and torque, but for that, you will need to also support the Servo service (it is very similar to ESC).

> [@romain145](#):
>
> Configuration parameters are also required to set maximum speed, current, acceleration, etc…

Configuration parameters are currently not regulated by DS-015 (neither they were in v0), but this may change at some point in the future if there is interest.
