鱼香ROS社区
    • 版块
    • 最新
    • 未解决
    • 已解决
    • 群组
    • 注册
    • 登录
    紧急通知:禁止一切关于政治&VPN翻墙等话题,发现相关帖子会立马删除封号
    提问前必看的发帖注意事项: 社区问答规则(小鱼个人)更新 | 高质量帖子发布指南

    xacro

    已定时 已固定 已锁定 已移动 未解决
    综合问题
    ros小车 xacro运行失败
    1
    1
    335
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • 2469427102
      是阿辞哦
      最后由 编辑

      <robot name="my_base" xmlns:xacro="http://www.ros.org/wiki/xacro">

      <xacro:property name="PI" value="3.141"/>
      
      <material name="black">
          <color rgba="0 0 0 1.0" />
      </material>
      
      <xacro:property name="base_footprint_radius" value="0.001" /> 
      <xacro:property name="base_link_radius" value="0.1" /> 
      <xacro:property name="base_link_length" value="0.08" /> 
      <xacro:property name="earth_space" value="0.015" /> 
      
      
      <link name="base_footprint">
        <visual>
          <geometry>
            <sphere radius="${base_footprint_radius}" />
          </geometry>
        </visual>
      </link>
      
      <link name="base_link">
        <visual>
          <geometry>
            <cylinder radius="${base_link_radius}" length="${base_link_length}" />
          </geometry>
          <origin xyz="0 0 0" rpy="0 0 0" />
          <material name="yellow">
            <color rgba="0.5 0.3 0.0 0.5" />
          </material>
        </visual>
      </link>
      
      <joint name="base_link2base_footprint" type="fixed">
        <parent link="base_footprint" />
        <child link="base_link" />
        <origin xyz="0 0 ${earth_space + base_link_length / 2 }" />
      </joint>
      

      launch文件
      <launch>
      <param name="robot_description" command="$(find xacro)/xacro $(find urdf01_rviz)/urdf/xacro/demo02_test.xacro" />
      <node pkg="rviz" name="rviz" type="rviz" args="-d $(find urdf01_rviz)/config/show_mycar.rviz" />
      <node pkg="joint_state_publisher" name="joint_state_publisher" type="joint_state_publisher" />
      <node pkg="robot_state_publisher" name="robot_state_publisher" type="robot_state_publisher" />
      <node pkg="joint_state_publisher_gui" name="joint_state_publisher_gui" type="joint_state_publisher_gui" />
      </launch>

      ~/catkin_ws$ roslaunch urdf01_rviz demo01_test_xacro.launch
      ... logging to /home/amov/.ros/log/501cc910-c8a7-11ed-9417-1cc10cb8638e/roslaunch-amov-21757.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.

      XML parsing error: mismatched tag: line 74, column 10
      when processing file: /home/amov/catkin_ws/src/urdf01_rviz/urdf/xacro/demo02_test.xacro

      Check that:

      • Your XML is well-formed
      • You have the xacro xmlns declaration: xmlns:xacro="http://www.ros.org/wiki/xacro"
        RLException: Invalid <param> tag: Cannot load command parameter [robot_description]: command [['/opt/ros/melodic/lib/xacro/xacro', '/home/amov/catkin_ws/src/urdf01_rviz/urdf/xacro/demo02_test.xacro']] returned with code [2].

      Param xml is <param command="$(find xacro)/xacro $(find urdf01_rviz)/urdf/xacro/demo02_test.xacro" name="robot_description"/>
      The traceback for the exception was written to the log file
      amov@amov:~/catkin_ws$ source ./devel/setup.bash
      amov@amov:~/catkin_ws$ roslaunch urdf01_rviz demo01_test_xacro.launch
      ... logging to /home/amov/.ros/log/b4f1aada-c8a8-11ed-9417-1cc10cb8638e/roslaunch-amov-22623.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.

      XML parsing error: mismatched tag: line 74, column 10
      when processing file: /home/amov/catkin_ws/src/urdf01_rviz/urdf/xacro/demo02_test.xacro

      Check that:

      • Your XML is well-formed
      • You have the xacro xmlns declaration: xmlns:xacro="http://www.ros.org/wiki/xacro"
        RLException: Invalid <param> tag: Cannot load command parameter [robot_description]: command [['/opt/ros/melodic/lib/xacro/xacro', '/home/amov/catkin_ws/src/urdf01_rviz/urdf/xacro/demo02_test.xacro']] returned with code [2].

      Param xml is <param command="$(find xacro)/xacro $(find urdf01_rviz)/urdf/xacro/demo02_test.xacro" name="robot_description"/>
      The traceback for the exception was written to the log file
      amov@amov:~/catkin_ws$ roslaunch urdf01_rviz demo01_test_xacro.launch
      ... logging to /home/amov/.ros/log/964a3ab0-c8a9-11ed-9417-1cc10cb8638e/roslaunch-amov-23038.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.

      XML parsing error: mismatched tag: line 74, column 10
      when processing file: /home/amov/catkin_ws/src/urdf01_rviz/urdf/xacro/demo02_test.xacro

      Check that:

      • Your XML is well-formed
      • You have the xacro xmlns declaration: xmlns:xacro="http://www.ros.org/wiki/xacro"
        RLException: Invalid <param> tag: Cannot load command parameter [robot_description]: command [['/opt/ros/melodic/lib/xacro/xacro', '/home/amov/catkin_ws/src/urdf01_rviz/urdf/xacro/demo02_test.xacro']] returned with code [2].

      Param xml is <param command="$(find xacro)/xacro $(find urdf01_rviz)/urdf/xacro/demo02_test.xacro" name="robot_description"/>
      The traceback for the exception was written to the log file

      1 条回复 最后回复 回复 引用 0
      • 第一个帖子
        最后一个帖子
      皖ICP备16016415号-7
      Powered by NodeBB | 鱼香ROS