小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
ROS2 gazebo仿真加载不出模型
-
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节点启动不了,怎么解决 -
是什么东西的版本不对吗?我把gazebo_ros包重新卸载安装了也一样,怎么能这个包自带的节点启动不了呢?报错显示需要2个函数但是给了3个
-
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'].
又出现了之前的报错,找不到文件,啊啊啊啊啊怎么办来个大神帮帮我