Configuring a Custom Robot

MoveIt Pro uses robot configuration packages to specify all parameters necessary for launching the application. When the MoveIt Pro Agent is launched, it loads robot description info and system settings from a specified configuration package. These configuration packages are implemented as ROS 2 packages, meaning that you can create your own packages when developing with MoveIt Pro.

Importantly, configuration packages can inherit from each other. This enables users to create parent configuration packages that might define a family of broadly-similar robots defined in child configuration packages.

For example, as shown in the diagram below, all of PickNik’s UR5e robots inherit from the same base configuration package. Different instantiations of the UR5e robot will inherit, override, or add additional parameters on top of their parent’s config to describe the differences between each unique robot. These packages may contain information about a specific robot, such as kinematic calibration data, network settings, or environment information.

graph TB Base[picknik_ur_base_config] --> Site[picknik_ur_site_config] Base --> Mock[picknik_ur_mock_hw_config] Site --> Gazebo[picknik_ur_gazebo_config] Site --> Picknik[Other PickNik configs]

MoveIt Pro includes a few configuration packages you can switch between. When you install MoveIt Pro, the configuration packages above are installed by default in a workspace cloned from the moveit_studio_ur_ws repository. You can refer to this repository while reading this document, and later on when you decide to create your own configuration packages.

As an example, MoveIt Pro can be configured to use an example configuration named picknik_ur_base_config from the moveit_studio_ur_ws repo. This package describes a Universal Robots UR5e manipulator with a Robotiq 2F-85 gripper. To do this, start MoveIt Pro as follows:

./moveit_pro run -c picknik_ur_base_config

Or if you are directly modifying the .env file, modify it as follows:


In this case, since the picknik_ur_base_config package is defined in an external workspace located in ~/moveit_pro/moveit_studio_ur_ws, it must be mounted into MoveIt Pro by setting STUDIO_HOST_USER_WORKSPACE to this path.


The above steps assume MoveIt Pro was installed to the default directory, ~/moveit_pro. If you installed to a different directory, this path should change accordingly.

1. Create the ROS 2 Package

The structure of the package will be as follows. We will be using the picknik_ur_base_config package as reference.


Fill in package.xml

If your configuration requires resources from other packages or is inheriting from another config, tag them as dependencies here. Below is an example with dependencies for configuring a UR5e arm with an Intel Realsense camera and a Robotiq gripper:

<?xml version="1.0"?>
<package format="3">

  <description>Base configuration package for Picknik's UR robot arms</description>

  <maintainer email="[email protected]">MoveIt Pro Maintainer</maintainer>







Fill in CMakeLists.txt

The CMakeLists.txt defines the install targets for all the shared package artifacts. The example below installs all the populated subdirectories to the package’s share directory:

cmake_minimum_required(VERSION 3.16.3)

find_package(ament_cmake REQUIRED)



1. Create and populate a config.yaml file

Each configuration package requires a config/config.yaml file that defines various settings, including:

  • URDF and SRDF files defining the setup’s robot description and semantics.
  • Configuration for robot drivers, controllers, and sensors
  • Configuration for the MoveIt instance
  • Definitions for MoveIt Pro Objectives and Behaviors

The config/config.yaml tells the MoveIt Pro Agent precisely what resources to load and how to configure them at runtime. The following sections describe how to prepare the resources and configure the config for MoveIt Pro to launch successfully.

Configuring Robot Description and Semantics

The MoveIt Pro config requires the robot_description property to point to the robot description and semantics files using the urdf and srdf keys. For the urdf key, either a XACRO or URDF file can be used. If a XACRO file is used, the corresponding URDF file is generated with each launch. Optional XACRO arguments can be defined using the urdf_params key. URDF or XACRO files are typically placed in the description folder of a configuration package, the SRDF file is commonly placed inside config/moveit/. However, it is also possible to point to an existing MoveIt configuration or other ROS 2 packages.

Below is a simplified example from the picknik_ur_base_config.

# Parameters used to configure the robot description through XACRO.
# A URDF and SRDF are both required.
# [Required]
    package: "picknik_ur_base_config"
    path: "description/picknik_ur.xacro"
    package: "picknik_ur_base_config"
    path: "config/moveit/picknik_ur.srdf"

  # Specify any additional parameters required for the URDF and SRDF.
  # Many of these are specific to the UR descriptions packages, and can be customized as needed.
  # [Optional]
    - name: "picknik_ur5e"
    - prefix: ""

Note: Configuring UI Grasp Previews

