Skip to content

Commit

Permalink
Allow to change docking_retry_count via env variable (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
gytisgreitai authored Jul 5, 2024
1 parent 0bfd489 commit dc750cf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/mower_config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,13 @@
"description":"Extra time in [s] to continue docking after voltage detection. This can be useful to make good contact with the base station. Use carefully.",
"x-environment-variable":"OM_DOCKING_EXTRA_TIME"
},
"OM_DOCKING_RETRY_COUNT":{
"type":"number",
"title":"Docking retry count",
"default":4,
"description":"How many times to retry docking before giving up.",
"x-environment-variable":"OM_DOCKING_RETRY_COUNT"
},
"OM_UNDOCK_DISTANCE":{
"type":"number",
"title":"Undock Distance",
Expand Down
3 changes: 3 additions & 0 deletions config/mower_config.sh.example
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ export OM_DOCKING_DISTANCE=1.0
# Extra time (s) to continue docking after detecting voltage
export OM_DOCKING_EXTRA_TIME=0.0

# How many times to retry docking before giving up.
export OM_DOCKING_RETRY_COUNT=4

# The distance to drive for undocking. This needs to be large enough for the robot to have GPS reception
export OM_UNDOCK_DISTANCE=2.0

Expand Down
1 change: 1 addition & 0 deletions src/open_mower/launch/open_mower.launch
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<param name="automatic_mode" value="$(optenv OM_AUTOMATIC_MODE 0)"/>
<param name="docking_distance" value="$(env OM_DOCKING_DISTANCE)"/>
<param name="docking_extra_time" value="$(optenv OM_DOCKING_EXTRA_TIME 0)"/>
<param name="docking_retry_count" value="$(optenv OM_DOCKING_RETRY_COUNT 4)"/>
<param name="undock_distance" value="$(env OM_UNDOCK_DISTANCE)"/>
<param name="perimeter_signal" value="$(optenv OM_PERIMETER_SIGNAL)"/>
<param name="tool_width" value="$(env OM_TOOL_WIDTH)"/>
Expand Down

0 comments on commit dc750cf

Please sign in to comment.