Zubax Myxa And Cyphal Integration

Greetings,

I am attempting to set up a PX4 to log data from a Zubax Myxa ESC running Telega 1.0 firmware, using Cyphal protocal. Pinging @PavelKirienko as requested from our email communication.

In brief, I want to use a different autopilot to send PWM commands to the Myxa ESC, and use the CAN1 port on the Myxa to send flight data (I.e. Voltage, Current, RPM, ESC Temp, and Demand Factor) to the PX4 for analysis post-flight. (This is only a workaround for initial testing, and is not intended for normal use).

I have the Myxa functioning correctly on the airframe and thrust stand, and I can subscribe to its various data topics through yakut for monitoring in a Linux terminal, so I believe the Myxa is set up appropriately.

The issue I am seeing occurs when I attempt to view the data from either the Pixhawk log files or from a Mavlink terminal. As far as I can determine, no ESC related topics appear in the “uorb top” list. When I used UAVCAN, esc_status provided the information I was looking for, but that does not appear here. What am I doing wrong?

In terms of my setup on PX4 and QGC, I am using the newest PX4 main with the cyphal fixes merged, and QGC v4.2.4.

My QGC Cyphal parameters are as follows:
Cyphal_Baud is set to 1000000
Cyphal_Enable is Enabled
Cyphal_ID is 1
UCAN1_BMS_ES_SUB is -1
UCAN1_UORB_GPS is -1
UCAN1_ESC_PUB is 1103

My Myxa uavcan ids are as follows:
uavcan.node.id: 3
uavcan.sub.readiness.id: 65535
uavcan.sub.setpoint_rat_torque.id: 1101
uavcan.sub.setpoint_velocity.id: 1102
uavcan.sub.setpoint_dynamics.id: 1103

uavcan.pub.dq.id: 1000
uavcan.pub.dynamics.id: 1001
uavcan.pub.power.id: 1002
uavcan.pub.temperature.id: 1003
uavcan.pub.feedback.id: 1004
uavcan.pub.status.id: 1005
uavcan.pub.compact.id: 1006

As a side note, the Cyphal/Px4 integration guide mentions modifying px4 settings through the Yukon interface, however when I start the slcan transport for the usb node connected to the PX4, it displays a blank monitor rather than listing published topics.

PS: I tested changing UCAN1_ESC_PUB to 1101 and 1102, each start moving the motor erratically without any input, so my assumption is that these were incorrect topics to be used in this field.

1 Like

Hi.

The issue I am seeing occurs when I attempt to view the data from either the Pixhawk log files or from a Mavlink terminal. As far as I can determine, no ESC related topics appear in the “uorb top” list. When I used UAVCAN, esc_status provided the information I was looking for, but that does not appear here. What am I doing wrong?

This happened because feedback is not yet implemented on the PX4 side. On the main branch it can only publish setpoint and readiness.

As a side note, the Cyphal/Px4 integration guide mentions modifying px4 settings through the Yukon interface, however when I start the slcan transport for the usb node connected to the PX4, it displays a blank monitor rather than listing published topics.

Do you mean that a PX4 node doesn’t appear or the node doesn’t show the list of topics? Have you tried Yukon with Myxa? I’ve just tried cuav v5+ on the main branch (319f3db) and it works as I expected.

I tested changing UCAN1_ESC_PUB to 1101 and 1102, each start moving the motor erratically without any input, so my assumption is that these were incorrect topics to be used in this field.

According to the Myxa manual you should choose one of setpoint topics. Only setpoint_velocity, setpoint_rat_torque and setpoint_rat_voltage have the same time as what we have in PX4 (Vector31). At that moment, PX4 scales setpoint in range from 0 to 8192 that is not what Myxa can expect. Should be fixed.
As it is said in the Cyphal/Px4 integration guide, at that moment udral.esc.0 register creates 2 publishers: setpoint with the corresponded id and readiness with setpoint id + 1, that is why Myxa interprets the input incorrectly.

I will open a draft PR on PX4 with mentioned and some more fixes and improvements to make it more compatible with Myxa and other ESC, so you will be able to track the progress.

1 Like

Thank you for the quick response!

That makes sense as to why I couldn’t view the feedback then.

I have it working correctly with Myxa. When I go through the same process with the PX4, Yukon can detect the usb connection and reads the PX4 correctly on the SLCAN tab.
image

When I start the transport nothing appears in the monitor window.

This would be much appreciated, thank you.

PX4 does not support the SLCAN protocol so this will not work. You will need a separate USB-CAN adapter, such as Zubax Babel, to connect to the network. Then you can use Yukon to modify the PX4 settings via Cyphal.

Hi Nex,

Was the draft PR created yet? I don’t any recent cyphal branches on PX4:main.

Thanks!

Hi. I’ve created it here: improve cyphal esc by PonomarevDA · Pull Request #21475 · PX4/PX4-Autopilot · GitHub

1 Like

Here’s a video demonstrating the process of setting up an ESC using Yukon: