1
$\begingroup$

I'm a beginner in ROS, since the learning curve for ROS is steep i decided to use a book to learn how to use ros ([ROS Robotics Projects - Second Edition][1]). I'm currently on the third chapter. I'm learning how to create URDF files and connect ROS with Gazebo. I'm trying to test the robot base and see how it moves in gazebo but when i type the code

$ roslaunch robot_description base_gazebo_control_xacro.launch 

Gazebo opens up but never passes the loading screen and it just stays frozen throughout. I decided to check gazebo's site and i realized in the book we didn't created a world file but if that was the issue shouldn't gazebo open up at least and give an error? I'm currently using ROS melodic on Ubuntu 18.4 running on VirtualBox My PC specs are: Hp Envy m4, Intel core i7-3632QM 4 cores, 8gb RAM, My virtualbox settings: 25gb storage, 4gb RAM, Display | Video Memory: 128 MB, Acceleration: 3D, Number of CPUs: 1. Do you think the reason my gazebo freezes is because of my laptops specs? If so do you think it'll run better if i dual boot or use windows subsystem for linux and which option do you think is better? Thank you [1]: https://www.packtpub.com/product/ros-robotics-projects-second-edition/9781838649326

$\endgroup$

1 Answer 1

1
$\begingroup$

Dual booting is always a better option. It allocates all your resources for linux to use and since ros is built on top of ubuntu, you are better off dual booting. Moreover, if you are learning ros and going to be using it often, why not dual boot?

That being said, gazebo should run in your vm (given your specs). Can you launch gazebo normally (without your xacro file)? If not, do any errors show up? gazebo comes with some empty world examples. Try to see if you can load those. If you can, then your gazebo installation and runtime is probably fine and your issue stems from the xacro file you created. If gazebo throws some erros/freezes in a similar way, you probably should reinstall gazebo.

$\endgroup$
3
  • $\begingroup$ Yes i can launch gazebo normally no error shows up. The xacro file i used i copied it straight from the books github. I have no idea why it isn't working $\endgroup$ Commented Jan 19, 2021 at 20:46
  • $\begingroup$ Rvis works fine with it though $\endgroup$ Commented Jan 19, 2021 at 20:47
  • 1
    $\begingroup$ The good news is that your gazebo installation seems fine. Make sure you understand every line in your xacro file. Copying a file from another project might not always work. For a quick fix, you can try this: comment all lines in your xacro file and uncomment section by section, in each case launching gazebo to make sure it doesn't freeze. $\endgroup$ Commented Jan 20, 2021 at 0:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.