Robotics StackExchange | Archived questions

rqt_gui plugin load error

Hi,

I'm trying to run a Hand-eye-calibration package using an Universal Robots and Artrackalvar. I'm using this package.

I made a launch file that launches the ar tracker, the robot and then the calibration procedure as per instructions in the readme.

<launch>
  <!-- (start your robot's MoveIt! stack, e.g. include its moveit_planning_execution.launch) -->
  <!-- (start your tracking system's ROS driver) -->

  <arg name="robot_ip"/>

  <include file="$(find openni_launch)/launch/openni.launch"/>
  <include file="$(find eye_to_hand_calibration)/launch/ar_tracker.launch"/>
  <include file="$(find ur_modern_driver)/launch/ur5_bringup.launch">
    <arg name="limited" value="true"/>
    <arg name="robot_ip" value="$(arg robot_ip)"/>
    <arg name="reverse_port" value="50001"/>
  </include>
  <include file="$(find ur5_moveit_config)/launch/ur5_moveit_planning_execution.launch">
    <arg name="limited" value="true"/>
  </include>

  <include file="$(find easy_handeye)/launch/calibrate.launch">
    <arg name="eye_on_hand" value="false"/>
    <arg name="namespace_prefix" value="ur5_kinect_handeyecalibration"/>

    <!-- fill in the following parameters according to your robot's published tf frames -->
    <arg name="robot_base_frame" value="base_link"/>
    <arg name="robot_effector_frame" value="ee_link"/>

    <!-- fill in the following parameters according to your tracking system's published tf frames -->
    <arg name="tracking_base_frame" value="camera_link"/>
    <arg name="tracking_marker_frame" value="ar_marker_0"/>
  </include>
</launch>

The original instructions said to use "namespace" argument instead of "namespace_prefix", but I get the following error:

Invalid <arg> tag: cannot override arg 'namespace', which has already been set. 

Arg xml is <arg doc="the namespace the node will run in, and the folder in which the result will be saved" name="namespace" unless="$(arg eye_on_hand)" value="$(arg namespace_prefix)_eye_on_base"/>
The traceback for the exception was written to the log file

When I change to namespace_prefix, everything works almost fine. The package was supposed to launch rviz with two extra gui's, one for saving the poses and run the algorithm, and another for path planning. The gui to save the poses doesn't launch. I get the following error:

[ur5_kinect_handeyecalibration_eye_on_base/namespace_nascimento_Inspiron_rqt-32] process has died [pid 5609, exit code 2, cmd /opt/ros/kinetic/lib/rqt_gui/rqt_gui --clear-config --perspective-file /home/nascimento/Projects/ROS Workspaces/ROS Test Workspace/src/easy_handeye/easy_handeye/launch/rqt_easy_handeye.perspective __name:=namespace_nascimento_Inspiron_rqt __log:=/home/nascimento/.ros/log/d85375b4-0acc-11ea-a950-d80f99a74bf5/ur5_kinect_handeyecalibration_eye_on_base-namespace_nascimento_Inspiron_rqt-32.log].
log file: /home/nascimento/.ros/log/d85375b4-0acc-11ea-a950-d80f99a74bf5/ur5_kinect_handeyecalibration_eye_on_base-namespace_nascimento_Inspiron_rqt-32*.log

The calibrate.launch

<?xml version="1.0" ?>
<launch>
    <!-- Setting calibration namespace -->
    <arg name="eye_on_hand" doc="if true, eye-on-hand instead of eye-on-base" />
    <arg name="namespace_prefix" default="easy_handeye" doc="the prefix of the namespace the node will run in, and of the folder in which the result will be saved" />
    <arg if="$(arg eye_on_hand)" name="namespace" value="$(arg namespace_prefix)_eye_on_hand" doc="the namespace the node will run in, and the folder in which the result will be saved" />
    <arg unless="$(arg eye_on_hand)" name="namespace" value="$(arg namespace_prefix)_eye_on_base" doc="the namespace the node will run in, and the folder in which the result will be saved" />

    <!-- The input reference frames -->
    <arg name="robot_base_frame" default="base_link" />
    <arg name="robot_effector_frame" default="tool0" />
    <arg name="tracking_base_frame" default="tracking_origin" />
    <arg name="tracking_marker_frame" default="tracking_target" />

    <!-- Publish dummy frames while calibrating -->
    <arg name="publish_dummy" default="true" doc="if true, a dummy calibration will be published to keep all frames in a single tf tree, hence visualized in RViz" />

    <!-- GUI arguments -->
    <arg name="start_rviz" default="true" doc="if true, rviz will be started with the provided config file" />
    <arg name="rviz_config_file" default="$(find easy_handeye)/launch/rviz_easy_handeye.config" doc="the path to the rviz config file to be opened" />
    <arg name="start_rqt" default="true" doc="if true, rqt will be started with the provided perspective" />
    <arg name="rqt_perspective_file" default="$(find easy_handeye)/launch/rqt_easy_handeye.perspective" doc="the path to the rqt perspective file to be opened" />

    <arg name="freehand_robot_movement" default="false" doc="if false, the rqt plugin for the automatic robot motion with MoveIt! will be started" />
    <arg name="move_group" default="manipulator" doc="the name of move_group for the automatic robot motion with MoveIt!" />
    <arg name="translation_delta_meters" default="0.1" doc="the maximum movement that the robot should perform in the translation phase" />
    <arg name="rotation_delta_degrees" default="25" doc="the maximum rotation that the robot should perform" />
    <arg name="robot_velocity_scaling" default="0.3" doc="the maximum speed the robot should reach, as a factor of the speed declared in the joint_limits.yaml" />
    <arg name="robot_acceleration_scaling" default="0.2" doc="the maximum acceleration the robot should reach, as a factor of the acceleration declared in the joint_limits.yaml" />

    <!-- Dummy calibration to have a fully connected TF tree and see all frames -->
    <group if="$(arg publish_dummy)">
        <node unless="$(arg eye_on_hand)" name="dummy_handeye" pkg="tf" type="static_transform_publisher"
            args="1 1 1 0 1.5 0 $(arg robot_base_frame) $(arg tracking_base_frame) 10" />
        <node if="$(arg eye_on_hand)" name="dummy_handeye" pkg="tf" type="static_transform_publisher"
            args="0 0 0.05 0 0 0 $(arg robot_effector_frame) $(arg tracking_base_frame) 10" />
    </group>

    <!-- Run the ViSP solver to determine the extrinsic parameters -->
    <node ns="$(arg namespace)" name="hand_eye_solver"
          pkg="visp_hand2eye_calibration"
          type="visp_hand2eye_calibration_calibrator">
        <remap from="/compute_effector_camera_quick" to="compute_effector_camera_quick"/>
    </node>

    <group ns="$(arg namespace)" >
        <param name="eye_on_hand" value="$(arg eye_on_hand)"/>
        <param name="robot_base_frame" value="$(arg robot_base_frame)" />
        <param name="robot_effector_frame" value="$(arg robot_effector_frame)" />
        <param name="tracking_base_frame" value="$(arg tracking_base_frame)" />
        <param name="tracking_marker_frame" value="$(arg tracking_marker_frame)" />
    </group>

    <!-- Connect the tracker to the solver -->
    <node name="hand_eye_connector"
          ns="$(arg namespace)"
          pkg="easy_handeye"
          type="calibrate.py"
          output="screen" />


    <!-- start GUI (Rviz and rqt_easy_handeye) -->

    <!--TODO: use this as soon as rviz rqt plugin accepts config parameter-->
    <!--<group ns="$(arg namespace)" >
        <node if="$(arg start_rqt)" unless="$(arg eye_on_hand)" name="$(arg namespace)_rqt" pkg="rqt" type="rqt" respawn="false" 
            args="clear-config perspective-file $(arg rqt_perspective_file)" output="screen" />
    </group>-->

    <!--TODO: remove as soon as rviz rqt plugin accepts config parameter-->  
    <node if="$(arg start_rviz)" name="$(anon rviz)" pkg="rviz" type="rviz" respawn="true" 
          args="-d $(arg rviz_config_file)" output="screen" />

    <node if="$(arg start_rqt)" ns="$(arg namespace)" name="$(anon namespace)_rqt" pkg="rqt_gui" type="rqt_gui" respawn="false" 
            args="--clear-config --perspective-file $(arg rqt_perspective_file)" output="screen" />
    <node unless="$(arg freehand_robot_movement)" name="calibration_mover" pkg="rqt_easy_handeye" type="rqt_calibrationmovements" respawn="false" >
        <param name="move_group" value="$(arg move_group)" />
        <param name="translation_delta_meters" value="$(arg translation_delta_meters)" />
        <param name="rotation_delta_degrees" value="$(arg rotation_delta_degrees)" />
        <param name="max_velocity_scaling" value="$(arg robot_velocity_scaling)" />
        <param name="max_acceleration_scaling" value="$(arg robot_acceleration_scaling)" />
    </node>

</launch>

and the rqt_easy_handeye.perspective

{
  "keys": {}, 
  "groups": {
    "pluginmanager": {
      "keys": {
        "running-plugins": {
          "type": "repr", 
          "repr": "{u'rqt_easy_handeye/Hand-eye Calibration': [1]}"
        }
      }, 
      "groups": {
        "plugin__rqt_easy_handeye__Hand-eye Calibration__1": {
          "keys": {}, 
          "groups": {
            "dock_widget__RqtHandeyeCalibrationUI": {
              "keys": {
                "dockable": {
                  "type": "repr", 
                  "repr": "True"
                }, 
                "parent": {
                  "type": "repr", 
                  "repr": "None"
                }
              }, 
              "groups": {}
            }
          }
        }, 
        "plugin__rqt_controller_manager__ControllerManagerGUI__1": {
          "keys": {}, 
          "groups": {
            "dock_widget__": {
              "keys": {
                "dockable": {
                  "type": "repr", 
                  "repr": "u'true'"
                }, 
                "parent": {
                  "type": "repr", 
                  "repr": "None"
                }
              }, 
              "groups": {}
            }
          }
        }
      }
    }, 
    "mainwindow": {
      "keys": {
        "geometry": {
          "type": "repr(QByteArray.hex)", 
          "repr(QByteArray.hex)": "QtCore.QByteArray('01d9d0cb00010000000000640000006400000492000003d9000000660000007b00000490000003d5000000000000')", 
          "pretty-print": "     d d     f {       "
        }, 
        "state": {
          "type": "repr(QByteArray.hex)", 
          "repr(QByteArray.hex)": "QtCore.QByteArray('000000ff00000000fd00000001000000030000042b00000332fc0100000001fb00000090007200710074005f00680061006e006400650079006500630061006c006900620072006100740069006f006e005f005f00480061006e0064002d006500790065002000430061006c006900620072006100740069006f006e005f005f0031005f005f00520071007400480061006e006400650079006500430061006c006900620072006100740069006f006e0055004901000000000000042b00000126010000050000042b0000000000000004000000040000000800000008fc00000001000000030000000100000036004d0069006e0069006d0069007a006500640044006f0063006b00570069006400670065007400730054006f006f006c0062006100720000000000ffffffff0000000000000000')", 
          "pretty-print": "                  rqt_easy_handeye__Hand-eye Calibration__1__RqtHandeyeCalibrationUI                            6MinimizedDockWidgetsToolbar        "
        }
      }, 
      "groups": {
        "toolbar_areas": {
          "keys": {
            "MinimizedDockWidgetsToolbar": {
              "type": "repr", 
              "repr": "8"
            }
          }, 
          "groups": {}
        }
      }
    }
  }
}

Thanks in advance.

Asked by FelipeH92 on 2019-11-19 08:33:54 UTC

Comments

I tried running rosrun rqt_gui rqt_gui --clear-config --perspective-file /path-to-pck/launch/rqt_easy_handeye.perspective and it appears the bug is in the perspective file.

Asked by FelipeH92 on 2019-11-19 10:22:08 UTC

Hi,

Remember that is not the same to write:

<arg name="name_ph" value="value_ph"/>

than:

<arg name="name_ph" default="name_ph"/>

In the first one you are instantiating an argument while in the second one you are giving it a value. Looking at your error it seems that you are instantiating two times the namespace argument.

Change value to default and give it a value when you launch with namespace:="value_ph"

Asked by Weasfas on 2019-11-21 06:44:27 UTC

Answers