Skip to content

Commit

Permalink
DOCS-2498: Link to main component documentation on RDK docs site (#4351)
Browse files Browse the repository at this point in the history
  • Loading branch information
sguequierre authored Sep 9, 2024
1 parent 60b08d6 commit 1332e69
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 2 deletions.
6 changes: 6 additions & 0 deletions components/arm/arm.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
//go:build !no_cgo

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

import (
Expand Down Expand Up @@ -48,6 +51,7 @@ func Named(name string) resource.Name {
}

// An Arm represents a physical robotic arm that exists in three-dimensional space.
// For more information, see the [arm component docs].
//
// EndPosition example:
//
Expand Down Expand Up @@ -87,6 +91,8 @@ func Named(name string) resource.Name {
//
// // Get the current position of each joint on the arm as JointPositions.
// pos, err := myArm.JointPositions(context.Background(), nil)
//
// [arm component docs]: https://docs.viam.com/components/arm/
type Arm interface {
resource.Resource
referenceframe.ModelFramer
Expand Down
6 changes: 6 additions & 0 deletions components/base/base.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// Package base defines the base that a robot uses to move around.
// For more information, see the [base component docs].
//
// [base component docs]: https://docs.viam.com/components/base/
package base

import (
Expand Down Expand Up @@ -34,6 +37,7 @@ func Named(name string) resource.Name {
}

// A Base represents a physical base of a robot.
// For more information, see the [base component docs].
//
// MoveStraight example:
//
Expand Down Expand Up @@ -93,6 +97,8 @@ func Named(name string) resource.Name {
//
// // Get the wheel circumference
// myBaseWheelCircumference := properties.WheelCircumferenceMeters
//
// [base component docs]: https://docs.viam.com/components/base/
type Base interface {
resource.Resource
resource.Actuator
Expand Down
6 changes: 6 additions & 0 deletions components/board/board.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// such as a Raspberry Pi.
//
// Besides the board itself, some other interfaces it defines are analog pins and digital interrupts.
// For more information, see the [board component docs].
//
// [board component docs]: https://docs.viam.com/components/board/
package board

import (
Expand Down Expand Up @@ -46,6 +49,7 @@ func Named(name string) resource.Name {

// A Board represents a physical general purpose board that contains various
// components such as analogs, and digital interrupts.
// For more information, see the [board component docs].
//
// AnalogByName example:
//
Expand Down Expand Up @@ -93,6 +97,8 @@ func Named(name string) resource.Name {
// }
//
// err = myBoard.StreamTicks(context.Background(), interrupts, ticksChan, nil)
//
// [board component docs]: https://docs.viam.com/components/board/
type Board interface {
resource.Resource

Expand Down
6 changes: 6 additions & 0 deletions components/camera/camera.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// Package camera defines an image capturing device.
// For more information, see the [camera component docs].
//
// [camera component docs]: https://docs.viam.com/components/camera/
package camera

import (
Expand Down Expand Up @@ -75,6 +78,7 @@ type Camera interface {
}

// A VideoSource represents anything that can capture frames.
// For more information, see the [camera component docs].
//
// Images example:
//
Expand Down Expand Up @@ -105,6 +109,8 @@ type Camera interface {
// myCamera, err := camera.FromRobot(machine, "my_camera")
//
// err = myCamera.Close(ctx)
//
// [camera component docs]: https://docs.viam.com/components/camera/
type VideoSource interface {
// Images is used for getting simultaneous images from different imagers,
// along with associated metadata (just timestamp for now). It's not for getting a time series of images from the same imager.
Expand Down
8 changes: 7 additions & 1 deletion components/encoder/encoder.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// Package encoder implements the encoder component
// Package encoder implements the encoder component.
// For more information, see the [encoder component docs].
//
// [encoder component docs]: https://docs.viam.com/components/encoder/
package encoder

import (
Expand Down Expand Up @@ -58,6 +61,7 @@ func (t PositionType) String() string {
}

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

Expand Down
7 changes: 7 additions & 0 deletions components/gantry/gantry.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Package gantry defines a robotic gantry with one or multiple axes.
// For more information, see the [gantry component docs].
//
// [gantry component docs]: https://docs.viam.com/components/gantry/
package gantry

import (
Expand Down Expand Up @@ -41,6 +45,7 @@ func Named(name string) resource.Name {
}

// Gantry is used for controlling gantries of N axis.
// For more information, see the [gantry component docs].
//
// Position example:
//
Expand Down Expand Up @@ -74,6 +79,8 @@ func Named(name string) resource.Name {
// myGantry, err := gantry.FromRobot(machine, "my_gantry")
//
// myGantry.Home(context.Background(), nil)
//
// [gantry component docs]: https://docs.viam.com/components/gantry/
type Gantry interface {
resource.Resource
resource.Actuator
Expand Down
5 changes: 4 additions & 1 deletion components/generic/generic.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// Package generic defines an abstract generic device and DoCommand() method
// Package generic defines an abstract generic device and DoCommand() method.
// For more information, see the [generic component docs].
//
// [generic component docs]: https://docs.viam.com/components/generic/
package generic

import (
Expand Down
6 changes: 6 additions & 0 deletions components/gripper/gripper.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// Package gripper defines a robotic gripper.
// For more information, see the [gripper component docs].
//
// [gripper component docs]: https://docs.viam.com/components/gripper/
package gripper

import (
Expand Down Expand Up @@ -34,6 +37,7 @@ func Named(name string) resource.Name {
}

// A Gripper represents a physical robotic gripper.
// For more information, see the [gripper component docs].
//
// Open example:
//
Expand All @@ -44,6 +48,8 @@ func Named(name string) resource.Name {
//
// // Grab with the gripper.
// grabbed, err := myGripper.Grab(context.Background(), nil)
//
// [gripper component docs]: https://docs.viam.com/components/gripper/
type Gripper interface {
resource.Resource
resource.Shaped
Expand Down

0 comments on commit 1332e69

Please sign in to comment.