Skip to content

Commit

Permalink
Add new parameters to config and schema files
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreKR committed Oct 6, 2024
1 parent e650f84 commit 60c6553
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 2 deletions.
35 changes: 35 additions & 0 deletions config/mower_config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,13 @@
"description": "Distance in [m] to drive forward after docking.",
"x-environment-variable": "OM_DOCKING_DISTANCE"
},
"OM_DOCKING_APPROACH_DISTANCE": {
"type": "number",
"default": 1.5,
"title": "Docking Approach Distance",
"description": "Distance in [m] from the docking point to start docking.",
"x-environment-variable": "OM_DOCKING_APPROACH_DISTANCE"
},
"OM_DOCKING_EXTRA_TIME": {
"type": "number",
"default": 0.0,
Expand Down Expand Up @@ -301,6 +308,34 @@
"description": "Distance in [m] to drive for undocking.",
"x-environment-variable": "OM_UNDOCK_DISTANCE"
},
"OM_UNDOCK_ANGLED_DISTANCE": {
"type": "number",
"title": "Undock Angled Distance",
"default": 0.0,
"description": "Distance in [m] to continue driving at an angle for undocking.",
"x-environment-variable": "OM_UNDOCK_ANGLED_DISTANCE"
},
"OM_UNDOCK_ANGLE": {
"type": "number",
"title": "Undock Angle",
"default": 0.0,
"description": "Angle in degrees for second stage undocking.",
"x-environment-variable": "OM_UNDOCK_ANGLE"
},
"OM_UNDOCK_FIXED_ANGLE": {
"type": "boolean",
"title": "Undock Fixed Angle",
"default": true,
"description": "True to fix the undock angle, false to vary it.",
"x-environment-variable": "OM_UNDOCK_FIXED_ANGLE"
},
"OM_UNDOCK_USE_CURVE": {
"type": "boolean",
"title": "Undock Use Curve",
"default": true,
"description": "True to use a curved second stage, false for a straight second stage.",
"x-environment-variable": "OM_UNDOCK_USE_CURVE"
},
"OM_OUTLINE_COUNT": {
"type": "number",
"default": 4,
Expand Down
20 changes: 19 additions & 1 deletion config/mower_config.sh.example
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ export OM_USE_F9R_SENSOR_FUSION=False
################################
## Mower Logic Settings ##
################################
# Docking starts at this distance from the dock point
export OM_DOCKING_APPROACH_DISTANCE=1.5

# The distance to drive forward AFTER reaching the second docking point
export OM_DOCKING_DISTANCE=1.0

Expand All @@ -130,9 +133,24 @@ export OM_DOCKING_RETRY_COUNT=4
# Whether to attempt redocking if the voltage is no longer detected after docking.
export OM_DOCKING_REDOCK=False

# The distance to drive for undocking. This needs to be large enough for the robot to have GPS reception
# The first stage distance to drive for undocking. As a minimum it needs to clear the dock.
# If the additional angled move isn't used then this needs to be large enough for the robot to have GPS reception.
export OM_UNDOCK_DISTANCE=2.0

# The additional second stage distance to drive at an angle for undocking. This needs to be large enough for the robot to have GPS reception.
# Note - this section may still be driven without gps so don't expect high positional accuracy.
export OM_UNDOCK_ANGLED_DISTANCE=0.0

# The angle at which to drive for the additional distance (neg values are to the left of the dock, pos to the right).
export OM_UNDOCK_ANGLE=0.0

# If true will allways use the angle specified.
# If false will vary the undocking angle between +abs(OM_UNDOCK_ANGLE) to -abs(OM_UNDOCK_ANGLE) on subsequent undocks to reduce grass wear.
export OM_UNDOCK_FIXED_ANGLE=True

# If true will use a curved second stage undock move, if false will use a straight undock move.
export OM_UNDOCK_USE_CURVE=True

# Uncomment, if you want to use the perimeter sensor of your Mowgli-type mower
# for docking. Set it to 1 or 2 dependig on the signal selected on the docking
# station (S1 or S2).
Expand Down
2 changes: 1 addition & 1 deletion src/open_mower/launch/open_mower.launch
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<node pkg="mower_logic" type="mower_logic" name="mower_logic" output="screen">
<param name="automatic_mode" value="$(optenv OM_AUTOMATIC_MODE 0)"/>
<param name="docking_distance" value="$(env OM_DOCKING_DISTANCE)"/>
<param name="docking_approach_distance" value="$(env OM_DOCKING_APPROACH_DISTANCE)"/>
<param name="docking_approach_distance" value="$(env OM_DOCKING_APPROACH_DISTANCE 1.5)"/>
<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="docking_redock" value="$(optenv OM_DOCKING_REDOCK False)"/>
Expand Down

0 comments on commit 60c6553

Please sign in to comment.