Source Build: Windows

Installing MoveIt from source is the first step in contributing new features, optimizations, and bug fixes back to the open source project. Thanks for getting involved!


Prerequisites

ROS for Windows requires 64-bit Windows 10 Desktop or Windows 10 IoT Enterprise.

Install

Follow all the Install ROS on Windows instructions to install the Last Known Good (LKG) Build Installation for Melodic.

MoveIt Source Installation on Windows

Open an elevated ROS Command Window as described in the installation instructions (x64 Native Tools Command Prompt).

Create Workspace and Source

Optionally create a new workspace, you can name it whatever:

:: activate the ROS environment
c:\opt\ros\melodic\x64\setup.bat

:: create a empty workspace
mkdir c:\moveit_ws\src
cd c:\moveit_ws

Download Dependencies

In the same ROS Command Window run the following to obtain the dependencies for MoveIt.

pushd c:\moveit_ws

:: generate the released package sources list and its ROS dependencies
rosinstall_generator moveit msft_ros_pkgs moveit_resources moveit_tutorials moveit_visual_tools pcl_ros --rosdistro melodic --deps --upstream-development --exclude octomap > build.rosinstall

:: download the source list to override specific packages with the ms-iot versions
curl -o overrides.rosinstall https://raw.githubusercontent.com/ms-iot/ros-windows-build/master/ros-catkin-build/melodic/build.rosinstall

:: checkout the sources from the above lists
wstool init src
wstool merge -r -y -t src build.rosinstall
wstool merge -r -y -t src overrides.rosinstall
wstool update -t src

:: attempt to acquire the external dependencies
set ChocolateyInstall=c:\opt\chocolatey
choco source add -n=ros-win -s="https://roswin.azurewebsites.net/api/v2" --priority=1
rosdep update
rosdep install --from-paths src --ignore-src -r -y
pip install --upgrade --force-reinstall cmake==3.16.3

Build MoveIt and Dependencies

Run the following to build MoveIt. Note this may take over an hour.

pushd c:\moveit_ws

copy src\catkin\bin\catkin_make_isolated src\catkin\bin\catkin_make_isolated.py

python src\catkin\bin\catkin_make_isolated.py ^
--install-space "c:/opt/ros/melodic/x64" ^
--use-nmake ^
--install ^
--only-pkg-with-deps ^
msft_ros_pkgs moveit_resources moveit_tutorials moveit_visual_tools pcl_ros ^
-DCMAKE_BUILD_TYPE=RelWithDebInfo ^
-DCMAKE_PREFIX_PATH="C:/opt/ros/melodic/x64;C:/opt/rosdeps/x64" ^
-DCMAKE_VERBOSE_MAKEFILE=ON ^
-DPYTHON_VERSION=2.7 ^
-DPYTHON_EXECUTABLE=C:\opt\python27amd64\python.exe ^
-DPYTHON_LIBRARIES=C:\opt\python27amd64\Libs ^
-DCATKIN_SKIP_TESTING=ON