Trouble moving from simulation to robot

asked 2019-07-10 13:35:19 -0500

pathare gravatar image

updated 2019-07-10 13:57:05 -0500

I have a kuka iiwa that I'm trying to move using moveit using the iiwa stack https://github.com/IFL-CAMP/iiwa_stack. I started by trying to follow the tutorials for configuring through the moveit setup assistant and modifying the files according to what they suggest here https://github.com/IFL-CAMP/iiwa_stac.... when I try to run this I get the error I'm currently getting below. After a bunch of searching and no solution I decided to start over using the ROS Industrial tutorials for creating a moveit package here https://industrial-training-master.re.... I think what fixed my problem was using the industrial robot simulator and passing it my joint names directly as below:

<group if="$(arg sim)">
        <include file="$(find industrial_robot_simulator)/launch/robot_interface_simulator.launch" />
            <arg name="controller_joint_names" value="iiwa_joint_1, iiwa_joint_2, iiwa_joint_3, iiwa_joint_4, iiwa_joint_5, iiwa_joint_6, iiwa_joint_7"/>

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

but I feel like this was a workaround to my actual problem that I have now hit head on again.

here are the contents of my bring up robot file:

<launch>
    <!-- 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 iiwa_moveit)/config/joint_names.yaml"/>


    <!-- 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="false" />
    <arg name="robot_ip" unless="$(arg sim)" />

        <!-- hardware_interface to use : PositionJointInterface, EffortJointInterface, VelocityJointInterface. -->
    <arg name="hardware_interface" default="PositionJointInterface"/>
    <!-- The is gonna have its nodes/topics under a namespace with the same name. -->
    <arg name="robot_name" default="world"/>

    <!-- load the robot_description parameter before launching ROS-I nodes -->
    <include file="$(find iiwa_moveit)/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" />
            <arg name="controller_joint_names" value="iiwa_joint_1, iiwa_joint_2, iiwa_joint_3, iiwa_joint_4, iiwa_joint_5, iiwa_joint_6, iiwa_joint_7"/>

        <!-- publish the robot state (tf transforms) -->
        <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
    </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)" ns="iiwa">
        <param name="publishJointStates" value="True"/> <!--  required for iiwa  driver to publish joint values -->

        <arg name="controllers" value="joint_state_controller $(arg hardware_interface)_trajectory_controller" />

        <!-- Loads joint controller configurations from YAML file to parameter server -->
        <rosparam file="$(find iiwa_control)/config/iiwa_control.yaml" command="load" />

        <!-- Loads the controllers -->
        <node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
              output="screen" args="$(arg controllers) --shutdown-timeout 2" />

        <!-- Robot interface -->
        <include file="$(find iiwa_hw)/launch/iiwa_hw ...
(more)
edit retag flag offensive close merge delete