Robotics StackExchange | Archived questions

TB3 isn't rendered correctly in Gazebo

My system

Steps to reproduce problem:

Part of my .bashrc file: source ~/ros2_ws/install/setup.bash export TURTLEBOT3_MODEL=waffle export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/home/ljaniec/ros2_ws/install/aws_robomaker_small_warehouse_world/share/aws_robomaker_small_warehouse_world/worlds:/home/ljaniec/ros2_ws/install/aws_robomaker_small_warehouse_world/share/aws_robomaker_small_warehouse_world/models:/opt/ros/galactic/share/turtlebot3_gazebo/models:/home/ljaniec/.gazebo/models

Expected behavior

The simulation with one visible TB3 with Nav2 stack and basic autonomy script starts.

Actual behavior

The simulation doesn't have correctly rendered robot (screens below). Autonomy demo still works (robot moves, LiDAR can be seen etc).

Simulation 1

Simulation 2

Simulation 3

Simulation 4

Additional information

What I tried:

Am I doing something wrong there? Standard simulation (1 TB3 in TurtleWorld) is working fine (edit: no longer after rebuilding latest galactic branch of ros-planning/navigation2 branch - robot is invisible there too) - robot model loads (edit: it's invisible too now) etc. The discrepancy between simulations with the same model (AFAIK) is surprising to me.

I prepared a small set of commands to show, what the problem is (with Turtlebot3 and MP400 from Neobotix).

Start Gazebo simulation with empty world

ros2 launch gazebo_ros gazebo.launch.py

Add TB3 SDF model to Gazebo (package turtlebot3_gazebo)

ros2 run gazebo_ros spawn_entity.py -file /opt/ros/galactic/share/turtlebot3_gazebo/models/turtlebot3_waffle/model.sdf -entity robot01

It spawns TB3 Waffle normally (visible model and LiDAR).

Start Gazebo simulation with empty world

ros2 launch gazebo_ros gazebo.launch.py

Add TB3 URDF model to Gazebo (package nav2_bringup)

ros2 run gazebo_ros spawn_entity.py -file /opt/ros/galactic/share/nav2_bringup/urdf/turtlebot3_waffle.urdf -entity robot01

Surprisingly, it spawns invisible TB3 Waffle. It is visible only in the 'Collision' view in Gazebo. No LiDAR too.

Start Gazebo simulation with empty world

ros2 launch gazebo_ros gazebo.launch.py

Generate TB3 SDF model from URDF

gz sdf -p turtlebot3_waffle.urdf > turtlebot3_waffle.sdf

Add TB3 SDF model to Gazebo (from package nav2_bringup)

ros2 run gazebo_ros spawn_entity.py -file ~/Desktop/turtlebot3_waffle.sdf -entity robot01

TB3 is invisible (but it's there, after launching 'Collision' view in Gazebo).

Start Gazebo simulation with empty world

ros2 launch gazebo_ros gazebo.launch.py

Add MP400 URDF model to Gazebo

ros2 run gazebo_ros spawn_entity.py -file ~/mp_400/mp_400.urdf -entity robot01

Robot is invisible, there are only blobs in the air and a LiDAR.

Generate SDF model from URDF

gz sdf -p mp_400.urdf > mp_400.sdf

Add MP400 SDF model to Gazebo

ros2 run gazebo_ros spawn_entity.py -file ~/mp_400/mp_400.sdf -entity robot01

Robot is again invisible, there are only blobs in the air and a LiDAR.

What is the problem there and how do I fix it?

Relevant issues and links I have found:

I have all used files there:

Asked by ljaniec on 2021-12-01 03:54:57 UTC

Comments

Great well structured question. Lots of details. I’ll follow up on it and hope you find an answer soon.

Asked by osilva on 2021-12-01 06:54:36 UTC

Answers