Skip to content

Commit 0905644

Browse files
committed
lint
1 parent a685e25 commit 0905644

File tree

3 files changed

+7
-23
lines changed

3 files changed

+7
-23
lines changed

components/gantry/fake/gantry.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ type Gantry struct {
7171
resource.TriviallyCloseable
7272
positionsMm []float64
7373
speedsMmPerSec []float64
74-
lengthsMm []float64
74+
lengthsMm []float64
7575
model referenceframe.Model
7676
logger logging.Logger
7777
}
@@ -99,7 +99,7 @@ func (g *Gantry) MoveToPosition(ctx context.Context, positionsMm, speedsMmPerSec
9999
return fmt.Errorf("position %v out of range [0, %v]", position, g.lengthsMm[i])
100100
}
101101
}
102-
102+
103103
g.positionsMm = positionsMm
104104
g.speedsMmPerSec = speedsMmPerSec
105105
return nil

components/gantry/server.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ func (s *serviceServer) GetGeometries(ctx context.Context, req *commonpb.GetGeom
156156
}
157157

158158
posResp, err := s.GetPosition(ctx, &pb.GetPositionRequest{Name: req.GetName()})
159+
if err != nil {
160+
return nil, err
161+
}
159162
gifs, err := model.Geometries(posResp.PositionsMm)
160163
if err != nil {
161164
return nil, err

components/gantry/test_gantry_model.json

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,9 @@
22
"name": "single_axis_gantry",
33
"kinematic_param_type": "SVA",
44
"links": [
5-
{
6-
"id": "base_rail",
7-
"parent": "world",
8-
"translation": {
9-
"x": 0,
10-
"y": 0,
11-
"z": 0
12-
},
13-
"geometry": {
14-
"x": 500,
15-
"y": 100,
16-
"z": 100,
17-
"translation": {
18-
"x": 0,
19-
"y": 0,
20-
"z": 0
21-
}
22-
}
23-
},
245
{
256
"id": "carriage",
26-
"parent": "gantry_joint",
7+
"parent": "world",
278
"translation": {
289
"x": 0,
2910
"y": 0,
@@ -45,7 +26,7 @@
4526
{
4627
"id": "gantry_joint",
4728
"type": "prismatic",
48-
"parent": "base_rail",
29+
"parent": "carriage",
4930
"axis": {
5031
"x": 1,
5132
"y": 0,

0 commit comments

Comments
 (0)