ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Tutorial: Using a URDF in Gazebo: Gazebo showing black world

asked 2021-11-10 14:03:29 -0500

FlyingPolska gravatar image

Hi everyone,

I'm trying to make my way through the gazebo-ros tutorials, but now im stuck and need your help:

When trying to spawn the rrbot from the tutorial with command

roslaunch rrbot_gazebo rrbot_world.launch verbose:=true

gazebo starts without warnings/errors and the rrbot is observable in the "World"-Tab on the left side of the gui under "models". Unfortunately the whole world in gazebo is black and therefore I cant see the robot itself.

Am I missing anything? What else could I try to obtain hidden warning?

Hint: I am able to load the rrbot into rViz and there I can also rotate the joints with the joint_state_publisher.

My setup:

  • Ubuntu 20.04 LTS on virtual machine
  • Gazebo 11.8.1
  • ROS noetic 1.15.13

Followed Tutorial:

https://gazebosim.org/tutorials?tut=r...

Thanks for you help in advance :)

Patrick

edit retag flag offensive close merge delete

Comments

This may not actually be the cause, but you mention you're using a VM. Those have traditionally not been too reliable when it comes to 3D accelerated GUI applications. It can work, but it also sometimes doesn't. Artefacts while rendering are one of the problems that can occur.

gvdhoorn gravatar image gvdhoorn  ( 2021-11-10 14:15:30 -0500 )edit

When i run the empty_world.launch with roslaunch cmd, the world appears normal and i can insert models with no Problem.

FlyingPolska gravatar image FlyingPolska  ( 2021-11-10 15:07:38 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-11-10 23:48:10 -0500

sidharth.jeyabal gravatar image

just run gazebo in ur command promt. Is it opening?

edit flag offensive delete link more

Comments

Yes I can run gazebo with cmd gazebo and roslaunch+empty_world.launch with no problems.

I created already an sdf Robot in gazebo and wanted to switchover to ros now.

FlyingPolska gravatar image FlyingPolska  ( 2021-11-10 23:54:35 -0500 )edit

I'm not an expert in this but I shall try to help you. Can you copy and paste urdf file?

sidharth.jeyabal gravatar image sidharth.jeyabal  ( 2021-11-11 11:06:16 -0500 )edit

I am using the unchanged standard rrbot tutorial urdf file: Dropbox Link

FlyingPolska gravatar image FlyingPolska  ( 2021-11-12 11:30:11 -0500 )edit

At what stage are you now?

PLease share your launch file and world file as well

sidharth.jeyabal gravatar image sidharth.jeyabal  ( 2021-11-14 01:10:29 -0500 )edit

Im at the step where the rrbot is loaded into gazebo: "roslaunch rrbot_gazebo rrbot_world.launch"

rrbot_world.launch

rrbot.world

FlyingPolska gravatar image FlyingPolska  ( 2021-11-14 03:55:25 -0500 )edit

i think you have uploaded rrbot.xacro instead of rrbot.world

sidharth.jeyabal gravatar image sidharth.jeyabal  ( 2021-11-14 23:49:28 -0500 )edit

Yes, you are right :) New Try: rrbot.world

FlyingPolska gravatar image FlyingPolska  ( 2021-11-16 13:16:06 -0500 )edit

launch your robot with this launch file and let me know if the robot appears in the world.

NOTE: Use your xacro file !!! (i.e rrbot.xacro) and before launching delete all the plugins , transmission etc from xacro file. There should be only robot structural elements inside the xacro file while you launch

<launch>   
 <!-- Load the CougarBot URDF model into the parameter server -->
 <param name="robot_description" command="$(find xacro)/xacro --inorder '$(find 2wr)/urdf/two_v1.xacro'" />
<!-- Start Gazebo with an empty world -->
<include file="$(find gazebo_ros)/launch/empty_world.launch"/>


<!-- Spawn a CougarBot in Gazebo, taking the description from the
parameter server -->
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model"
args="-param robot_description -urdf -model 2wr" />
</launch>
sidharth.jeyabal gravatar image sidharth.jeyabal  ( 2021-11-17 02:30:54 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-11-10 14:03:29 -0500

Seen: 182 times

Last updated: Nov 10 '21