-
Notifications
You must be signed in to change notification settings - Fork 126
APP-8776 Move geometry proto conversions to reference frame #5149
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
Changes from 5 commits
35d243c
58bea5e
a109126
167e93b
1b1dac5
ed9e15d
6c2e826
c67adc6
18ab6c6
16abc5b
3353dac
c0b21cf
e1662b3
1037ceb
6fd968a
daaed79
e33470f
e9432ae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |
| "context" | ||
| "sync" | ||
|
|
||
| commonpb "go.viam.com/api/common/v1" | ||
|
Check failure on line 8 in components/arm/client.go
|
||
| pb "go.viam.com/api/component/arm/v1" | ||
| "go.viam.com/utils/protoutils" | ||
| "go.viam.com/utils/rpc" | ||
|
|
@@ -218,7 +218,7 @@ | |
| if err != nil { | ||
| return nil, err | ||
| } | ||
| return spatialmath.NewGeometriesFromProto(resp.GetGeometries()) | ||
| return referenceframe.NewGeometriesFromProto(resp.GetGeometries()) | ||
| } | ||
|
|
||
| // warnKinematicsUnsafe is a helper function to warn the user that no kinematics have been supplied for the conversion between | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ | |
|
|
||
| "github.com/golang/geo/r3" | ||
| "github.com/pkg/errors" | ||
| packagespb "go.viam.com/api/app/packages/v1" | ||
|
Check failure on line 10 in config/proto_conversions.go
|
||
| pb "go.viam.com/api/app/v1" | ||
| "go.viam.com/utils" | ||
| "go.viam.com/utils/pexec" | ||
|
|
@@ -558,7 +558,7 @@ | |
| } | ||
|
|
||
| if proto.GetGeometry() != nil { | ||
| geom, err := spatial.NewGeometryFromProto(proto.GetGeometry()) | ||
| geom, err := referenceframe.NewGeometryFromProto(proto.GetGeometry()) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| package pointcloud | ||
|
|
||
| import ( | ||
| "github.com/golang/geo/r3" | ||
| ) | ||
|
|
||
| // MakeTestPointCloud creates a test point cloud with 3 points. | ||
| func MakeTestPointCloud(label string) *BasicOctree { | ||
DTCurrie marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| pc := NewBasicPointCloud(3) | ||
| err := pc.Set(r3.Vector{X: 0, Y: 0, Z: 0}, NewBasicData()) | ||
| if err != nil { | ||
| return nil | ||
| } | ||
| err = pc.Set(r3.Vector{X: 1, Y: 0, Z: 0}, NewBasicData()) | ||
| if err != nil { | ||
| return nil | ||
| } | ||
| err = pc.Set(r3.Vector{X: 0, Y: 1, Z: 0}, NewBasicData()) | ||
| if err != nil { | ||
| return nil | ||
| } | ||
|
|
||
| octree, err := ToBasicOctree(pc, 50) | ||
| if err != nil { | ||
| return nil | ||
| } | ||
|
|
||
| octree.SetLabel(label) | ||
| return octree | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.