小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
在gazebo中无法加载模型
-
@892530731 你好,谢谢,我安装了,原来那个报错还是存在的,依然无法加载模型出来。现在又增加了新的问题,gazebo闪退,提示如下:
[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 6701, exit code 1, cmd '/opt/ros/humble/lib/gazebo_ros/spawn_entity.py -entity fishbot -file /home/wl/Documents/fishbot_ws/install/fishbot_description/share/fishbot_description/urdf/fishbot_gazebo.urdf --ros-args'].
[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.0.130
[gazebo-1] [Wrn] [GuiIface.cc:120] QSocketNotifier: Can only be used with threads started with QThread
[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] [Err] [WindowManager.cc:132] Unable to create the rendering window
[gazebo-1] [Err] [WindowManager.cc:132] Unable to create the rendering window
[gazebo-1] [Err] [WindowManager.cc:132] Unable to create the rendering window
[gazebo-1] [Err] [WindowManager.cc:132] Unable to create the rendering window
[gazebo-1] [Err] [WindowManager.cc:132] Unable to create the rendering window
[gazebo-1] [Err] [WindowManager.cc:132] Unable to create the rendering window
[gazebo-1] [Err] [WindowManager.cc:132] Unable to create the rendering window
[gazebo-1] [Err] [WindowManager.cc:132] Unable to create the rendering window
[gazebo-1] [Err] [WindowManager.cc:132] Unable to create the rendering window
[gazebo-1] [Err] [WindowManager.cc:132] Unable to create the rendering window
[gazebo-1] [Err] [WindowManager.cc:139] EXCEPTION: Unable to create the rendering window
[gazebo-1]
[gazebo-1]
[gazebo-1] terminate called after throwing an instance of 'gazebo::common::Exception'
[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.0.130
[gazebo-1] [Msg] Loading world file [/usr/share/gazebo-11/worlds/empty.world]
[ERROR] [gazebo-1]: process has died [pid 6699, exit code 255, cmd 'gazebo --verbose -s libgazebo_ros_init.so -s libgazebo_ros_factory.so'].
[gazebo-1] -
@892530731 我又把这个包卸载了,我的gazebo不闪退了,但是还是无法加载出模型,可能这个方法不太适合我出现的这个问题,再次感谢。
-
@2918095496 补充一下,使用小鱼的rqt call的方法可以在gazebo中加载出模型,但是加载出来的模型不完整,没有左右轮子。求帮助!
-
我和你一样的报错,你先把conda退出来
“conda deactivate”
试试 -
@759323061我不太明白你说的操作,能具体一点吗,感谢!
-
@2918095496 就是比平时多一步,再每个要用到的终端里输入conda deactivate,就行或者直接把miniconda卸载就行
-
@759323061 我的运行没有这个命令,应该是我没有装这个。
-
@759323061 是我的加载路径被我给搞错了,所以一直没有模型。谢谢你的帮助
-
您好,请问最后这个问题怎么解决的呢,我跟您这个问题一模一样
-
@1371246828 urdf_model_path = '/home/ws_test/rviz_test/src/fishbot_description/urdf/fishbot_gazebo.urdf'直接变成自己的加载路径试一下
-
找到launch.py将urdf_model_path后的路径换成urdf文件的绝对路径