MoveIt Pro defaults to using a Robotiq 2F-85 gripper for previewing grasp poses. This can be overridden by setting the web_ui_gripper parameter in your description files to specify a standalone gripper URDF to use in previews.

For example, to include the default from the picknik_ur_base_config in the moveit_studio_ur_ws repository, add the following to your description package:

<xacro:attribute name="web_ui_gripper" value="package://picknik_ur_base_config/description/robotiq_2f_85_gripper.urdf" />

Configuring Robot Drivers and Controllers

The MoveIt Pro config supports specifying the robot’s runtime configuration, including hardware drivers, simulation backends and controllers.

Add robot and driver launch files

These launch files, usually found in the launch folder, define nodes specific to this robot that should be launched with the other Agent nodes at system startup. You can specify different launch files for simulation vs. hardware environments, which are controlled by the hardware.simulated option in config/config.yaml.

# Set simulated to false if you are using this as a configuration for real hardware.
# Override-able by setting the $MOCK_HARDWARE environment variable to 'True'.
# This allows users to switch between mock and real hardware using the same configuration.
# [Required]
simulated: ${MOCK_HARDWARE:-true}

# The robot's IP address.
# [Required]
ip: ""

# Specify additional launch files for running the robot with real hardware.
# [Optional, defaults to a blank launch file if not specified]
  package: "picknik_ur_base_config"
  path: "launch/"
  package: "moveit_studio_agent"
  path: "launch/"

# Specify any additional launch files for running the robot in simulation mode.
# Used when hardware.simulated is True.
# [Optional, defaults to a blank launch file if not specified]
  package: "picknik_ur_base_config"
  path: "launch/sim/"
  package: "moveit_studio_agent"
  path: "launch/"

Configure ROS 2 Control

MoveIt Pro can be configured to bring up the ROS 2 control node and controllers with each launch, using the launch_control_node and ros2_control properties.

For that, it’s first required to prepare a ROS 2 configuration file for your robot. Typically, this file is given a name describing the robot being controlled. In our example package, this is picknik_ur5e.ros2_control.yaml, placed inside config/control/.

The launch_control_node option, the ros2_control configuration file setting and controller initialization is shown in the example below.

# If the MoveIt Pro Agent should launch the ros2 controller node.
# [Optional, default=True]
launch_control_node: True

# Configuration for launching ros2_control processes.
# [Required, if using ros2_control]
    package: "picknik_ur_base_config"
    path: "config/control/picknik_ur.ros2_control.yaml"

  # MoveIt Pro will load and activate these controllers at start up to ensure they are available.
  # If not specified, it is up to the user to ensure the appropriate controllers are active and available
  # for running the application.
  # [Optional, default=[]]
    - "force_torque_sensor_broadcaster"
    - "robotiq_gripper_controller"
    - "joint_state_broadcaster"
    - "servo_controller"
    - "io_and_status_controller"
    - "robotiq_activation_controller"
  # Load but do not start these controllers so they can be activated later if needed.
  # [Optional, default=[]]
    - "joint_trajectory_controller"
    - "admittance_controller_open_door"
    - "joint_trajectory_controller_chained_open_door"
  # Any controllers here will not be spawned by MoveIt Pro.
  # [Optional, default=[]]
  controllers_not_managed: []
  # Optionally configure remapping rules to let multiple controllers receive commands on the same topic.
  # [Optional, default=[]]
  controller_shared_topics: []

Configuring MoveIt Runtime

The config package allows configuring any of the MoveIt runtime properties using the same yaml files obtained from the MoveIt Setup Assistant. However, instead of depending on a MoveIt config package, the yaml files need to be added to the configuration package’s config/moveit/ subdirectory.

The config files supported by MoveIt Pro include:

  • joint_limits.yaml: Sets joint position, velocity, acceleration, and effort limits to use when planning and parameterizing robot motion.
  • kinematics.yaml: Configures MoveIt’s kinematics solvers. Note you can specify multiple kinematics files for different applications, for example for motion planning vs. servoing.
  • ompl_planning.yaml: Defines settings for MoveIt’s OMPL planners.
  • pilz_cartesian_limits.yaml: Defines Cartesian velocity and acceleration limits for the Pilz Industrial Motion Planner.
  • sensors_3d.yaml: Defines how the MoveIt MoveGroup node should handle point clouds from the robot’s RGB-D cameras.
  • ur5e_servo.yaml: Configures settings for the MoveIt Servo server node.

All MoveIt config files can be configured using the moveit_params property as shown below:

