Skip to content

Commit 3da41ca

Browse files
authored
Add imports (#930)
1 parent 8c0fc88 commit 3da41ca

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed

examples/optionaldepsmodule/module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def reconfigure(self, config: ComponentConfig, dependencies: Mapping[ResourceNam
6464

6565
optional_motor = Motor.get_resource_name(cfg_optional_motor)
6666
if optional_motor not in dependencies:
67-
print(f'could not get optional motor {cfg_optional_motor} from dependencies; continuing')
67+
print(f"could not get optional motor {cfg_optional_motor} from dependencies; continuing")
6868
else:
6969
self.optional_motor = optional_motor
7070

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Uncomment the following line if you would like to use a release version of the SDK
2+
# viam-sdk
3+
4+
# This line points to the version of the SDK that lives at this project's root.
5+
# In production, you would likely want to use the above `viam-sdk` requirement.
6+
../..

src/viam/module/module.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,33 @@
3535
from viam.rpc.dial import DialOptions
3636
from viam.rpc.server import Server
3737

38+
# These imports are required to register build-in resources with the registry
39+
from ..components.arm import Arm # noqa: F401
40+
from ..components.audio_input import AudioInput # noqa: F401
41+
from ..components.base import Base # noqa: F401
42+
from ..components.board import Board # noqa: F401
43+
from ..components.button import Button # noqa: F401
44+
from ..components.camera import Camera # noqa: F401
45+
from ..components.encoder import Encoder # noqa: F401
46+
from ..components.gantry import Gantry # noqa: F401
47+
from ..components.generic import Generic as GenericComponent # noqa: F401
48+
from ..components.gripper import Gripper # noqa: F401
49+
from ..components.input import Controller # noqa: F401
50+
from ..components.motor import Motor # noqa: F401
51+
from ..components.movement_sensor import MovementSensor # noqa: F401
52+
from ..components.pose_tracker import PoseTracker # noqa: F401
53+
from ..components.power_sensor import PowerSensor # noqa: F401
54+
from ..components.sensor import Sensor # noqa: F401
55+
from ..components.servo import Servo # noqa: F401
56+
from ..components.switch import Switch # noqa: F401
57+
from ..services.discovery import Discovery # noqa: F401
58+
from ..services.generic import Generic as GenericService # noqa: F401
59+
from ..services.mlmodel import MLModel # noqa: F401
60+
from ..services.motion import Motion # noqa: F401
61+
from ..services.navigation import Navigation # noqa: F401
62+
from ..services.slam import SLAM # noqa: F401
63+
from ..services.vision import Vision # noqa: F401
64+
3865
from .service import ModuleRPCService
3966
from .types import Reconfigurable, Stoppable
4067

0 commit comments

Comments
 (0)