⌚ Time to complete: 5 min

Planned outcomes

After completing this guide, you will have a working ROS Robot Control Server (RCS), which can simulate as well as control the given industrial robot model. RCS also allows to interact with the ROS robot from Unity, as shown in this guide.

Prerequisites

Before you proceed, make sure that you have:

  1. installed ROS Noetic (How to install ROS Noetic)
  2. installed MoveIt and ROS-Industrial core (How to install MoveIt and ROS-Industrial core)
  3. generated a MoveIt configuration package for your robot (How to create a MoveIt configuration package for a ROS-Industrial robot)
  4. added Unity ROS TCP Endpoint package to your workspace (How to set up ROS endpoint to receive connections from Unity)

Steps

  1. Go to the src folder of your ROS workspace:

    WORKSPACE_NAME="ws_unity_x_ros"
    ROS_WS_PATH=~/ros/${WORKSPACE_NAME}
    
    cd ${ROS_WS_PATH}/src
    
  2. Clone RCS repository:

    git clone <https://github.com/TalTech-IVAR-Lab/robot_control_server.git>
    

    <aside> ⚠️ Repository is currently private, so contact @Yevhen Bondarenko to get access. It will be made public once the initial release of the system is complete.

    </aside>

  3. Rebuild and source your catkin workspace:

    cd ${ROS_WS_PATH}
    catkin build
    
    source ${ROS_WS_PATH}/devel/setup.zsh
    
  4. Store robot name into a variable for future commands:

    ROBOT_NAME="motoman_gp8"
    
  5. Start the server for your robot in the desired mode.

    1. Simulation:

      # Launch robot in simulation
      roslaunch robot_control_server robot_control_server.launch \
      	robot_name:=${ROBOT_NAME} \
      	simulated:=true
      
    2. Physical robot control:

      # Store your robot's IP in a variable
      ROBOT_IP="192.168.74.66"
      
      # Launch physical robot controller
      roslaunch robot_control_server robot_control_server.launch \
      	robot_name:=${ROBOT_NAME} \
      	simulated:=false \
      	robot_ip:=${ROBOT_IP}
      

    <aside> 💡 Once the server starts up, you will see the robot in the Rviz window and will be able to connect and control it from Unity.

    </aside>

  6. Done! 🎉

Notes

References

Getting Started - moveit_tutorials Noetic documentation

Unity-Robotics-Hub/tutorials/ros_unity_integration at main · Unity-Technologies/Unity-Robotics-Hub