-
Notifications
You must be signed in to change notification settings - Fork 126
RSDK-12391: Optimize modular resource communication. #5403
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
Open
dgottlieb
wants to merge
20
commits into
viamrobotics:main
Choose a base branch
from
dgottlieb:RSDK-12391
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,154
−680
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
549b7fc
RSDK-12391: Optimize RDK as a middleman for expensive pointcloud API …
dgottlieb 6750e64
Optimize inter-module resource dependencies.
dgottlieb 615c08d
lint
dgottlieb 2b38d96
lint
dgottlieb 1523550
test hull
dgottlieb 0d86d11
bad stack errors
dgottlieb bc41df4
Test reconfigures
dgottlieb 235eed5
Failing test
dgottlieb 15f87cb
Try to get test to pass
dgottlieb 0207d84
abridged test passing
dgottlieb 8040b28
Move code into different files
dgottlieb 6907a6c
Improve error checking
dgottlieb b869ed4
refactor mutex acquisition
dgottlieb aa2fb87
stub
dgottlieb 098573f
this might be a bad idea
dgottlieb 5312d89
lint
dgottlieb 7380f53
oops
dgottlieb 953353b
Merge branch 'main' into RSDK-12391
dgottlieb 2eaa73a
remove unnecessary assignment for passthrough sources
dgottlieb 6315bd0
Bump timeout. Pretend split brain cannot happen.
dgottlieb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| package module | ||
|
|
||
| import ( | ||
| "context" | ||
|
|
||
| "go.viam.com/rdk/pointcloud" | ||
| "go.viam.com/rdk/referenceframe" | ||
| "go.viam.com/rdk/resource" | ||
| "go.viam.com/rdk/robot/client" | ||
| "go.viam.com/rdk/robot/framesystem" | ||
| ) | ||
|
|
||
| type frameSystemClient struct { | ||
| robotClient *client.RobotClient | ||
| resource.TriviallyCloseable | ||
| resource.TriviallyReconfigurable | ||
| } | ||
|
|
||
| // NewFrameSystemClient provides access to only the framesystem.Service functions contained inside RobotClient. | ||
| func NewFrameSystemClient(robotClient *client.RobotClient) framesystem.Service { | ||
| return &frameSystemClient{robotClient: robotClient} | ||
| } | ||
|
|
||
| func (f *frameSystemClient) Name() resource.Name { | ||
| return framesystem.PublicServiceName | ||
| } | ||
|
|
||
| func (f *frameSystemClient) DoCommand(ctx context.Context, cmd map[string]interface{}) (map[string]interface{}, error) { | ||
| return nil, resource.ErrDoUnimplemented | ||
| } | ||
|
|
||
| func (f *frameSystemClient) FrameSystemConfig(ctx context.Context) (*framesystem.Config, error) { | ||
| return f.robotClient.FrameSystemConfig(ctx) | ||
| } | ||
|
|
||
| func (f *frameSystemClient) GetPose(ctx context.Context, | ||
| componentName, destinationFrame string, | ||
| supplementalTransforms []*referenceframe.LinkInFrame, | ||
| extra map[string]interface{}, | ||
| ) (*referenceframe.PoseInFrame, error) { | ||
| return f.robotClient.GetPose(ctx, componentName, destinationFrame, supplementalTransforms, extra) | ||
| } | ||
|
|
||
| func (f *frameSystemClient) TransformPose( | ||
| ctx context.Context, | ||
| pose *referenceframe.PoseInFrame, | ||
| dst string, | ||
| supplementalTransforms []*referenceframe.LinkInFrame, | ||
| ) (*referenceframe.PoseInFrame, error) { | ||
| return f.robotClient.TransformPose(ctx, pose, dst, supplementalTransforms) | ||
| } | ||
|
|
||
| func (f *frameSystemClient) TransformPointCloud( | ||
| ctx context.Context, | ||
| srcpc pointcloud.PointCloud, | ||
| srcName, | ||
| dstName string, | ||
| ) (pointcloud.PointCloud, error) { | ||
| return f.robotClient.TransformPointCloud(ctx, srcpc, srcName, dstName) | ||
| } | ||
|
|
||
| func (f *frameSystemClient) CurrentInputs(ctx context.Context) (referenceframe.FrameSystemInputs, error) { | ||
| return f.robotClient.CurrentInputs(ctx) | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.