Skip to content

Commit

Permalink
Add a third reflectance sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
WillB97 committed Jul 14, 2024
1 parent 9fcec9d commit 5ee3ebe
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
5 changes: 3 additions & 2 deletions simulator/modules/sbot_interface/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ def setup_devices(log_level: int | str = logging.WARNING) -> SocketServer:
MicroSwitch('front right bump sensor'), # pin 11
MicroSwitch('rear left bump sensor'), # pin 12
MicroSwitch('rear right bump sensor'), # pin 13
ReflectanceSensor('reflectance sensor 1'), # pin A0
ReflectanceSensor('reflectance sensor 2'), # pin A1
ReflectanceSensor('left reflectance sensor'), # pin A0
ReflectanceSensor('center reflectance sensor'), # pin A1
ReflectanceSensor('right reflectance sensor'), # pin A2
],
asset_tag='Arduino1',
),
Expand Down
11 changes: 9 additions & 2 deletions simulator/protos/SRObot.proto
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,19 @@ PROTO SRObot [
translation -0.12 -0.05 -0.008
}
ReflectanceSensor {
name "reflectance sensor 1"
name "left reflectance sensor"
translation 0.03 0.02 -0.03
rotation 0 0 1 1.5708
}
ReflectanceSensor {
name "reflectance sensor 2"
name "center reflectance sensor"
translation 0.03 0 -0.03
rotation 0 0 1 1.5708
}
ReflectanceSensor {
name "right reflectance sensor"
translation 0.03 -0.02 -0.03
rotation 0 0 1 1.5708
}
BumpSensor {
name "front left bump sensor"
Expand Down
2 changes: 1 addition & 1 deletion simulator/protos/robot/ReflectanceSensor.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ PROTO ReflectanceSensor [
metalness 0
}
geometry Box {
size 0.002 0.045 0.02
size 0.002 0.045 0.015
}
castShadows FALSE
}
Expand Down

0 comments on commit 5ee3ebe

Please sign in to comment.