# Configuration files for MoveIt.
# For more information, refer to
# [Required]
  # Used by the Waypoint Manager to save joint states from this joint group.
  joint_group_name: "manipulator"

    package: "picknik_ur_base_config"
    path: "config/moveit/ompl_planning.yaml"
    package: "picknik_ur_base_config"
    path: "config/moveit/stomp_planning.yaml"
    package: "picknik_ur_base_config"
    path: "config/moveit/pilz_industrial_motion_planner_planning.yaml"
    package: "picknik_ur_base_config"
    path: "config/moveit/trac_ik_kinematics_distance.yaml"
    package: "picknik_ur_base_config"
    path: "config/moveit/ur_servo.yaml"
    package: "picknik_ur_base_config"
    path: "config/moveit/sensors_3d.yaml"
    package: "picknik_ur_base_config"
    path: "config/moveit/trac_ik_kinematics_speed.yaml"
    package: "picknik_ur_base_config"
    path: "config/moveit/joint_limits.yaml"
    package: "picknik_ur_base_config"
    path: "config/moveit/pilz_cartesian_limits.yaml"

    planning_scene: True
    geometry_updates: True
    state_updates: True
    transforms_updates: True

    manage_controllers: True
    allowed_execution_duration_scaling: 2.0
    allowed_goal_duration_margin: 5.0
    allowed_start_tolerance: 0.01

Configuring Camera Sensors

This file, typically found in config/cameras.yaml, tells MoveIt Pro which camera driver nodes to launch and how they relate to the sensor hardware associated with the robot. A generic example of a cameras.yaml file can be found below.

    video_device: "/dev/video0"
    camera_name: "web_camera"
    type: "usb_camera"
    use: True
    io_method: "mmap"
    frame_id: "world_external_web_camera"
    pixel_format: "yuyv"
    framerate: 10.0
    image_width: 640
    image_height: 480
    topic: "web_camera/image_raw"

To find the actual device ID for the video_device parameter, run v4l2-ctl –list-devices from the command line.

The framerate, image_width, and image_height parameters can be modified to adjust the properties of the streamed video. The topic parameter sets which ROS topic the images will be published onto.

Configuring Objectives and Behaviors

The objectives directory contains XML Objective definition files that define the Objectives which the robot can run. This directory also contains the files standard_tree_nodes_model.xml and tree_nodes_model.xml, which provide the necessary metadata needed to display Objectives and Behaviors in the web app.

Below is an example of including Objectives and Behaviors in your package by adding the following sections of the config/config.yaml file:

  # List of plugins for loading custom Behaviors.
    # This plugin will load the core MoveIt Pro Behaviors.
    # Add additional plugin loaders as needed.
      - "moveit_studio::behaviors::CoreBehaviorsLoader"
  # Specify source folder for objectives
      package_name: "picknik_ur_base_config"
      relative_path: "objectives"

Configuring predefined Waypoints

The waypoints/waypoints.yaml file defines a set of named robot joint states that the Agent can retrieve and plan to during an Objective. This file replaces the named group states commonly included in the robot’s SRDF file. Waypoints can be saved and edited during runtime, as explained further in Configuring MoveIt Pro.

Configuration Package Inheritance

Any configuration package can be inherited from and specialized using additional parameters and configuration artifacts. This is useful for sharing common objectives or robot setups between different hardware deployments.

An inherited configuration package defines the parent package name using the based_on_package parameter inside the config.yaml. All other properties in the config.yaml and all configuration artifacts will then default to the parent’s configuration, but they may be overridden in the child’s config.yaml.

A minimal package structure will only include the following files.


A common pattern is to use a different URDF xacro file for the config than the one in the parent configuration package. To do this, create a new URDF xacro file in a directory within the configuration package, then override the package name and relative path to the URDF xacro file in config.yaml. Another common pattern is to define additional Objectives and Behaviors available in the config/config.yaml file.

The config.yaml below shows an example inheritance configuration with overrides for hardware and objectives:

# Extend the basic Universal Robots configuration
based_on_package: picknik_ur_base_config

      package: "picknik_ur_site_config"
      path: "description/my_customized_robot.xacro"

    # You must use a unique key for each Behavior plugin.
    # The picknik_ur_base_config uses "core"
      package_name: "my_custom_behaviors::MyCustomBehaviorsLoader"
    # You must use a unique key for each package.
    # The picknik_ur_base_config uses "core"
      package_name: "picknik_ur_site_config"
      relative_path: "objectives"