Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSDK-9645 introduce consistent naming convention for frame system map objects #4664

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

raybjork
Copy link
Member

We've talked about adding an object for map[string][]Input for a while and I think now is the time since we have just added one for map[string]PoseInFrame. I wasn't sure what to call it since TrajectoryState would have been the correllary and sounds weird in the context of the referenceframe package. I opted for the explicit FrameSystemInputs and think that its clunky but clear. Then I went back and renamed PathState stuff to be consistent with this. Hoping this change is for the better but if not we dont have to merge.

@raybjork raybjork requested a review from biotinker December 31, 2024 20:18
@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Dec 31, 2024
Copy link
Contributor

Warning your change may break code samples. If your change modifies any of the following functions please contact @viamrobotics/fleet-management. Thanks!

component function
base IsMoving
board GPIOPinByName
camera Properties
encoder Properties
motor IsMoving
sensor Readings
servo Position
arm EndPosition
audio MediaProperties
gantry Lengths
gripper IsMoving
input_controller Controls
movement_sensor LinearAcceleration
power_sensor Power
pose_tracker Poses
motion GetPose
vision GetProperties

Copy link
Member

@biotinker biotinker left a comment

Choose a reason for hiding this comment

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

Naming things is hard, FrameSystemInputs feels clunky but I can't think of anything better...

@@ -46,7 +46,7 @@ func (r *resultPromise) result() ([]node, error) {
return planReturn.steps, nil
}

// linearizedFrameSystem wraps a framesystem, allowing conversion in a known order between a map[string][]inputs and a flat array of floats,
// linearizedFrameSystem wraps a framesystem, allowing conversion in a known order between a FrameConfiguratinos and a flat array of floats,
Copy link
Member

Choose a reason for hiding this comment

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

Should be FrameSystemInputs, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah thanks looks like the typo evaded my find and replace

// GetFrameInputs looks through the inputMap and returns a slice of Inputs corresponding to the given frame.
func GetFrameInputs(frame Frame, inputMap map[string][]Input) ([]Input, error) {
func (inputs FrameSystemInputs) GetFrameInputs(frame Frame) ([]Input, error) {
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if functions like this should take a string rather than an entire frame?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point there's no reason to pass the whole frame in this case

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually the whole function just becomes an index into a map and is used in just a couple places. I'm going to remove it

@raybjork
Copy link
Member Author

Naming things is hard, FrameSystemInputs feels clunky but I can't think of anything better...

I agree. I was also toying with FrameSystemConfigurations but that's kind of adding another word into the already messy vernacular

We can sit on this for a bit and try to think of something better if you want

Copy link
Member

@biotinker biotinker left a comment

Choose a reason for hiding this comment

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

I can't think of a better name, and typing this is something that does need to be done

@raybjork raybjork changed the title introduce consistent naming convention for frame system map objects RSDK-9645 introduce consistent naming convention for frame system map objects Jan 2, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants