sea-bass / turtlebot3_behavior_demos

Example repository for autonomous behaviors using TurtleBot3, as well as Docker workflows in ROS based projects.
MIT License
270 stars 53 forks source link

gazebo 11 and Ubuntu 22.04 #15

Closed laurafbec closed 1 year ago

laurafbec commented 1 year ago

Hi @sea-bass Thanks for your updates to the repo. This question is not about it, nevertheless, maybe you can help me. When trying to run gazebo 11 over Ubuntu 22.04 on a VM I get the errors:

` gazebo --verbose Gazebo multi-robot simulator, version 11.10.2 Copyright (C) 2012 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org

[Msg] Waiting for master. Gazebo multi-robot simulator, version 11.10.2 Copyright (C) 2012 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org

[Msg] Waiting for master. [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [Msg] Publicized address: 10.0.2.15 [Msg] Loading world file [/usr/share/gazebo-11/worlds/empty.world] [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [Msg] Publicized address: 10.0.2.15 [Wrn] [Server.cc:579] Waited 1seconds for namespaces. [Wrn] [Server.cc:579] Waited 1seconds for namespaces. [Wrn] [Server.cc:579] Waited 1seconds for namespaces. [Wrn] [Server.cc:579] Waited 1seconds for namespaces. [Wrn] [Server.cc:579] Waited 1seconds for namespaces. [Wrn] [Server.cc:579] Waited 1seconds for namespaces. [Wrn] [Server.cc:579] Waited 1seconds for namespaces. [Wrn] [Server.cc:579] Waited 1seconds for namespaces. [Wrn] [Server.cc:579] Waited 1seconds for namespaces. [Wrn] [Server.cc:579] Waited 1seconds for namespaces. [Err] [Server.cc:584] Waited 11 seconds for namespaces. Giving up. [Err] [Node.cc:118] No namespaces found `

I've tried to solve it by disabling Wayland on Ubuntu 22.04 or following the tutorials described in this post (https://answers.ros.org/question/408333/gazebo-ros2-humble-on-ubuntu-2204/?answer=408353#post-id-408353) with no luck.. Did you experience a similar error on your Docker deployment? Thanks in advance!

sea-bass commented 1 year ago

Hmm, I have not used VMs ever, but definitely ran into situations where Gazebo just wouldn't start up.

I think your Gazebo is trying to download all its models from the Internet and is simply taking a long time. If you wait for several minutes, does Gazebo eventually start up? Luckily with a VM vs. Docker, that state is preserved so it should just be a one time thing.

You could alternatively try do a clean reinstall of Gazebo (sudo apt-get install gazebo) or see if opening it through the ROS launch file works (ros2 launch gazebo_ros gazebo.launch.py).

... but yeah, ultimately this is also outside my realm of expertise.

laurafbec commented 1 year ago

I've been waiting for 1 hour and no luck :( Thanks @sea-bass!! I'll continue the research..

laurafbec commented 1 year ago

Hi @sea-bass! I've got the same problem with Gazebo when using your docker-compose file on one Ubuntu 22.04 VM. I don't know the reason... It has no sense. Could you please tell me which host OS are you using? Thanks again

sea-bass commented 1 year ago

I'm on Ubuntu 22.04 as my host OS, so no VMs.

If you can run Gazebo fine on the VM itself (no Docker), I might recommend trying out the local setup instructions I just posted yesterday? This has been made easier now.

laurafbec commented 1 year ago

Thanks @sea-bass!! It's just worked with docker and the Ubuntu 22.04 VM but I had to add 4vCPUs (I'll check again with a lower number :D) Thanks again!!