Skip to content

Tutorial Connect to Robot Controller

Daniel Ordonez edited this page Aug 13, 2019 · 4 revisions

Tutorial: Connect to the robot controller

This tutorial covers:

  • Explanation of the connection process with the FS100 Motoman controller
  • Operation of the CSDA10F robot through Rviz and Moveit interfaces.

It is important to note that some of the content is taken from the motoman_driver tutorial "Using the Motoman FS/DX interface" and that it is recommended to the user to refer to this tutorial for further understanding.

Preparation

Prior to executing ROS motion

  • Make sure the FS/DX controller is ready:

    • Installation and setup of MotoROS driver must be complete

    • Pendant key switch must be in Remote mode

    • The E-stop latch must be released

  • "robot_enable" service is called.

    When a new ROS motion command is received, the robot will check for the required conditions. If the controller is not ready to execute motion, an error message will be printed, and the motion command will be rejected. Make sure to re-enable the robot by calling "robot_enable" again before re-sending the motion commands.

    You can call this service by opening a new terminal and typing:

    rosservice call robot_enable
    
  • After the motion is complete, call the "robot_disable". This stops the job when the Motoplus is in the IDLE state.

Connect with the robot controller

To initiate a connection with the robot controller, it is required to know the IP address of the controller, once we know it, type the following command in a new terminal.

roslaunch invite_motoman_support robot_interface_streaming_csda10f.launch robot_ip:="<controller_ip>"

Replace <controller_ip> for the ip address of the controller

This launch file loads specific parameters of the CSDA10F robot and starts the motoman_driver robot_multigroup_interface_streaming_fs100.launch to bring all the required interface nodes to achieve communication and robot operation.

If no error appears, a way to test the connection is to see the joint positions, to do this open a new terminal and type:

rostopic echo joint_states

This will publish all the messages of the joint_states topic, which is used by the robot controller to communicate back to the ROS computer the current position of all joints.

Operate the robot through Rviz and Moveit graphical interface

Using the Rviz and Moveit interfaces we could visualize in real-time the status of the robot and control it (plan movements) using Moveit motion planning framework.

In order to accomplish this you need to open a new terminal and type:

# Start Rviz+Moveit interface for GUI controlling of the real robot 
roslaunch invite_motoman_moveit_config moveit_planning_execution
.launch robot_ip:="<robot_ip>"

This file launch the previously used robot_interface_streaming_csda10f.launch (opening a connection with the robot controller), a robot state publisher, the move group interface and finally Rviz.

Configuration files requirements

This file defines the mapping between various motion groups on the robot controller, for both state information and motion control. The parameter topic_list parameter is used by various nodes of the motoman_driver package on startup.

This file defines the naming convention of all the robot joints, this is required since the standard ROS naming convention is not used for Motoman robots.

The controller_joint_names parameter is used by the robot_state_interface and joint_trajectory_interface nodes from the motoman_driver package.