1001101_QIA 2022-05-08 14:14 采纳率: 88.9%
浏览 74
已结题

gazebo不显示机器人模型,只显示空的世界环境。

我需要进行什么操作才能让机器人模型显示出来呢

launch文件:


<launch>

    <param name="robot_description" textfile="$(find urdf02_gazebo)/urdf/helloworld.urdf" />

    <include file="$(find gazebo_ros)/launch/empty_world.launch" />

    <node pkg="gazebo_ros" type="spawn_model" name="model" args="-urdf -model mycar -param robot_description"  />
</launch>

URDF文件:

<robot name="mycar">
    <link name="base_link">
        <visual>
            <geometry>
                <box size="0.5 0.2 0.1" />
            </geometry>
            <origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
            <material name="yellow">
                <color rgba="0.5 0.3 0.0 1" />
            </material>
        </visual>

        <collision>
            <geometry>
                <box size="0.5 0.2 0.1" />
            </geometry>
            <origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
        </collision>

        <inertial>
            <origin xyz="0 0 0" />
            <mass value="6" />
            <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1" />
        </inertial>
    </link>

    <gazebo reference="base_link">
        <material>Gazebo/Black</material>
    </gazebo>


</robot>

运行日志:

milk@milk:~/DEMO05_WS$ roslaunch urdf02_gazebo demo01_helloworld.launch
... logging to /home/milk/.ros/log/2bc6078c-ce90-11ec-910d-94b86d736de2/roslaunch-milk-15810.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.

started roslaunch server http://milk:40587/

SUMMARY
========

PARAMETERS
 * /gazebo/enable_ros_network: True
 * /robot_description: <robot name="myca...
 * /rosdistro: melodic
 * /rosversion: 1.14.13
 * /use_sim_time: True

NODES
  /
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)

ROS_MASTER_URI=http://localhost:11311

process[gazebo-1]: started with pid [15832]
[ INFO] [1651989570.981390379]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1651989570.983231402]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
process[gazebo_gui-2]: started with pid [15846]
[ INFO] [1651989571.250818696, 0.007000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1651989571.274818693, 0.030000000]: Physics dynamic reconfigure ready.
[ INFO] [1651989571.447270882]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1651989571.448756653]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...


  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 5月16日
    • 创建了问题 5月8日

    悬赏问题

    • ¥15 关于模型导入UNITY的.FBX: Check external application preferences.警告。
    • ¥15 气象网格数据与卫星轨道数据如何匹配
    • ¥100 java ee ssm项目 悬赏,感兴趣直接联系我
    • ¥15 微软账户问题不小心注销了好像
    • ¥15 x264库中预测模式字IPM、运动向量差MVD、量化后的DCT系数的位置
    • ¥15 curl 命令调用正常,程序调用报 java.net.ConnectException: connection refused
    • ¥20 关于web前端如何播放二次加密m3u8视频的问题
    • ¥15 使用百度地图api 位置函数报错?
    • ¥15 metamask如何添加TRON自定义网络
    • ¥66 关于川崎机器人调速问题