Skip to content

Conversation

@riley-jen
Copy link
Contributor

not ready to be merged yet!

i opened this so that i can add some comments on the code because i am not sure what we want to do with the vision code. please see them below

Copy link
Contributor Author

@riley-jen riley-jen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall, augment thinks that some of the logic here is not efficient. is that possibly causing some of our vision problems?


SmartDashboard.putBoolean("isConnected/" + m_cameraName, m_camera.isConnected());
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--- getters ---
none have null checks. not sure whether we want to add them/how to deal with it. i know that we technically check for emptiness in other places but a lot safer to do something here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if this is good coding practice (Max might know better), but you could probably just throw an exception if it's null. I wonder if this is a question to ask LLMs -- I haven't set up augment successfully yet but I'm working on it,

totalTime += Math.abs(m_lastEstPoses.get(i).timestampSeconds - m_lastEstPoses.get(i+1).timestampSeconds);
}

double avgDist = totalDistance / m_lastEstPoses.size();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

division by 0?

Copy link
Member

@amzoeee amzoeee Dec 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as long as VisionConstants.NUM_LAST_EST_POSES is >0 (and it really should be), the check at line 232

if (m_lastEstPoses.size() < VisionConstants.NUM_LAST_EST_POSES) {
      return true;
}

should prevent that.

however, not sure if it's good practice to just assume that will be the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants