UniversalRobots / Universal_Robots_ROS2_Description

ROS2 URDF description for Universal Robots
BSD 3-Clause "New" or "Revised" License
110 stars 107 forks source link

Loading yaml with correct function #42

Closed skaeringur97 closed 1 year ago

skaeringur97 commented 1 year ago

Recently, the function load_yaml() has been deprecated. If you update everything and run the UR driver and/or moveit, you get the following error:

[ERROR] [launch]: Caught exception in launch (see debug for traceback): executed command showed stderr output. Command: /opt/ros/humble/bin/xacro /opt/ros/humble/share/ur_description/urdf/ur.urdf.xacro robot_ip:=aaa.bbb.cc.d joint_limit_params:=/opt/ros/humble/share/ur_description/config/ur10e/joint_limits.yaml kinematics_params:=/opt/ros/humble/share/ur_description/config/ur10e/default_kinematics.yaml physical_params:=/opt/ros/humble/share/ur_description/config/ur10e/physical_parameters.yaml visual_params:=/opt/ros/humble/share/ur_description/config/ur10e/visual_parameters.yaml safety_limits:=true safety_pos_margin:=0.15 safety_k_position:=20 name:=ur10e script_filename:=/opt/ros/humble/share/ur_robot_driver/resources/ros_control.urscript input_recipe_filename:=/opt/ros/humble/share/ur_robot_driver/resources/rtde_input_recipe.txt output_recipe_filename:=/opt/ros/humble/share/ur_robot_driver/resources/rtde_output_recipe.txt prefix:="" use_fake_hardware:=true fake_sensor_commands:=false headless_mode:=false use_tool_communication:=false tool_parity:=0 tool_baud_rate:=115200 tool_stop_bits:=1 tool_rx_idle_chars:=1.5 tool_tx_idle_chars:=3.5 tool_device_name:=/tmp/ttyUR tool_tcp_port:=54321 tool_voltage:=24 
Captured stderr output:
warning: Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
warning: Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
warning: Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
warning: Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
warning: Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.

To fix this, two files need to be updated. urdf/ur.urdf.xacro and urdf/inc/ur_common.xacro. Appending xacro. before load_yaml, as explained in the error msg, fixes this issue.

fmauch commented 1 year ago

Please see #43