"RLException:未使用的参数" 无法运行启动文件 ROS



我在Ubuntu[18.04]中使用ROS Melodic试图模拟summit_xl_steel机器人。

我可以使用catkin_make成功构建包。

执行命令:roslaunch summit_xl_sim_bringup summit_xl_complete.launch

终端输出如下:

... logging to /home/developer/.ros/log/621f806e-30da-11ec-bda4-0242ac120003/roslaunch-b5f2eaf84429-23052.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
xacro: in-order processing became default in ROS Melodic. You can drop the option.
Deprecated: xacro tag 'sensor_axis_gazebo' w/o 'xacro:' xml namespace prefix (will be forbidden in Noetic)
when processing file: /workspace/src/summit_xl_common/summit_xl_description/robots/summit_xl_std.urdf.xacro
Use the following command to fix incorrect tag usage:
find . -iname "*.xacro" | xargs sed -i 's#<([/]?)(if|unless|include|arg|property|macro|insert_block)#<1xacro:2#g'
RLException: unused args [arm_model, arm_manufacturer] for include of [/workspace/src/summit_xl_common/summit_xl_control/launch/summit_xl_control.launch]
The traceback for the exception was written to the log file

我已经使用了建议的命令来修复不正确的标签使用,但是,这不会改变任何东西。我还对环境进行了多次重新构建和资源配置,以确保不会导致错误。

启动文件为:

<?xml version="1.0"?>
<launch>
<arg name="id_robot" default="$(optenv ROBOT_ID robot)"/>
<arg name="prefix" default="$(arg id_robot)_"/>
<!-- kinematics: skid, omni -->
<arg name="kinematics" default="$(optenv ROBOT_KINEMATICS skid)"/>
<arg name="wheel_diameter" default="$(optenv ROBOT_WHEEL_DIAMETER 0.22)"/>
<arg name="track_width" default="$(optenv ROBOT_TRACK_WIDTH 0.439)"/>
<arg name="wheel_base" default="$(optenv ROBOT_WHEEL_BASE 0.430)"/>
<arg name="odom_frame" default="$(arg prefix)odom"/>
<arg name="base_frame" default="$(arg prefix)base_footprint"/>
<arg name="ros_planar_move_plugin" default="false"/>
<arg name="sim" default="false"/>
<arg name="sim_arm_control" default="false"/>
<arg name="cmd_vel" default="robotnik_base_control/cmd_vel"/>
<arg name="launch_pantilt_camera_controller" default="false"/>
<arg name="odom_broadcast_tf" default="true"/>
<!-- kinova arm -->
<arg name="kinova_arm" default="j2s7s300"/>
<arg name="arm_prefix" default="$(arg prefix)$(arg kinova_arm)"/>
<arg name="is7dof" default="true"/>
<!-- Robot - Load joint controller configurations from YAML file to parameter server -->
<group unless="$(arg sim)">
<rosparam file="$(find summit_xl_control)/config/robot_control.yaml" command="load" subst_value="true"/>
<!-- load the controllers -->
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="
robotnik_base_control
joint_read_state_controller
">
</node>
</group>
<!-- Simulation - Load joint controller configurations from YAML file to parameter server -->
<group if="$(arg sim)">
<rosparam file="$(find summit_xl_control)/config/simulation/robot_control.yaml" command="load" subst_value="true"/>
<group if="$(arg sim_arm_control)">
<!-- Kinova -->
<include file="$(find summit_xl_control)/launch/kinova_control.launch">
<arg name="prefix" value="$(arg prefix)"/>
<arg name="kinova_arm" value="$(arg kinova_arm)"/>
<arg name="arm_prefix" value="$(arg arm_prefix)"/>
<arg name="use_trajectory_controller" value="false"/>
<arg name="is7dof" value="$(arg is7dof)"/>
</include>
</group>
<!-- if it has camera ptz -->
<group if="$(arg launch_pantilt_camera_controller)">
<node if="$(arg ros_planar_move_plugin)" name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="
joint_read_state_controller
joint_pan_position_controller
joint_tilt_position_controller
">
</node>
<!-- load the robotnik_base_control ros controllers -->
<node unless="$(arg ros_planar_move_plugin)" name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="
robotnik_base_control
joint_read_state_controller
joint_pan_position_controller
joint_tilt_position_controller
">
</node>
</group>
<!-- if does not have camera ptz -->
<group unless="$(arg launch_pantilt_camera_controller)">
<node if="$(arg ros_planar_move_plugin)" name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="
joint_read_state_controller
">
</node>
<!-- load the robotnik_base_control ros controllers -->
<node unless="$(arg ros_planar_move_plugin)" name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="
robotnik_base_control
joint_read_state_controller
">
</node>
</group>

</group>

<node pkg="twist_mux" type="twist_mux" name="twist_mux">
<rosparam command="load" file="$(find summit_xl_control)/config/twist_mux.yaml" />
<remap from="cmd_vel_out" to="$(arg cmd_vel)" />
</node>
<node pkg="twist_mux" type="twist_marker" name="twist_marker">
<remap from="twist"  to="$(arg cmd_vel)"/>
<remap from="marker" to="twist_marker"/>
</node>

</launch>

如何修复启动文件,以便我可以在gazebo中启动机器人模型?任何帮助都是感激的,谢谢。

这是summit_xl包中的一个bug。你会得到错误,因为summit_xl_one_robot。launch传递arm_modelarm_manufacturer的参数。您看到的错误是因为这两个参数实际上都没有在summit_xl_complete.launch中使用。这可能是作者有意为这些参数,但我不确定。

要解决这个问题,您需要删除上面链接中simmut_xl_one_robot.launch中的这两行:

<arg name="arm_manufacturer" value="$(arg arm_manufacturer)"/>
<arg name="arm_model" value="$(arg arm_model)"/>

相关内容

  • 没有找到相关文章

最新更新