Fading Coder

One Final Commit for the Last Sprint

Home > Notes > Content

Building MoveIt 1 from Source on Ubuntu with ROS Noetic

Notes 1

Ensure the system runs Ubuntu 20.04 LTS alongside ROS Noetic. Initialize dependency tracking and update core packages before proceeding:

sudo rosdep init && rosdep update
sudo apt update && sudo apt full-upgrade
sudo apt install -y python3-wstool python3-catkin-tools python3-rosdep ros-noetic-moveit

Create a dedicated build directory and configure the shell environment. The $ROS_DISTRO variable should resolve to noetic.

mkdir -p ~/moveit_ws/src
cd ~/moveit_ws
source /opt/ros/noetic/setup.bash

Two approaches exist for fetching the toolkit components depending on network stability.

Method A: Automated Manifest Merge Utilize wstool to download all required repositories in a single operation:

wstool init src
wstool merge -t src https://raw.githubusercontent.com/ros-planning/moveit/master/moveit.rosinstall
wstool update -t src
rosdep install -y --from-paths src --ignore-src --rosdistro "$ROS_DISTRO"
catkin config --extend "/opt/ros/$ROS_DISTRO" --cmake-args -DCMAKE_BUILD_TYPE=Release

Method B: Manual Cloning If automated fetching fails, explicit clone the core development branches:

cd ~/moveit_ws/src
git clone -b master https://github.com/ros-planning/moveit_tutorials.git
git clone -b noetic-devel https://github.com/ros-planning/panda_moveit_config.git
git clone -b noetic-devel https://github.com/ros-planning/moveit.git
git clone -b master https://github.com/ros-planning/geometric_shapes.git

Accelerate subsequent compilation cycles by enabling compiler caching:

sudo apt install ccache
export PATH="/usr/lib/ccache:$PATH"
echo 'export PATH=/usr/lib/ccache:$PATH' >> ~/.bashrc
source ~/.bashrc
ccache --show-stats

Return to the workspace root and trigger the build pipeline:

cd ~/moveit_ws
catkin build
source devel/setup.bash

Launch the demonstration interface to validate the installation. The tutorial requires specific display panels to visualize planning pipelines:

roslaunch panda_moveit_config demo.launch rviz_tutorial:=true

Once the GUI initializes, interact with the lower-left widget menu. Select Add and search to the MotionPlanning plugin. This panel enables trajectory generation and collision avoidance visualization for the simulated robot arm.

Diagnostic & Resolution Strategies

Static Library Linking for YAML-CPP Encountering undefined reference to YAML::detail::node_data::convert_to_map or empty_scalar typically stems from dynamic library mismatches. Force static linking during the CMake phase:

link_directories(/usr/local/lib)
target_link_libraries(your_executable yaml-cpp)

Shared Object Path Resolution Run-time errors indicating cannot open shared object file require explicit environment variables:

locate libmoveit_robot_model_loader.so.*
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/ros/noetic/lib"
# Persist via ~/.bashrc for future sessions

RViz Synchronization Warnings Logs displaying Topic '/rviz_visual_tools' unable to connect... indicate temporary publisher delays. This is non-critical during enitial startup. To ensure interface compatibility, reinstall the visualizer dependencies:

sudo apt install --reinstall ros-noetic-rviz
sudo apt install librviz-dev

Symbol Demangling When facing symbol lookup error messages, utilize c++filt to decode mangled identifiers into readable function signatures:

c++filt _ZN18base_local_planner12CostmapModelC1ERKN10costmap_2d9Costmap2DE
# Output: base_local_planner::CostmapModel::CostmapModel(costmap_2d::Costmap2D const&)

This step isolates missing dependencies, often pointing to incorrect find_package() declarations or unlinked CMake targets.

Related Articles

Designing Alertmanager Templates for Prometheus Notifications

How to craft Alertmanager templates to format alert messages, improving clarity and presentation. Alertmanager uses Go’s text/template engine with additional helper functions. Alerting rules referenc...

Deploying a Maven Web Application to Tomcat 9 Using the Tomcat Manager

Tomcat 9 does not provide a dedicated Maven plugin. The Tomcat Manager interface, however, is backward-compatible, so the Tomcat 7 Maven Plugin can be used to deploy to Tomcat 9. This guide shows two...

Skipping Errors in MySQL Asynchronous Replication

When a replica halts because the SQL thread encounters an error, you can resume replication by skipping the problematic event(s). Two common approaches are available. Methods to Skip Errors 1) Skip a...

Leave a Comment

Anonymous

◎Feel free to join the discussion and share your thoughts.