ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I had a similar problem like you. I am working with Kuka kr6 r700-2. I made the urdf file by my own as it is not added in the github link yet. Here is the steps that I followed to solve my problem:-

After creating the moveit package for the robot, go to

kuka_moveit_config package > config

And make a file named as controllers.yaml

and copy this code:-

controller_list:
  - name: ""
    action_ns: joint_trajectory_action
    type: FollowJointTrajectory
    joints: [joint_a1, joint_a2, joint_a3, joint_a4, joint_a5, joint_a6]

And make another file as controller_joint_names.yaml and copy this code :-

controller_joint_names: ["joint_a1", "joint_a2", "joint_a3", "joint_a4", "joint_a5", "joint_a6"]

Then edit this file:-

kuka_moveit_config package > launch > robot_moveit_controller_manager.launch.xml

as follows:- (don't forget to edit "Name_of_your_moveit_package" in the code to your moveit_package name) <launch>

  <!-- loads moveit_controller_manager on the parameter server which is taken as argument 
    if no argument is passed, moveit_simple_controller_manager will be set -->
  <arg name="moveit_controller_manager" default="moveit_simple_controller_manager/MoveItSimpleControllerManager" />
  <param name="moveit_controller_manager" value="$(arg moveit_controller_manager)"/>

  <!-- loads ros_controllers to the param server -->
  <rosparam file="$(find <Name_of_your_moveit_package>)/config/controllers.yaml"/>
</launch>

Now go to :

kuka_moveit_config package > launch

And create a launch file named as moveit_planning_execution.launch, copy paste the following code:- (don't forget to edit "Name_of_your_moveit_package" in the code to your moveit_package name)

Note: The below code is for EKI interface. For RSI interface, edit the line number 31 and include the robot_interface_streaming.launch from rsi package and you are good to go.

<launch>
  <!-- The planning and execution components of MoveIt! configured to run -->
  <!-- using the ROS-Industrial interface. -->

  <!-- Non-standard joint names:
       - Create a file [robot_moveit_config]/config/joint_names.yaml
           controller_joint_names: [joint_1, joint_2, ... joint_N] 
       - Update with joint names for your robot (in order expected by rbt controller)
       - and uncomment the following line: -->
  <rosparam command="load" file="$(find <Name_of_your_moveit_package>)/config/controller_joint_names.yaml"/> -->
 <arg name="debug" default="false" />
  <!-- the "sim" argument controls whether we connect to a Simulated or Real robot -->
  <!--  - if sim=false, a robot_ip argument is required -->
  <arg name="sim" default="true" />
  <arg name="robot_ip" unless="$(arg sim)" />

  <!-- load the robot_description parameter before launching ROS-I nodes -->
  <include file="$(find <Name_of_your_moveit_package>)/launch/planning_context.launch" >
    <arg name="load_robot_description" value="true" />
  </include>

  <!-- run the robot simulator and action interface nodes -->
  <group if="$(arg sim)">
    <include file="$(find industrial_robot_simulator)/launch/robot_interface_simulator.launch" />
  </group>

  <!-- run the "real robot" interface nodes -->
  <!--   - this typically includes: robot_state, motion_interface, and joint_trajectory_action nodes -->
  <!--   - replace these calls with appropriate robot-specific calls or launch files -->
  <group unless="$(arg sim)">
    <include file="$(find kuka_eki_hw_interface)/launch/robot_interface_streaming.launch" >
      <arg name="robot_ip" value="$(arg robot_ip)"/>
    </include>
  </group>

  <!-- publish the robot state (tf transforms) -->
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />

  <include file="$(find <Name_of_your_moveit_package>)/launch/move_group.launch">
    <arg name="publish_monitored_planning_scene" value="true" />
  </include>

  <include file="$(find <Name_of_your_moveit_package>)/launch/moveit_rviz.launch">
     <arg name="rviz_config" value="$(find kuka0_moveit_config)/launch/moveit.rviz"/>
    <arg name="debug" value="$(arg debug)"/>
  </include>

  <include file="$(find <Name_of_your_moveit_package>)/launch/default_warehouse_db.launch" />

</launch>

Now in the terminal use this command :-

roslaunch <Name_of_your_moveit_package> moveit_planning_execution.launch sim:=false robot_ip:=<write_your_robot's_IP_here>

Now the Rviz window will be open and it can be used to plan and execute the trajectories on the real robot.

I had a similar problem like you. I am working with Kuka kr6 r700-2. I made the urdf file by my own as it is not added in the github link yet. Here is the steps that I followed to solve my problem:-

After creating the moveit package for the robot, go to

kuka_moveit_config package > config

And make a file named as controllers.yaml

and copy this code:-

controller_list:
  - name: ""
    action_ns: joint_trajectory_action
    type: FollowJointTrajectory
    joints: [joint_a1, joint_a2, joint_a3, joint_a4, joint_a5, joint_a6]

And make another file as controller_joint_names.yaml and copy this code :-

controller_joint_names: ["joint_a1", "joint_a2", "joint_a3", "joint_a4", "joint_a5", "joint_a6"]

Then edit this file:-

kuka_moveit_config package > launch > robot_moveit_controller_manager.launch.xml

as follows:- (don't forget to edit "Name_of_your_moveit_package" in the code to your moveit_package name) <launch>name)

<launch>


      <!-- loads moveit_controller_manager on the parameter server which is taken as argument 
     if no argument is passed, moveit_simple_controller_manager will be set -->
   <arg name="moveit_controller_manager" default="moveit_simple_controller_manager/MoveItSimpleControllerManager" />
   <param name="moveit_controller_manager" value="$(arg moveit_controller_manager)"/>

   <!-- loads ros_controllers to the param server -->
   <rosparam file="$(find <Name_of_your_moveit_package>)/config/controllers.yaml"/>
 </launch>

Now go to :

kuka_moveit_config package > launch

And create a launch file named as moveit_planning_execution.launch, copy paste the following code:- (don't forget to edit "Name_of_your_moveit_package" in the code to your moveit_package name)

Note: The below code is for EKI interface. For RSI interface, edit the line number 31 and include the robot_interface_streaming.launch from rsi package and you are good to go.

<launch>
  <!-- The planning and execution components of MoveIt! configured to run -->
  <!-- using the ROS-Industrial interface. -->

  <!-- Non-standard joint names:
       - Create a file [robot_moveit_config]/config/joint_names.yaml
           controller_joint_names: [joint_1, joint_2, ... joint_N] 
       - Update with joint names for your robot (in order expected by rbt controller)
       - and uncomment the following line: -->
  <rosparam command="load" file="$(find <Name_of_your_moveit_package>)/config/controller_joint_names.yaml"/> -->
 <arg name="debug" default="false" />
  <!-- the "sim" argument controls whether we connect to a Simulated or Real robot -->
  <!--  - if sim=false, a robot_ip argument is required -->
  <arg name="sim" default="true" />
  <arg name="robot_ip" unless="$(arg sim)" />

  <!-- load the robot_description parameter before launching ROS-I nodes -->
  <include file="$(find <Name_of_your_moveit_package>)/launch/planning_context.launch" >
    <arg name="load_robot_description" value="true" />
  </include>

  <!-- run the robot simulator and action interface nodes -->
  <group if="$(arg sim)">
    <include file="$(find industrial_robot_simulator)/launch/robot_interface_simulator.launch" />
  </group>

  <!-- run the "real robot" interface nodes -->
  <!--   - this typically includes: robot_state, motion_interface, and joint_trajectory_action nodes -->
  <!--   - replace these calls with appropriate robot-specific calls or launch files -->
  <group unless="$(arg sim)">
    <include file="$(find kuka_eki_hw_interface)/launch/robot_interface_streaming.launch" >
      <arg name="robot_ip" value="$(arg robot_ip)"/>
    </include>
  </group>

  <!-- publish the robot state (tf transforms) -->
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />

  <include file="$(find <Name_of_your_moveit_package>)/launch/move_group.launch">
    <arg name="publish_monitored_planning_scene" value="true" />
  </include>

  <include file="$(find <Name_of_your_moveit_package>)/launch/moveit_rviz.launch">
     <arg name="rviz_config" value="$(find kuka0_moveit_config)/launch/moveit.rviz"/>
    <arg name="debug" value="$(arg debug)"/>
  </include>

  <include file="$(find <Name_of_your_moveit_package>)/launch/default_warehouse_db.launch" />

</launch>

Now in the terminal use this command :-

roslaunch <Name_of_your_moveit_package> moveit_planning_execution.launch sim:=false robot_ip:=<write_your_robot's_IP_here>

Now the Rviz window will be open and it can be used to plan and execute the trajectories on the real robot.

robot.