No announcement yet.

Logging Robot Info with telemetry

  • Filter
  • Time
  • Show
Clear All
new posts

  • Logging Robot Info with telemetry

    I want to log some data from my motors when I run them to see what their position is at a certain time. It usually either takes a while to show up on the screen but then I don't have much time to write/analyze what I've prompted the telemetry to display so I was wondering what telemetry.log() does. Does it log whatever data you add (telemetry.addData()?


  • #2
    The end was supposed to be a semi-colon followed by a closing bracket. It just converted it into an emoji. And for looking at a PID graph, what exactly should I plot on the y-axis to fine tune my variables? Would it be the encoder counts?


    • #3
      The javadocs have something on telemetry.log, it's basically the log itself that addData adds to. As far as I can tell Telemetry is just for displaying stuff on the driver station.

      Telemetry.Log log()
      Returns the log of this Telemetry to which log entries may be appended.
      the log of this Telemetry to which log entries may be appended.
      See Also:
      addData(String, Object)

      One alternative is to use something like Log.d() from android.util.Log; These are mixed in with all the other Android log entries for the ftc_app.
      I usually put the method name followed by whatever I want to log.
      eg. Log.d("MotorTestOp","Initialized");

      If you've enabled wireless ADB debugging, you can actually see this log in the Android Monitor panel of Android Studio.
      You can filter that log to show records just from your app or selected log records by custom filtering.
      The log is also written to the phone, I think it can be found in the FIRST directory.