Skip to content

Commit

Permalink
linting for new lint bots catching issues not previously reported (ro…
Browse files Browse the repository at this point in the history
…s-navigation#4044)

* linting for new lint bots

* moar

* moar2

* try without dashes

* more

* more
  • Loading branch information
SteveMacenski authored and Marc-Morcos committed Jul 4, 2024
1 parent 352dd95 commit efc7ec6
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 0 deletions.
27 changes: 27 additions & 0 deletions nav2_bringup/params/nav2_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,33 @@ planner_server:
use_astar: false
allow_unknown: true

GridBased:
plugin: "nav2_smac_planner/SmacPlannerLattice"
allow_unknown: true # Allow traveling in unknown space
tolerance: 0.25 # dist-to-goal heuristic cost (distance) for valid tolerance endpoints if exact goal cannot be found.
max_iterations: 1000000 # Maximum total iterations to search for before failing (in case unreachable), set to -1 to disable
max_on_approach_iterations: 1000 # Maximum number of iterations after within tolerances to continue to try to find exact solution
max_planning_time: 5.0 # Max time in s for planner to plan, smooth
analytic_expansion_ratio: 3.5 # The ratio to attempt analytic expansions during search for final approach.
analytic_expansion_max_length: 3.0 # For Hybrid/Lattice nodes: The maximum length of the analytic expansion to be considered valid to prevent unsafe shortcutting
reverse_penalty: 2.0 # Penalty to apply if motion is reversing, must be => 1
change_penalty: 0.05 # Penalty to apply if motion is changing directions (L to R), must be >= 0
non_straight_penalty: 1.05 # Penalty to apply if motion is non-straight, must be => 1
cost_penalty: 2.0 # Penalty to apply to higher cost areas when adding into the obstacle map dynamic programming distance expansion heuristic. This drives the robot more towards the center of passages. A value between 1.3 - 3.5 is reasonable.
rotation_penalty: 5.0 # Penalty to apply to in-place rotations, if minimum control set contains them
retrospective_penalty: 0.015
lookup_table_size: 20.0 # Size of the dubin/reeds-sheep distance window to cache, in meters.
cache_obstacle_heuristic: false # Cache the obstacle map dynamic programming distance expansion heuristic between subsiquent replannings of the same goal location. Dramatically speeds up replanning performance (40x) if costmap is largely static.
allow_reverse_expansion: false # If true, allows the robot to use the primitives to expand in the mirrored opposite direction of the current robot's orientation (to reverse).
debug_visualizations: true
smooth_path: True # If true, does a simple and quick smoothing post-processing to the path
smoother:
max_iterations: 1000
w_smooth: 0.3
w_data: 0.2
tolerance: 1.0e-10
do_refinement: true
refinement_num: 2
smoother_server:
ros__parameters:
smoother_plugins: ["simple_smoother"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class TaskResult(Enum):


class BasicNavigator(Node):

def __init__(self, node_name='basic_navigator', namespace=''):
super().__init__(node_name=node_name, namespace=namespace)
self.initial_pose = PoseStamped()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@


class TestFootprintCollisionChecker(unittest.TestCase):

def test_no_costmap(self):
# Test if a type error raised when costmap is not specified yet
fcc_ = FootprintCollisionChecker()
Expand Down
1 change: 1 addition & 0 deletions nav2_simple_commander/test/test_line_iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@


class TestLineIterator(unittest.TestCase):

def test_type_error(self):
# Test if a type error raised when passing invalid arguements types
self.assertRaises(TypeError, LineIterator, 0, 0, '10', 10, '1')
Expand Down
1 change: 1 addition & 0 deletions nav2_system_tests/src/system/nav_to_pose_tester_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@


class NavTester(Node):

def __init__(self, initial_pose: Pose, goal_pose: Pose, namespace: str = ''):
super().__init__(node_name='nav2_tester', namespace=namespace)
self.initial_pose_pub = self.create_publisher(
Expand Down
1 change: 1 addition & 0 deletions nav2_system_tests/src/waypoint_follower/tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@


class WaypointFollowerTest(Node):

def __init__(self):
super().__init__(node_name='nav2_waypoint_tester', namespace='')
self.waypoints = None
Expand Down

0 comments on commit efc7ec6

Please sign in to comment.