Fixing MoveIt Setup Assistant (MSA) Crash after ROS2 Updates
🎯 Goal
After some system or ROS2 updates, the MoveIt Setup Assistant (MSA) may crash when loading a URDF or XACRO file.
This problem is not caused by your URDF — it comes from a version mismatch between MoveIt and RViz, which MSA uses internally for visualization.
⚙️ Why this happens
MSA depends on RViz2 to render your robot model.
Sometimes, updates in rviz_common or rviz_rendering (e.g., from version 11.2.16 → 11.2.17) introduce small API changes that break compatibility with MoveIt’s visualization layer.
Typical symptoms:
- MSA crashes immediately when you load your
.urdfor.xacro - Terminal shows:
terminate called after throwing an instance of 'ament_index_cpp::PackageNotFoundError'
what(): package 'xyz' not found...
Aborted (core dumped)
Or you see segmentation faults related to libQt5Widgets or libmoveit_setup_framework.
✅ Step-by-Step Fix
We’ll fix it by building a stable version of RViz2 (11.2.16) locally and using it only when launching MSA.
This avoids touching your main system installation.
1️⃣ Check your current RViz version
Open a terminal and run:
apt-cache policy ros-humble-rviz2 | sed -n '1,5p'
dpkg -s ros-humble-rviz-common | grep -E '^Version|^Package'
Example output:
ros-humble-rviz2:
Installed: 11.2.17-1jammy.20240915.005839
Package: ros-humble-rviz-common
Version: 11.2.17-1jammy.20240915.005839
If your version is higher than 11.2.16, MSA is likely to crash.
2️⃣ Install build dependencies (if missing)
sudo apt update
sudo apt install -y python3-colcon-common-extensions python3-vcstool \
build-essential cmake git
3️⃣ Create a dedicated RViz workspace
We’ll build RViz 11.2.16 from source inside its own overlay workspace.
# Create and navigate to the workspace
mkdir -p ~/rviz2_ws/src
cd ~/rviz2_ws/src
# Clone the official RViz2 repository
git clone https://github.com/ros2/rviz.git
cd rviz
# (Optional) List available tags to verify version names
# git tag | grep 11.2
# Checkout the stable version (the last known good one for MSA)
git checkout 11.2.16
4️⃣ Build RViz 11.2.16
Now build it using the same toolchain as your ROS2 Humble installation:
cd ~/rviz2_ws
source /opt/ros/humble/setup.bash
colcon build --merge-install --symlink-install
This will take a few minutes.
When finished, you’ll find the compiled binaries in ~/rviz2_ws/install/.
5️⃣ Launch MoveIt Setup Assistant using the local RViz build
From now on, whenever you want to run MSA, source your custom RViz overlay first.
# 1) Source ROS2 Humble base
source /opt/ros/humble/setup.bash
# 2) Source your workspace containing your robot packages (URDF/Xacro)
source ~/ur_ws/install/setup.bash
# 3) Source the local RViz 11.2.16 overlay
source ~/rviz2_ws/install/setup.bash
# 4) Launch MSA
ros2 launch moveit_setup_assistant setup_assistant.launch.py
# or equivalently:
# ros2 run moveit_setup_assistant moveit_setup_assistant
✅ The MSA window should now open correctly and display your URDF/XACRO without crashing.