Skip to content

Commit b9260d9

Browse files
authored
RSDK-8460 - Modularize the xarm driver and remove it from RDK (#4578)
1 parent 22f89f4 commit b9260d9

21 files changed

+33
-1189
lines changed

components/arm/arm_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ func TestXArm6Locations(t *testing.T) {
198198
Name: arm.API.String(),
199199
Model: resource.DefaultModelFamily.WithModel("fake"),
200200
ConvertedAttributes: &fake.Config{
201-
ArmModel: "xArm6",
201+
ModelFilePath: "example_kinematics/xarm6_kinematics_test.json",
202202
},
203203
}
204204

components/arm/fake/fake.go

-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
"go.viam.com/rdk/components/arm"
1313
"go.viam.com/rdk/components/arm/eva"
1414
ur "go.viam.com/rdk/components/arm/universalrobots"
15-
"go.viam.com/rdk/components/arm/xarm"
1615
"go.viam.com/rdk/logging"
1716
"go.viam.com/rdk/motionplan"
1817
"go.viam.com/rdk/referenceframe"
@@ -256,8 +255,6 @@ func (a *Arm) Geometries(ctx context.Context, extra map[string]interface{}) ([]s
256255

257256
func modelFromName(model, name string) (referenceframe.Model, error) {
258257
switch model {
259-
case xarm.ModelName6DOF, xarm.ModelName7DOF, xarm.ModelNameLite:
260-
return xarm.MakeModelFrame(name, model)
261258
case ur.Model.Name:
262259
return ur.MakeModelFrame(name)
263260
case eva.Model.Name:

components/arm/fake/fake_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func TestReconfigure(t *testing.T) {
2525
conf1 := resource.Config{
2626
Name: "testArm",
2727
ConvertedAttributes: &Config{
28-
ArmModel: "xArm6",
28+
ModelFilePath: "../example_kinematics/xarm6_kinematics_test.json",
2929
},
3030
}
3131

@@ -71,7 +71,7 @@ func TestReconfigure(t *testing.T) {
7171
}
7272

7373
test.That(t, fakeArm.Reconfigure(context.Background(), nil, conf1), test.ShouldBeNil)
74-
model, err = modelFromName(conf1.ConvertedAttributes.(*Config).ArmModel, cfg.Name)
74+
model, err = referenceframe.ParseModelJSONFile(conf1.ConvertedAttributes.(*Config).ModelFilePath, cfg.Name)
7575
test.That(t, err, test.ShouldBeNil)
7676
test.That(t, fakeArm.joints, test.ShouldResemble, make([]referenceframe.Input, len(model.DoF())))
7777
test.That(t, fakeArm.model, test.ShouldResemble, model)

components/arm/register/register.go

-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ import (
77
_ "go.viam.com/rdk/components/arm/fake"
88
_ "go.viam.com/rdk/components/arm/universalrobots"
99
_ "go.viam.com/rdk/components/arm/wrapper"
10-
_ "go.viam.com/rdk/components/arm/xarm"
1110
)

components/arm/wrapper/wrapper_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ func TestReconfigure(t *testing.T) {
2727
cfg1 := resource.Config{
2828
Name: "testArm",
2929
ConvertedAttributes: &Config{
30-
ModelFilePath: "../xarm/xarm6_kinematics.json",
30+
ModelFilePath: "../example_kinematics/xarm6_kinematics_test.json",
3131
ArmName: armName.ShortName(),
3232
},
3333
}
3434

3535
cfg1Err := resource.Config{
3636
Name: "testArm",
3737
ConvertedAttributes: &Config{
38-
ModelFilePath: "../xarm/xarm6_kinematics.json",
38+
ModelFilePath: "../example_kinematics/xarm6_kinematics_test.json",
3939
ArmName: "dne1",
4040
},
4141
}

components/arm/xarm/xarm.go

-280
This file was deleted.

0 commit comments

Comments
 (0)