flight_review icon indicating copy to clipboard operation
flight_review copied to clipboard

UAVCAN ESC Data Plots

Open keenanjohnson opened this issue 7 years ago • 13 comments

It would be nice if this review tool showed the data coming back from UAVCAN ESCs.

At minimum it should be:

  • Voltage
  • Current
  • Computed Power

keenanjohnson avatar Jun 11 '18 21:06 keenanjohnson

Could these values not get fed back to the general vehicle power which then is supported by flight review? Currently the general message does not support distinguishing motors but it might be worth to look into having a general message to capture this information and not specific to UAVCAN because other manufacturers might have similar requirements but different ESCs.

MaEtUgR avatar Jun 19 '18 13:06 MaEtUgR

Are you proposing summing the power? I think it is still quite helpful to see individual rotor data.

keenanjohnson avatar Jun 19 '18 17:06 keenanjohnson

That's true, summing up kills too much information. But a general ESC report topic for any ESCs that support feedback instead of one specialized to UAVCAN would still make sense.

You thought about https://github.com/PX4/Firmware/blob/master/msg/esc_status.msg right?

MaEtUgR avatar Jun 27 '18 11:06 MaEtUgR

No I was referring to the actual ESC Current Draw data which is only reported by CAN bus esc.

For example, something like the snippet below.

  # ESC Currents
  data_plot = DataPlot(data, plot_config, 'esc_status',
                       y_axis_label='Current (A)', title='Motor Currents',
                       plot_height='small', changed_params=changed_params,
                       x_range=x_range)
  data_plot.add_graph(['esc[0].esc_current'], colors3, ['mtr1'])
  data_plot.add_graph(['esc[1].esc_current'], colors3, ['mtr2'])
  data_plot.add_graph(['esc[2].esc_current'], colors3, ['mtr3'])
  data_plot.add_graph(['esc[3].esc_current'], colors3, ['mtr4'])
  plot_flight_modes_background(data_plot, flight_mode_changes, vtol_states)

  if data_plot.finalize() is not None: plots.append(data_plot)

keenanjohnson avatar Jun 27 '18 17:06 keenanjohnson

Perhaps we could only display that plot if the ESC type is CAN Bus?

keenanjohnson avatar Jun 27 '18 17:06 keenanjohnson

My main concern was adding another plot (it increases page load time). But since this topic only applies to tap_esc and uavcan drivers, I'm ok with it. Can you create a PR and change it so that it checks the esc count esc_count and only draws as many lines as there are ESCs?

bkueng avatar Jun 28 '18 06:06 bkueng

Yeah I'll work on that and have a PR in a few days.

keenanjohnson avatar Jul 02 '18 20:07 keenanjohnson

Sounds very good, the only point I wanted to make is that it's not only CAN ESCs but also tap_esc and maybe others we don't know yet in the future. Thanks @keenanjohnson .

MaEtUgR avatar Jul 10 '18 09:07 MaEtUgR

My main concern was adding another plot

Do you see any relatively easy options for scaling? For example something like sections that only load if you expand them or modes? There are lots of other things I'd like to be able to plot, but not if it burdons existing usage.

dagar avatar Jul 10 '18 13:07 dagar

I tried different things like expanding or click-to-load, but it did not work reliably. Either it was too much javascript for the browser or too much for bokeh. We can add different pages for specific use-cases. Or try something with iframes then we can expand within the same page.

bkueng avatar Jul 10 '18 13:07 bkueng

@bkueng Were I to revive this, is the situation changed? Do you still share the concern about adding more plots?

I feel like RPM, Current would be the main ones, perhaps also online status but that one will be continuous line in 99.9% of the flights

RicardoM17 avatar Jan 28 '21 10:01 RicardoM17

@bkueng Were I to revive this, is the situation changed? Do you still share the concern about adding more plots?

Yes, there are several options, including a separate page, click-to-load plots or using a different framework. Adding an RPM plot is fine though.

bkueng avatar Jan 29 '21 08:01 bkueng

@bkueng Were I to revive this, is the situation changed? Do you still share the concern about adding more plots?

Yes, there are several options, including a separate page, click-to-load plots or using a different framework. Adding an RPM plot is fine though.

Sounds good. I'll try to find the time to add an RPM plot then.

RicardoM17 avatar Jan 29 '21 10:01 RicardoM17