URDF robot model not loading correctly in Gazebo
Hello,
I tried to learn ROS2 Galactic and Navigation2 stack use through this repository:
https://github.com/SteveMacenski/nav2...
Especially package nav2_simple_commander
later, but I have problems already at the start.
When I prepare a setup as in the instructions:
## Create a workspace
mkdir -p colcon_ws/src
cd colcon_ws/src
## Get the demo code
git clone git@github.com:stevemacenski/nav2_rosdevday_2021.git
## Get the dependencies not shipped with Galactic at June 8, 2021.
vcs import . < nav2_rosdevday_2021/deps.repos
cd ../
## Install dependencies which are shipped with Galactic at June 8, 2021.
rosdep install --from-path src --ignore-src -r -y
## Build the workspace
source /opt/ros/galactic/setup.bash
colcon build
I can start my simulation through:
source colcon_ws/install/setup.bash
ros2 launch nav2_rosdevday_2021 system_launch.py # launches simulation, rviz, nav2
source colcon_ws/install/setup.bash
python3 colcon_ws/src/nav2_rosdevday_2021/nav2_rosdevday_2021/scripts/picking_demo.py
Gazebo starts, but the robot model isn't showing up (the LiDAR still shows though, like the robot is invisible) in the world. It is still on the world's model list too.
I tried to change the robot model from mp_400
to other from the same package (e.g. mpo_700
, in the launcher file) but then there isn't even a LiDAR and Gazebo doesn't show it on the list of models in the world.
I have added in .bashrc
this line:
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:/home/ljaniec/ros2_ws/install/neo_simulation2/share/neo_simulation2/robots:/home/ljaniec/ros2_ws/install/neo_simulation2/share/neo_simulation2/models:/opt/ros/galactic/share/turtlebot3_gazebo/models:/home/ljaniec/.gazebo/models
But it seems that the URDF model isn't working with Gazebo - it has no error, I checked it with gz sdf -p mp_400.urdf
.
How could I solve this problem of invisible AMR in the Gazebo simulation? Why my attempt at changing the robot model failed even worse?