Skip to content

Commit c6724b5

Browse files
committed
small fixes
1 parent 3ee1cbd commit c6724b5

File tree

3 files changed

+33
-42
lines changed

3 files changed

+33
-42
lines changed

components/gantry/fake/gantry.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func NewGantry(name resource.Name, logger logging.Logger) gantry.Gantry {
5757
resource.TriviallyReconfigurable{},
5858
resource.TriviallyCloseable{},
5959
[]float64{120},
60-
[]float64{120},
60+
[]float64{50},
6161
[]float64{350},
6262
m,
6363
logger,

components/gantry/singleaxis/singleaxis.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"sync"
99
"time"
1010

11-
"github.com/golang/geo/r3"
1211
"github.com/pkg/errors"
1312
"go.uber.org/multierr"
1413
utils "go.viam.com/utils"
@@ -102,7 +101,6 @@ type singleAxis struct {
102101
rpm float64
103102

104103
model referenceframe.Model
105-
frame r3.Vector
106104

107105
cancelFunc func()
108106
logger logging.Logger
@@ -154,12 +152,6 @@ func (g *singleAxis) Reconfigure(ctx context.Context, deps resource.Dependencies
154152
return errors.New("gantry with one limit switch per axis needs a mm_per_length ratio defined")
155153
}
156154

157-
// Add a default frame, then overwrite with the config frame if that is supplied
158-
g.frame = r3.Vector{X: 1.0, Y: 0, Z: 0}
159-
if conf.Frame != nil {
160-
g.frame = conf.Frame.Translation
161-
}
162-
163155
rpm := g.gantryToMotorSpeeds(newConf.GantryMmPerSec)
164156
g.rpm = rpm
165157
if g.rpm == 0 {
@@ -170,7 +162,6 @@ func (g *singleAxis) Reconfigure(ctx context.Context, deps resource.Dependencies
170162
m, err := referenceframe.KinematicModelFromFile(newConf.Kinematics, g.Named.Name().String())
171163
if err != nil {
172164
g.logger.CWarnf(ctx, "failed to load kinematics from file '%v': %v", newConf.Kinematics, err)
173-
m = nil
174165
}
175166
g.model = m
176167

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
{
2-
"name": "single_axis_gantry",
3-
"kinematic_param_type": "SVA",
4-
"links": [
5-
{
6-
"id": "carriage",
7-
"parent": "world",
2+
"name": "single_axis_gantry",
3+
"kinematic_param_type": "SVA",
4+
"links": [
5+
{
6+
"id": "carriage",
7+
"parent": "world",
8+
"translation": {
9+
"x": 0,
10+
"y": 0,
11+
"z": 0
12+
},
13+
"geometry": {
14+
"x": 150,
15+
"y": 120,
16+
"z": 10,
817
"translation": {
918
"x": 0,
1019
"y": 0,
1120
"z": 0
12-
},
13-
"geometry": {
14-
"x": 150,
15-
"y": 120,
16-
"z": 10,
17-
"translation": {
18-
"x": 0,
19-
"y": 0,
20-
"z": 75
21-
}
2221
}
2322
}
24-
],
25-
"joints": [
26-
{
27-
"id": "gantry_joint",
28-
"type": "prismatic",
29-
"parent": "carriage",
30-
"axis": {
31-
"x": 1,
32-
"y": 0,
33-
"z": 0
34-
},
35-
"max": 500,
36-
"min": 0
37-
}
38-
]
39-
}
23+
}
24+
],
25+
"joints": [
26+
{
27+
"id": "gantry_joint",
28+
"type": "prismatic",
29+
"parent": "carriage",
30+
"axis": {
31+
"x": 1,
32+
"y": 0,
33+
"z": 0
34+
},
35+
"max": 500,
36+
"min": 0
37+
}
38+
]
39+
}

0 commit comments

Comments
 (0)