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

    ROS2 gazebo仿真加载不出模型

    已定时 已固定 已锁定 已移动
    仿真
    gazebo 仿真
    1
    3
    591
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • 17548456371
      1754845637
      最后由 编辑

      ros2 launch fishbot_description gazebo.launch.py
      [INFO] [launch]: All log files can be found below /home/shy/.ros/log/2023-07-06-08-42-29-221858-shy-virtual-machine-4829
      [INFO] [launch]: Default logging verbosity is set to INFO
      [INFO] [gazebo-1]: process started with pid [4830]
      [INFO] [spawn_entity.py-2]: process started with pid [4832]
      [spawn_entity.py-2] [INFO] [1688604150.308093867] [spawn_entity]: Spawn Entity started
      [spawn_entity.py-2] [INFO] [1688604150.308970902] [spawn_entity]: Loading entity XML from file /home/shy/chapt8_ws/install/fishbot_description/share/fishbot_description/urdf/fishbot_gazebo.urdf
      [spawn_entity.py-2] Traceback (most recent call last):
      [spawn_entity.py-2] File "/opt/ros/humble/lib/gazebo_ros/spawn_entity.py", line 370, in <module>
      [spawn_entity.py-2] main()
      [spawn_entity.py-2] File "/opt/ros/humble/lib/gazebo_ros/spawn_entity.py", line 365, in main
      [spawn_entity.py-2] exit_code = spawn_entity_node.run()
      [spawn_entity.py-2] File "/opt/ros/humble/lib/gazebo_ros/spawn_entity.py", line 143, in run
      [spawn_entity.py-2] self.get_logger().error('Error: specified file %s does not exist', self.args.file)
      [spawn_entity.py-2] TypeError: RcutilsLogger.error() takes 2 positional arguments but 3 were given
      [ERROR] [spawn_entity.py-2]: process has died [pid 4832, exit code 1, cmd '/opt/ros/humble/lib/gazebo_ros/spawn_entity.py -entity fishbot -file /home/shy/chapt8_ws/install/fishbot_description/share/fishbot_description/urdf/fishbot_gazebo.urdf --ros-args'].
      [gazebo-1] Gazebo multi-robot simulator, version 11.10.2
      [gazebo-1] Copyright (C) 2012 Open Source Robotics Foundation.
      [gazebo-1] Released under the Apache 2 License.
      [gazebo-1] http://gazebosim.org
      [gazebo-1]
      [gazebo-1] Gazebo multi-robot simulator, version 11.10.2
      [gazebo-1] Copyright (C) 2012 Open Source Robotics Foundation.
      [gazebo-1] Released under the Apache 2 License.
      [gazebo-1] http://gazebosim.org
      [gazebo-1]
      [gazebo-1] [Msg] Waiting for master.
      [gazebo-1] [Msg] Connected to gazebo master @ http://127.0.0.1:11345
      [gazebo-1] [Msg] Publicized address: 192.168.153.128
      [gazebo-1] [Msg] Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
      [gazebo-1] [Wrn] [Event.cc:61] Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call
      [gazebo-1] [Wrn] [Event.cc:61] Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call
      [gazebo-1] [Msg] Waiting for master.
      [gazebo-1] [Msg] Connected to gazebo master @ http://127.0.0.1:11345
      [gazebo-1] [Msg] Publicized address: 192.168.153.128
      [gazebo-1] [Msg] Loading world file [/usr/share/gazebo-11/worlds/empty.world]
      [INFO] [gazebo-1]: process has finished cleanly [pid 4830]
      启动launch文件加载不出模型,然后是这个spawn_entity.py节点启动不了,怎么解决

      1 条回复 最后回复 回复 引用 0
      • 17548456371
        1754845637
        最后由 编辑

        是什么东西的版本不对吗?我把gazebo_ros包重新卸载安装了也一样,怎么能这个包自带的节点启动不了呢?报错显示需要2个函数但是给了3个

        1 条回复 最后回复 回复 引用 0
        • 17548456371
          1754845637
          最后由 编辑

          ros2 launch fishbot_description gazebo.launch.py
          [INFO] [launch]: All log files can be found below /home/shy/.ros/log/2023-07-06-17-42-28-661501-shy-virtual-machine-9184
          [INFO] [launch]: Default logging verbosity is set to INFO
          [INFO] [gazebo-1]: process started with pid [9185]
          [INFO] [spawn_entity.py-2]: process started with pid [9187]
          [spawn_entity.py-2] [INFO] [1688636549.330183310] [spawn_entity]: Spawn Entity started
          [spawn_entity.py-2] [INFO] [1688636549.331047825] [spawn_entity]: Loading entity XML from file /home/shy/chapt8_ws/install/fishbot_description/share/fishbot_description/urdf/fishbot_gazebo.urdf
          [spawn_entity.py-2] Traceback (most recent call last):
          [spawn_entity.py-2] File "/opt/ros/humble/lib/gazebo_ros/spawn_entity.py", line 370, in <module>
          [spawn_entity.py-2] main()
          [spawn_entity.py-2] File "/opt/ros/humble/lib/gazebo_ros/spawn_entity.py", line 365, in main
          [spawn_entity.py-2] exit_code = spawn_entity_node.run()
          [spawn_entity.py-2] File "/opt/ros/humble/lib/gazebo_ros/spawn_entity.py", line 143, in run
          [spawn_entity.py-2] self.get_logger().error('Error: specified file %s does not exist', self.args.file)
          [spawn_entity.py-2] TypeError: RcutilsLogger.error() takes 2 positional arguments but 3 were given
          [gazebo-1] Gazebo multi-robot simulator, version 11.10.2
          [gazebo-1] Copyright (C) 2012 Open Source Robotics Foundation.
          [gazebo-1] Released under the Apache 2 License.
          [gazebo-1] http://gazebosim.org
          [gazebo-1]
          [gazebo-1] Gazebo multi-robot simulator, version 11.10.2
          [gazebo-1] Copyright (C) 2012 Open Source Robotics Foundation.
          [gazebo-1] Released under the Apache 2 License.
          [gazebo-1] http://gazebosim.org
          [gazebo-1]
          [ERROR] [spawn_entity.py-2]: process has died [pid 9187, exit code 1, cmd '/opt/ros/humble/lib/gazebo_ros/spawn_entity.py -entity fishbot -file /home/shy/chapt8_ws/install/fishbot_description/share/fishbot_description/urdf/fishbot_gazebo.urdf --ros-args'].
          又出现了之前的报错,找不到文件,啊啊啊啊啊怎么办来个大神帮帮我

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