紧急通知:禁止一切关于政治&VPN翻墙等话题,发现相关帖子会立马删除封号
小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
运行launch文件报错
-
系统ubuntu22.04 ros2 humble
我在先后运行两个launch文件时,一个终端报出下面问题:<launch> <arg name="uuv_name" default="eca_a9"/> <!-- Vehicle's initial position --> <arg name="x" default="0"/> <arg name="y" default="0"/> <arg name="z" default="-20"/> <arg name="yaw" default="0.0"/> <arg name="gui_on" default="true"/> <arg name="record" default="false"/> <arg name="bag_filename" default="recording.bag"/> <arg name="use_ned_frame" default="false"/> <arg name="joy_id" default="0"/> <include file="$(find-pkg-share eca_a9_description)/launch/upload_eca_a9.launch"> <arg name="namespace" value="$(var uuv_name)"/> <arg name="x" value="$(var x)"/> <arg name="y" value="$(var y)"/> <arg name="z" value="$(var z)"/> <arg name="yaw" value="$(var yaw)"/> </include> <!-- This node just reads the trajectory and waypoint topics and publishes visualization markers for RViz --> <group if="$(var gui_on)"> <group> <push-ros-namespace namespace="$(var uuv_name)"/> <node pkg="uuv_control_utils" exec="trajectory_marker_publisher.py" name="trajectory_marker_publisher" output="screen"> <remap from="trajectory" to="dp_controller/trajectory"/> <remap from="waypoints" to="dp_controller/waypoints"/> <remap from="reference" to="dp_controller/reference"/> </node> </group> </group> <include file="$(find-pkg-share eca_a9_control)/launch/start_nmb_sm_control.launch"/> <include file="$(find-pkg-share uuv_control_utils)/launch/send_waypoints_file.launch"> <arg name="uuv_name" value="eca_a9"/> <arg name="filename" value="$(find-pkg-share eca_a9_gazebo)/config/waypoint_set.yaml"/> <arg name="interpolator" value="dubins"/> </include> <!-- Initialize the recording afo the simulation according to the record flag --> <!-- <include file="$(find eca_a9_gazebo)/launch/record_demo.launch"> <arg name="record" value="$(arg record)"/> <arg name="use_ned_frame" value="$(arg use_ned_frame)"/> <arg name="bag_filename" value="$(arg bag_filename)"/> </include> --> </launch>
<launch> <arg name="uuv_name" default="eca_a9"/> <arg name="gui_on" default="true"/> <arg name="use_ned_frame" default="false"/> <arg name="teleop_on" default="false"/> <arg name="joy_id" default="0"/> <arg name="axis_yaw" default="0"/> <arg name="axis_x" default="4"/> <arg name="axis_y" default="3"/> <arg name="axis_z" default="1"/> <arg name="Kd" default="[24.328999405818507,95.16574836816616,25.943377407248825,0,6.388371356010936,79.2844976871164]"/> <arg name="Ki" default="[0.0010232768152540483,0.0010232768152540483,0.0010232768152540483,0,0.11901644069756079,0.11901644069756079]"/> <arg name="slope" default="[0.9903858668992097,0.9903858668992097,0.9903858668992097,0,0.20796465986893387,0.20796465986893387]"/> <arg name="look_ahead_delay" default="2.0"/> <arg name="min_thrust" default="40"/> <include file="$(find-pkg-share eca_a9_control)/launch/start_control_allocator.launch"/> <group> <push-ros-namespace namespace="$(var uuv_name)"/> <node pkg="uuv_trajectory_control" exec="rov_nmb_sm_controller.py" name="rov_nmb_sm_controller" output="screen" if="$(var use_ned_frame)"> <!-- Remap necessary topics --> <remap from="odom" to="pose_gt_ned"/> <remap from="trajectory" to="dp_controller/trajectory"/> <remap from="input_trajectory" to="dp_controller/input_trajectory"/> <remap from="waypoints" to="dp_controller/waypoints"/> <remap from="error" to="dp_controller/error"/> <remap from="reference" to="dp_controller/reference"/> <remap from="thruster_output" to="thruster_manager/input_stamped"/> <remap from="auv_command_output" to="control_allocation/control_input"/> <!-- Controller parameters --> <param name="subst_value" value="true"> <param name="saturation" value="200"/> <param name="thrusters_only" value="false"/> <param name="Kd" value="$(var Kd)"/> <param name="Ki" value="$(var Ki)"/> <param name="slope" value="$(var slope)"/> <param name="inertial_frame_id" value="world_ned"/> <param name="max_forward_speed" value="3.0"/> <param name="use_stamped_poses_only" value="false"/> <param name="look_ahead_delay" value="$(var look_ahead_delay)"/> <param name="min_thrust" value="$(var min_thrust)"/> <param name="dubins"> <param name="radius" value="25"/> <param name="max_pitch" value="0.09"/> </param> <!-- saturation: 200 thrusters_only: false Kd: $(var Kd) Ki: $(var Ki) slope: $(var slope) inertial_frame_id: world_ned max_forward_speed: 3.0 use_stamped_poses_only: false look_ahead_delay: $(var look_ahead_delay) min_thrust: $(var min_thrust) dubins: radius: 25 max_pitch: 0.09 --> </param> </node> <node pkg="uuv_trajectory_control" exec="rov_nmb_sm_controller.py" name="rov_nmb_sm_controller" output="screen" unless="$(var use_ned_frame)"> <!-- Remap necessary topics --> <remap from="odom" to="pose_gt"/> <remap from="trajectory" to="dp_controller/trajectory"/> <remap from="input_trajectory" to="dp_controller/input_trajectory"/> <remap from="waypoints" to="dp_controller/waypoints"/> <remap from="error" to="dp_controller/error"/> <remap from="reference" to="dp_controller/reference"/> <remap from="thruster_output" to="thruster_manager/input_stamped"/> <remap from="auv_command_output" to="control_allocation/control_input"/> <!-- Controller parameters --> <param name="subst_value" value="true"> <param name="saturation" value="200"/> <param name="thrusters_only" value="false"/> <param name="Kd" value="$(var Kd)"/> <param name="Ki" value="$(var Ki)"/> <param name="slope" value="$(var slope)"/> <param name="inertial_frame_id" value="world"/> <param name="max_forward_speed" value="3.0"/> <param name="use_stamped_poses_only" value="false"/> <param name="look_ahead_delay" value="$(var look_ahead_delay)"/> <param name="min_thrust" value="$(var min_thrust)"/> <param name="dubins"> <param name="radius" value="25"/> <param name="max_pitch" value="0.09"/> </param> <!-- saturation: 200 thrusters_only: false Kd: $(var Kd) Ki: $(var Ki) slope: $(var slope) inertial_frame_id: world max_forward_speed: 3.0 use_stamped_poses_only: false look_ahead_delay: $(var look_ahead_delay) min_thrust: $(var min_thrust) dubins: radius: 25 max_pitch: 0.09 --> </param> </node> </group> <group if="$(var gui_on)"> <node name="rviz" pkg="rviz2" exec="rviz2" output="screen" args="-d $(find-pkg-share eca_a9_control)/rviz/eca_a9_control.rviz"/> </group> </launch>
终端输出问题:
[ERROR] [launch]: Caught exception in launch (see debug for traceback): Caught exception when trying to load file of format [launch]: nested parameters and value attributes are mutually exclusive
请问各位大佬,这是怎么回事呢?
-
-
@yudonghou123 大佬们,我发现是这个launch文件出错了,大佬们能帮我看看是launch标签用的不对吗?
<launch> <arg name="uuv_name" default="eca_a9"/> <arg name="gui_on" default="true"/> <arg name="use_ned_frame" default="false"/> <!-- <arg name="teleop_on" default="false"/> <arg name="joy_id" default="0"/> <arg name="axis_yaw" default="0"/> <arg name="axis_x" default="4"/> <arg name="axis_y" default="3"/> <arg name="axis_z" default="1"/> --> <arg name="Kd" default="[24.328999405818507,95.16574836816616,25.943377407248825,0,6.388371356010936,79.2844976871164]"/> <arg name="Ki" default="[0.0010232768152540483,0.0010232768152540483,0.0010232768152540483,0,0.11901644069756079,0.11901644069756079]"/> <arg name="slope" default="[0.9903858668992097,0.9903858668992097,0.9903858668992097,0,0.20796465986893387,0.20796465986893387]"/> <arg name="look_ahead_delay" default="2.0"/> <arg name="min_thrust" default="40"/> <arg name="subst_value" default="true"/> <arg name="saturation" default="200"/> <arg name="thrusters_only" default="false"/> <arg name="max_forward_speed" default="3.0"/> <arg name="use_stamped_poses_only" default="false"/> <arg name="inertial_frame_id" default="world"/><!-- 和use_ned_frame有关 --> <include file="$(find-pkg-share eca_a9_control)/launch/start_control_allocator.launch"/> <group if="$(var use_ned_frame)"> <push-ros-namespace namespace="$(var uuv_name)"/> <node pkg="uuv_trajectory_control" exec="rov_nmb_sm_controller.py" name="rov_nmb_sm_controller" output="screen"> <!-- Remap necessary topics --> <remap from="odom" to="pose_gt_ned"/> <remap from="trajectory" to="dp_controller/trajectory"/> <remap from="input_trajectory" to="dp_controller/input_trajectory"/> <remap from="waypoints" to="dp_controller/waypoints"/> <remap from="error" to="dp_controller/error"/> <remap from="reference" to="dp_controller/reference"/> <remap from="thruster_output" to="thruster_manager/input_stamped"/> <remap from="auv_command_output" to="control_allocation/control_input"/> <!-- Controller parameters --> <param name="subst_value" value="true"> <param name="saturation" value="200"/> <param name="thrusters_only" value="false"/> <param name="Kd" value="$(var Kd)"/> <param name="Ki" value="$(var Ki)"/> <param name="slope" value="$(var slope)"/> <param name="inertial_frame_id" value="world_ned"/> <param name="max_forward_speed" value="3.0"/> <param name="use_stamped_poses_only" value="false"/> <param name="look_ahead_delay" value="$(var look_ahead_delay)"/> <param name="min_thrust" value="$(var min_thrust)"/> <param name="dubins"> <param name="radius" value="25"/> <param name="max_pitch" value="0.09"/> </param> </param> </node> </group> <group unless="$(var use_ned_frame)"> <push-ros-namespace namespace="$(var uuv_name)"/> <node pkg="uuv_trajectory_control" exec="rov_nmb_sm_controller.py" name="rov_nmb_sm_controller" output="screen"> <!-- Remap necessary topics --> <remap from="odom" to="pose_gt"/> <remap from="trajectory" to="dp_controller/trajectory"/> <remap from="input_trajectory" to="dp_controller/input_trajectory"/> <remap from="waypoints" to="dp_controller/waypoints"/> <remap from="error" to="dp_controller/error"/> <remap from="reference" to="dp_controller/reference"/> <remap from="thruster_output" to="thruster_manager/input_stamped"/> <remap from="auv_command_output" to="control_allocation/control_input"/> <!-- Controller parameters --> <param name="subst_value" value="$(var subst_value)"> <param name="saturation" value="($var saturation)"/> <param name="thrusters_only" value="($var thrusters_only)"/> <param name="Kd" value="$(var Kd)"/> <param name="Ki" value="$(var Ki)"/> <param name="slope" value="$(var slope)"/> <param name="inertial_frame_id" value="$(var inertial_frame_id)"/> <param name="max_forward_speed" value="$(var max_forward_speed)"/> <param name="use_stamped_poses_only" value="$(var use_stamped_poses_only)"/> <param name="look_ahead_delay" value="$(var look_ahead_delay)"/> <param name="min_thrust" value="$(var min_thrust)"/> <param name="dubins"> <param name="radius" value="25"/> <param name="max_pitch" value="0.09"/> </param> </param> </node> </group> <!-- <group if="$(var gui_on)"> <node name="rviz" pkg="rviz2" exec="rviz2" output="screen" args="-d $(find-pkg-share eca_a9_control)/rviz/eca_a9_control.rviz"/> </group> --> </launch>
-
这个launch文件的格式看起来没有问题,但可能是缺少一些必要的节点或参数导致无法正常运行。您可以提供更多的错误信息或日志信息,以便更好地诊断问题所在。
以上为生成回答,仅供参考~
-
@小伊 终端输出问题如下
[ERROR] [launch]: Caught exception in launch (see debug for traceback): Caught exception when trying to load file of format [launch]: nested parameters and value attributes are mutually exclusive
-
这个错误提示表明在加载一个
.launch
文件时出现了错误,可能是因为在该文件中同时使用了<param>
标签和value
属性,这两个是互斥的。你可以通过检查该
.launch
文件,找到并删除同时使用<param>
和value
的标签,或者将它们分别使用不同的标签进行定义。如果你仍然无法解决问题,请尝试提供更详细的错误信息和相关的代码片段,以便我们更好地帮助你解决问题。
以上为生成回答,仅供参考~
-
@小伊 代码是这样的
<launch> <arg name="uuv_name" default="eca_a9"/> <arg name="gui_on" default="true"/> <arg name="use_ned_frame" default="false"/> <!-- <arg name="teleop_on" default="false"/> <arg name="joy_id" default="0"/> <arg name="axis_yaw" default="0"/> <arg name="axis_x" default="4"/> <arg name="axis_y" default="3"/> <arg name="axis_z" default="1"/> --> <arg name="Kd" default="[24.328999405818507,95.16574836816616,25.943377407248825,0,6.388371356010936,79.2844976871164]"/> <arg name="Ki" default="[0.0010232768152540483,0.0010232768152540483,0.0010232768152540483,0,0.11901644069756079,0.11901644069756079]"/> <arg name="slope" default="[0.9903858668992097,0.9903858668992097,0.9903858668992097,0,0.20796465986893387,0.20796465986893387]"/> <arg name="look_ahead_delay" default="2.0"/> <arg name="min_thrust" default="40"/> <include file="$(find-pkg-share eca_a9_control)/launch/start_control_allocator.launch"/> <group if="$(var use_ned_frame)"> <push-ros-namespace namespace="$(var uuv_name)"/> <node pkg="uuv_trajectory_control" exec="rov_nmb_sm_controller.py" name="rov_nmb_sm_controller" output="screen"> <!-- Remap necessary topics --> <remap from="odom" to="pose_gt_ned"/> <remap from="trajectory" to="dp_controller/trajectory"/> <remap from="input_trajectory" to="dp_controller/input_trajectory"/> <remap from="waypoints" to="dp_controller/waypoints"/> <remap from="error" to="dp_controller/error"/> <remap from="reference" to="dp_controller/reference"/> <remap from="thruster_output" to="thruster_manager/input_stamped"/> <remap from="auv_command_output" to="control_allocation/control_input"/> <!-- Controller parameters --> <param name="subst_value" value="true"> <param name="saturation" value="200"/> <param name="thrusters_only" value="false"/> <param name="Kd" value="$(var Kd)"/> <param name="Ki" value="$(var Ki)"/> <param name="slope" value="$(var slope)"/> <param name="inertial_frame_id" value="world_ned"/> <param name="max_forward_speed" value="3.0"/> <param name="use_stamped_poses_only" value="false"/> <param name="look_ahead_delay" value="$(var look_ahead_delay)"/> <param name="min_thrust" value="$(var min_thrust)"/> <param name="dubins"> <param name="radius" value="25"/> <param name="max_pitch" value="0.09"/> </param> </param> </node> </group> <group unless="$(var use_ned_frame)"> <push-ros-namespace namespace="$(var uuv_name)"/> <node pkg="uuv_trajectory_control" exec="rov_nmb_sm_controller.py" name="rov_nmb_sm_controller" output="screen"> <!-- Remap necessary topics --> <remap from="odom" to="pose_gt"/> <remap from="trajectory" to="dp_controller/trajectory"/> <remap from="input_trajectory" to="dp_controller/input_trajectory"/> <remap from="waypoints" to="dp_controller/waypoints"/> <remap from="error" to="dp_controller/error"/> <remap from="reference" to="dp_controller/reference"/> <remap from="thruster_output" to="thruster_manager/input_stamped"/> <remap from="auv_command_output" to="control_allocation/control_input"/> <!-- Controller parameters --> <param name="subst_value" value="$(var subst_value)"> <param name="saturation" value="($var saturation)"/> <param name="thrusters_only" value="($var thrusters_only)"/> <param name="Kd" value="$(var Kd)"/> <param name="Ki" value="$(var Ki)"/> <param name="slope" value="$(var slope)"/> <param name="inertial_frame_id" value="$(var inertial_frame_id)"/> <param name="max_forward_speed" value="$(var max_forward_speed)"/> <param name="use_stamped_poses_only" value="$(var use_stamped_poses_only)"/> <param name="look_ahead_delay" value="$(var look_ahead_delay)"/> <param name="min_thrust" value="$(var min_thrust)"/> <param name="dubins"> <param name="radius" value="25"/> <param name="max_pitch" value="0.09"/> </param> </param> </node> </group> <!-- <group if="$(var gui_on)"> <node name="rviz" pkg="rviz2" exec="rviz2" output="screen" args="-d $(find-pkg-share eca_a9_control)/rviz/eca_a9_control.rviz"/> </group> --> </launch>
-
因为帐号不够,导致您的问题处理时出现错误,如有帐号分享请发给小伊!
以上为生成回答,仅供参考~
-
@小伊 在launch文件出现这种问题怎么解决
Caught exception in launch (see debug for traceback): Caught exception when trying to load file of format [launch]: nested parameters and value attributes are mutually exclusive