Skip to content

Commit

Permalink
Fixes from testing
Browse files Browse the repository at this point in the history
- Correct left and rigght for ultrasound
- Correct pin number
- Reduce ultrasound noise from 2% to 1%
  • Loading branch information
WillB97 committed Jul 13, 2024
1 parent a8506e1 commit 9da3cc4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion simulator/modules/sbot_interface/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def setup_devices(log_level: int | str = logging.WARNING) -> SocketServer:
EmptyPin(), # ultrasonic trigger pin, pin 4
UltrasonicSensor('ultrasound left'), # pin 5
EmptyPin(), # ultrasonic trigger pin, pin 6
UltrasonicSensor('ultrasound right'), # pin 6
UltrasonicSensor('ultrasound right'), # pin 7
EmptyPin(), # ultrasonic trigger pin, pin 8
UltrasonicSensor('ultrasound back'), # pin 9
MicroSwitch('front left bump sensor'), # pin 10
Expand Down
4 changes: 2 additions & 2 deletions simulator/protos/SRObot.proto
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ PROTO SRObot [
translation 0.04 0 0
}
UltrasoundModule {
name "ultrasound right"
name "ultrasound left"
translation -0.08 0.07 0
rotation 0 0 1 1.5708
}
Expand All @@ -114,7 +114,7 @@ PROTO SRObot [
rotation 0 0 1 3.1416
}
UltrasoundModule {
name "ultrasound left"
name "ultrasound right"
translation -0.08 -0.07 0
rotation 0 0 1 -1.5708
}
Expand Down
6 changes: 3 additions & 3 deletions simulator/protos/robot/UltrasoundModule.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ PROTO UltrasoundModule [
numberOfRays 10
aperture 0.3
lookupTable [
# 2% standard deviation, with no deviation at the limits
# 1% standard deviation, with no deviation at the limits
0 0 0
0.01 10 0.02
%<= fields.range.value * 0.99 >% %<= fields.range.value * 1000 * 0.99 >% 0.02
0.01 10 0.01
%<= fields.range.value * 0.99 >% %<= fields.range.value * 1000 * 0.99 >% 0.01
%<= fields.range.value >% %<= fields.range.value * 1000 >% 0
]
children [
Expand Down

0 comments on commit 9da3cc4

Please sign in to comment.