🎓 Lesson 18 D5

ROS 2 Navigation Stack Customization for Fixed-Base Industrial Manipulators

Customizing the ROS 2 Navigation Stack means adapting its built-in path-planning and motion-control software so it works safely and precisely for stationary industrial robots—like robotic arms on fixed bases—that don’t move around like mobile robots.

🎯 Learning Objectives

  • Analyze ROS 2 Navigation Stack architecture to identify components incompatible with fixed-base manipulators
  • Design a minimal custom navigation configuration that replaces AMCL and Nav2’s default controllers with MoveIt 2–integrated Cartesian trajectory interfaces
  • Apply TF2 frame conventions and costmap layer configurations to enforce static base constraints and collision-aware joint-space planning
  • Explain how lifecycle node management enables safe activation/deactivation of navigation services during shared workspace operations

📖 Why This Matters

Unlike mobile robots, fixed-base industrial manipulators (e.g., welding robots on factory floors) do not navigate across maps—they execute precise, repeatable trajectories within bounded workspaces. Yet many engineers mistakenly attempt to reuse the full ROS 2 Navigation Stack ‘as-is’, leading to unsafe behaviors: phantom pose drift, erroneous obstacle inflation, or uncontrolled joint jerks due to misaligned costmap semantics. Customization isn’t optional—it’s foundational for functional safety, ISO/IEC 62443 compliance, and interoperability with PLC-coordinated production lines.

📘 Core Principles

The ROS 2 Navigation Stack assumes a mobile robot with continuous 2D pose (x, y, θ), odometry, and dynamic map updates. Fixed-base manipulators violate all three assumptions: their base is static (no x/y/θ movement), localization occurs via joint encoders—not wheel odometry—and workspace constraints are defined in Cartesian or joint space—not occupancy grids. Successful customization hinges on three conceptual shifts: (1) replacing the robot_localization pipeline with forward-kinematics–driven pose publishing; (2) substituting the default costmap_2d layers with static, layered ‘workspace masks’ (e.g., keepout zones, tooling fixtures); and (3) redirecting the controller interface from Twist commands to trajectory_msgs::msg::JointTrajectory via ros2_control’s FollowJointTrajectory action server.

📐 Workspace Safety Margin Mapping

To ensure manipulator trajectories respect physical boundaries while remaining compatible with Nav2’s costmap layer interface, engineers compute a scaled safety margin in meters that defines the minimum clearance between the manipulator’s end-effector and static obstacles—mapped into costmap inflation layers. This margin must account for sensor uncertainty, actuator repeatability, and mechanical backlash.

Inflation Radius Mapping

R_inflate = SF × √(σ_repeatability² + σ_sensor² + σ_backlash²)

Computes minimum costmap inflation radius to guarantee safety margin against combined uncertainties.

Variables:
SymbolNameUnitDescription
R_inflate Inflation radius m Minimum radial distance added to obstacle representation in costmap
SF Safety factor dimensionless Industry-recommended multiplier (typically 2–4) per ISO 13849-1
σ_repeatability Positional repeatability m Robot end-effector repeatability per ISO 9283
σ_sensor Sensor measurement uncertainty m Maximum expected error in obstacle detection (e.g., LiDAR or 3D camera)
σ_backlash Mechanical backlash m Cumulative gear/joint play affecting pose accuracy
Typical Ranges:
High-precision welding cell: 0.03 - 0.05 m
Heavy-duty palletizing station: 0.08 - 0.12 m

💡 Worked Example

Problem: Given: end-effector positional repeatability = ±0.15 mm (ISO 9283), LiDAR range uncertainty = ±12 mm at 2 m, maximum expected mechanical backlash = 0.3 mm, and required safety factor = 3.0. Calculate the minimum inflation radius (R_inflate) for the static_layer costmap.
1. Step 1: Aggregate worst-case uncertainty: √(0.15² + 12² + 0.3²) ≈ √(144.18) ≈ 12.007 mm
2. Step 2: Apply safety factor: 12.007 mm × 3.0 = 36.02 mm → 0.036 m
3. Step 3: Round up to nearest standard costmap resolution (0.05 m grid): R_inflate = 0.05 m
Answer: The result is 0.05 m, which falls within the safe range of 0.03–0.10 m for high-precision industrial cells.

🏗️ Real-World Application

At ABB’s RobotStudio-integrated ROS 2 pilot line in Västerås, Sweden, engineers customized Nav2 for an IRB 2600 manipulator performing laser welding inside a guarded cell. They replaced nav2_behavior_tree with a custom BT node that triggers MoveIt 2’s ‘compute_cartesian_path’ when receiving a Nav2 ‘navigate_to_pose’ goal—interpreting the goal pose as a TCP target in base_link frame. The static_layer was preloaded with a 3D mesh-derived binary occupancy grid (0.02 m resolution), and the inflation_layer used R_inflate = 0.04 m per ISO/IEC 62443-3-3 Annex F guidance. This reduced unplanned stops by 92% versus stock Nav2 deployment.

📚 References