Simulation Configuration

View Package on GitHub

Overview

This package contains the necessary config files to simulate any of the many Interbotix X-Series LoCoBots. For now, this package is only able to simulate the LoCoBots in Gazebo Classic. Below is a description of each supported simulation environment's configuration.

  • Gazebo Classic - Contains parameter files that configure trajectory_controllers so that gazebo_ros2_control can control the LoCoBots effectively. This package has one of two applications. It can either be used in conjunction with MoveIt via the FollowJointTrajectory interface or it can be used by itself via the JointTrajectoryController interface.

Structure

../_images/xslocobot_gzclassic_flowchart_ros2.png

As shown above, the interbotix_xslocobot_sim package builds on top of the interbotix_xslocobot_descriptions and other simulator's ROS 2 compatibility packages. To get familiar with the nodes in the interbotix_xslocobot_descriptions package, please look at its README. The other nodes are described below:

  • Gazebo Classic:

    • gzserver - responsible for running the physics update-loop and sensor data generation
    • gzclient - provides a nice GUI to visualize the robot simulation
    • controller_manager - responsible for loading and starting a set of controllers at once, as well as automatically stopping and unloading those same controllers
    • spawn_model - adds the robot model as defined in the 'robot_description' parameter into the Gazebo world

Usage

Gazebo Classic

To run this package, enter the command line below in a terminal (assuming a LoCoBot with a WidowX-200 is being launched).

$ ros2 launch interbotix_xslocobot_sim xslocobot_gz_classic.launch.py robot_model:=locobot_wx200

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
use_rviz launches RViz if set to true; set to false if SSH'd into the physical robot. true true, false
rvizconfig file path to the config file RViz should load. LocalVar('FindPackageShare(pkg= interbotix_xslocobot_sim) + 'rviz' + 'xslocobot_gz_classic.rviz'')  
world_filepath the file path to the Gazebo 'world' file to load. LocalVar('FindPackageShare(pkg= interbotix_common_sim) + 'worlds' + 'interbotix.world'')  
use_gazebo_gui launches the Gazebo GUI if true. true true, false
use_gazebo_verbose launches Gazebo with verbose console logging if true. false true, false
use_gazebo_debug start gzserver in debug mode using gdb. false true, false
start_gazebo_paused start Gazebo in a paused state. false true, false
enable_gazebo_recording enable Gazebo state log recording. false true, false
use_sim_time tells ROS nodes asking for time to get the Gazebo-published simulation time, published over the ROS topic /clock. true 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. gz_classic 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) + ' ')