MoveIt 2 Motion Planning Configuration

View Package on GitHub

Overview

This package contains the necessary config files to get any rover in the Interbotix X-Series LoCoBot Family working with MoveIt. This package makes use of the FollowJointTrajectory interface which works well in both simulation and on the physical robot. An entrypoint launch file is provided to allow a user to choose whether to have MoveIt work with the simulated version, the physical robot hardware, or a MoveIt-generated mock robot.

Structure

../_images/xslocobot_moveit_flowchart_ros2.png

As shown above, this package builds on top of the interbotix_xsarm_sim, interbotix_xsarm_control, and interbotix_xsarm_descriptions packages. To get familiar with those packages, please refer to their documentation. Regarding the MoveIt specific nodes, they are described below:

  • move_group - responsible for planning the trajectories needed to achieve a particular arm/gripper pose
  • rviz - responsible for showing the robot model and including the MoveIt MotionPlanning plugin

Usage

To run this package on the physical robot, enter the command below in a terminal (assuming the 'locobot_px100' with no lidar is being launched).

$ ros2 launch interbotix_xslocobot_moveit xslocobot_moveit.launch.py robot_model:=locobot_px100 hardware_type:=actual

If running this package on a robot simulated in Gazebo Classic, enter the command below in a terminal (assuming the 'locobot_wx200' with lidar is being launched).

$ ros2 launch interbotix_xslocobot_moveit xslocobot_moveit.launch.py robot_model:=locobot_wx200 use_lidar:=true hardware_type:=gz_classic

If running this package on a MoveIt generated mock robot, enter the command below in a terminal (assuming the 'locobot_wx250s' with no lidar is being launched).

$ ros2 launch interbotix_xslocobot_moveit xslocobot_moveit.launch.py robot_model:=locobot_wx250s hardware_type:=fake

This is the bare minimum needed to get up and running. Take a look at the table below to see how to further customize with other launch file arguments.

Argument Description Default Choices
robot_model model type of the Interbotix Locobot such as locobot_base or locobot_wx250s. EnvVar(INTERBOTIX_XSLOCOBOT_ROBOT_MODEL) locobot_base, locobot_px100, locobot_wx200, locobot_wx250s
robot_name name of the robot (could be anything but defaults to locobot). locobot  
arm_model the Interbotix Arm model on the locobot; this should never be set manually but rather left to its default value. PythonExpr('"mobile_" + "' + LaunchConfig(robot_model) + '".split("_")[1]')  
use_lidar if true, the RPLidar node is launched. false true, false
external_srdf_loc the file path to the custom semantic description file that you would like to include in the Interbotix robot's semantic description. ''  
mode_configs the file path to the 'mode config' YAML file. LocalVar('FindPackageShare(pkg= interbotix_xslocobot_moveit) + 'config' + 'modes_all.yaml'')  
xs_driver_logging_level set the logging level of the X-Series Driver. INFO DEBUG, INFO, WARN, ERROR, FATAL
use_moveit_rviz launches RViz with MoveIt's RViz configuration. true true, false
rviz_config_file file path to the config file RViz should load. LocalVar('FindPackageShare(pkg= interbotix_xslocobot_moveit) + 'rviz' + 'xslocobot_moveit.rviz'')  
world_filepath the file path to the Gazebo 'world' file to load. LocalVar('FindPackageShare(pkg= interbotix_common_sim) + 'worlds' + 'interbotix.world'')  
use_sim_time tells ROS nodes asking for time to get the Gazebo-published simulation time, published over the ROS topic /clock; this value is automatically set to true if using Gazebo hardware. false true, false
base_type the base type of the LoCoBot. EnvVar(INTERBOTIX_XSLOCOBOT_BASE_TYPE) kobuki, create3
use_gripper if true, the default gripper is included in the robot_description; if false, it is left out; set to false if not using the default gripper. true true, false
show_ar_tag if true, the AR tag mount is included in the robot_description; if false, it is left out; set to true if using the AR tag mount in your project. true true, false
show_gripper_bar if true, the gripper_bar link is included in the robot_description; if false, the gripper_bar and finger links are not loaded. Set to false if you have a custom gripper attachment. true true, false
show_gripper_fingers if true, the gripper fingers are included in the robot_description; if false, the gripper finger links are not loaded. Set to false if you have custom gripper fingers. true true, false
external_urdf_loc the file path to the custom urdf.xacro file that you would like to include in the Interbotix robot's urdf.xacro file. ''  
hardware_type configures the robot_description to use the actual hardware, fake hardware, or hardware simulated in Gazebo. actual actual, fake, gz_classic
robot_description URDF of the robot; this is typically generated by the xacro command. Command(FindExec(xacro) + ' ' + LocalVar('FindPackageShare(pkg= interbotix_xslocobot_descriptions) + 'urdf' + 'locobot.urdf.xacro'') + ' ' + 'arm_model:=' + LaunchConfig(arm_model) + ' ' + 'robot_name:=' + LaunchConfig(robot_name) + ' ' + 'base_model:=' + LaunchConfig(base_type) + ' ' + 'robot_model:=' + LaunchConfig(robot_model) + ' ' + 'use_gripper:=' + LaunchConfig(use_gripper) + ' ' + 'show_ar_tag:=' + LaunchConfig(show_ar_tag) + ' ' + 'show_gripper_bar:=' + LaunchConfig(show_gripper_bar) + ' ' + 'show_gripper_fingers:=' + LaunchConfig(show_gripper_fingers) + ' ' + 'use_lidar:=' + LaunchConfig(use_lidar) + ' ' + 'external_urdf_loc:=' + LaunchConfig(external_urdf_loc) + ' ' + 'hardware_type:=' + LaunchConfig(hardware_type) + ' ')  

Notes

Once the MoveIt GUI is fully loaded, take a look at the available planning groups. There should be two of them - one called 'interbotix_arm' and the other called 'interbotix_gripper'. The 'interbotix_arm' group contains the joints needed to plan the trajectories for the whole arm (excluding the gripper) while the 'interbotix_gripper' group contains the joints needed to plan the trajectories for the gripper (based on the linear distance from the 'right_finger_link' to the 'fingers_link'). There are a few saved poses for each of these groups that be executed such as 'Home', 'Sleep', and 'Upright' poses for the 'interbotix_arm' group, and 'Released', 'Grasping', and 'Home' for the 'interbotix_gripper' group ('Home' just moves the gripper such that the angular position of the motor is at 0 radians). Also, it should be noted that the gripper frame of reference is located at the 'ee_gripper_link'.

Additionally, by default, the MoveIt GUI does not display the green or orange robots that represent the start and goal states for the arm respectively. To display them, navigate to the MotionPlanning -> Planning Request dropdown in RViz and check the Query Start State and Query Goal State checkboxes.