Skip to content

Commit 1332e69

Browse files
authored
DOCS-2498: Link to main component documentation on RDK docs site (#4351)
1 parent 60b08d6 commit 1332e69

File tree

8 files changed

+48
-2
lines changed

8 files changed

+48
-2
lines changed

components/arm/arm.go

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
//go:build !no_cgo
22

33
// Package arm defines the arm that a robot uses to manipulate objects.
4+
// For more information, see the [arm component docs].
5+
//
6+
// [arm component docs]: https://docs.viam.com/components/arm/
47
package arm
58

69
import (
@@ -48,6 +51,7 @@ func Named(name string) resource.Name {
4851
}
4952

5053
// An Arm represents a physical robotic arm that exists in three-dimensional space.
54+
// For more information, see the [arm component docs].
5155
//
5256
// EndPosition example:
5357
//
@@ -87,6 +91,8 @@ func Named(name string) resource.Name {
8791
//
8892
// // Get the current position of each joint on the arm as JointPositions.
8993
// pos, err := myArm.JointPositions(context.Background(), nil)
94+
//
95+
// [arm component docs]: https://docs.viam.com/components/arm/
9096
type Arm interface {
9197
resource.Resource
9298
referenceframe.ModelFramer

components/base/base.go

+6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
// Package base defines the base that a robot uses to move around.
2+
// For more information, see the [base component docs].
3+
//
4+
// [base component docs]: https://docs.viam.com/components/base/
25
package base
36

47
import (
@@ -34,6 +37,7 @@ func Named(name string) resource.Name {
3437
}
3538

3639
// A Base represents a physical base of a robot.
40+
// For more information, see the [base component docs].
3741
//
3842
// MoveStraight example:
3943
//
@@ -93,6 +97,8 @@ func Named(name string) resource.Name {
9397
//
9498
// // Get the wheel circumference
9599
// myBaseWheelCircumference := properties.WheelCircumferenceMeters
100+
//
101+
// [base component docs]: https://docs.viam.com/components/base/
96102
type Base interface {
97103
resource.Resource
98104
resource.Actuator

components/board/board.go

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// such as a Raspberry Pi.
33
//
44
// Besides the board itself, some other interfaces it defines are analog pins and digital interrupts.
5+
// For more information, see the [board component docs].
6+
//
7+
// [board component docs]: https://docs.viam.com/components/board/
58
package board
69

710
import (
@@ -46,6 +49,7 @@ func Named(name string) resource.Name {
4649

4750
// A Board represents a physical general purpose board that contains various
4851
// components such as analogs, and digital interrupts.
52+
// For more information, see the [board component docs].
4953
//
5054
// AnalogByName example:
5155
//
@@ -93,6 +97,8 @@ func Named(name string) resource.Name {
9397
// }
9498
//
9599
// err = myBoard.StreamTicks(context.Background(), interrupts, ticksChan, nil)
100+
//
101+
// [board component docs]: https://docs.viam.com/components/board/
96102
type Board interface {
97103
resource.Resource
98104

components/camera/camera.go

+6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
// Package camera defines an image capturing device.
2+
// For more information, see the [camera component docs].
3+
//
4+
// [camera component docs]: https://docs.viam.com/components/camera/
25
package camera
36

47
import (
@@ -75,6 +78,7 @@ type Camera interface {
7578
}
7679

7780
// A VideoSource represents anything that can capture frames.
81+
// For more information, see the [camera component docs].
7882
//
7983
// Images example:
8084
//
@@ -105,6 +109,8 @@ type Camera interface {
105109
// myCamera, err := camera.FromRobot(machine, "my_camera")
106110
//
107111
// err = myCamera.Close(ctx)
112+
//
113+
// [camera component docs]: https://docs.viam.com/components/camera/
108114
type VideoSource interface {
109115
// Images is used for getting simultaneous images from different imagers,
110116
// along with associated metadata (just timestamp for now). It's not for getting a time series of images from the same imager.

components/encoder/encoder.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
// Package encoder implements the encoder component
1+
// Package encoder implements the encoder component.
2+
// For more information, see the [encoder component docs].
3+
//
4+
// [encoder component docs]: https://docs.viam.com/components/encoder/
25
package encoder
36

47
import (
@@ -58,6 +61,7 @@ func (t PositionType) String() string {
5861
}
5962

6063
// A Encoder turns a position into a signal.
64+
// For more information, see the [encoder component docs].
6165
//
6266
// Position example:
6367
//
@@ -84,6 +88,8 @@ func (t PositionType) String() string {
8488
//
8589
// // Get whether the encoder returns position in ticks or degrees.
8690
// properties, err := myEncoder.Properties(context.Background(), nil)
91+
//
92+
// [encoder component docs]: https://docs.viam.com/components/encoder/
8793
type Encoder interface {
8894
resource.Resource
8995

components/gantry/gantry.go

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Package gantry defines a robotic gantry with one or multiple axes.
2+
// For more information, see the [gantry component docs].
3+
//
4+
// [gantry component docs]: https://docs.viam.com/components/gantry/
15
package gantry
26

37
import (
@@ -41,6 +45,7 @@ func Named(name string) resource.Name {
4145
}
4246

4347
// Gantry is used for controlling gantries of N axis.
48+
// For more information, see the [gantry component docs].
4449
//
4550
// Position example:
4651
//
@@ -74,6 +79,8 @@ func Named(name string) resource.Name {
7479
// myGantry, err := gantry.FromRobot(machine, "my_gantry")
7580
//
7681
// myGantry.Home(context.Background(), nil)
82+
//
83+
// [gantry component docs]: https://docs.viam.com/components/gantry/
7784
type Gantry interface {
7885
resource.Resource
7986
resource.Actuator

components/generic/generic.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
// Package generic defines an abstract generic device and DoCommand() method
1+
// Package generic defines an abstract generic device and DoCommand() method.
2+
// For more information, see the [generic component docs].
3+
//
4+
// [generic component docs]: https://docs.viam.com/components/generic/
25
package generic
36

47
import (

components/gripper/gripper.go

+6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
// Package gripper defines a robotic gripper.
2+
// For more information, see the [gripper component docs].
3+
//
4+
// [gripper component docs]: https://docs.viam.com/components/gripper/
25
package gripper
36

47
import (
@@ -34,6 +37,7 @@ func Named(name string) resource.Name {
3437
}
3538

3639
// A Gripper represents a physical robotic gripper.
40+
// For more information, see the [gripper component docs].
3741
//
3842
// Open example:
3943
//
@@ -44,6 +48,8 @@ func Named(name string) resource.Name {
4448
//
4549
// // Grab with the gripper.
4650
// grabbed, err := myGripper.Grab(context.Background(), nil)
51+
//
52+
// [gripper component docs]: https://docs.viam.com/components/gripper/
4753
type Gripper interface {
4854
resource.Resource
4955
resource.Shaped

0 commit comments

Comments
 (0)