neobotix / neo_simulation2

ROS 2 simulation packages for the Neobotix robots
MIT License
21 stars 11 forks source link

Neobotix MP400 isn't rendered correctly in Gazebo #33

Closed ljaniec closed 2 years ago

ljaniec commented 2 years ago

Bug report

Steps to reproduce:

Part of my .bashrc file:

source ~/nav2_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:/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

Expected behavior

The simulation with one visible Neobotix MP 400 is rendered and Nav2 stack starts.

Actual behavior

The simulation doesn't have correctly rendered robot (screens below).

Additional information

What I tried:

Any suggestions how to fix it?

padhupradheep commented 2 years ago

Well, the problem is indeed strange. deps.repos uses foxy branch for neo_simulation2. I would suggest you to change it to the galactic branch and retry it again. Also, please do check the documentation here for the setup of the simulation. Do let me know, if you still have trouble.

Also you do not have to export the gazebo models into your bashrc. It is already taken care.

You need to export the MY_ROBOT (desired robot) and the MAP_NAME as shown here.

ljaniec commented 2 years ago

Hello,

I prepared a small set of commands to show, what I think the problem is.

TB3 case 1

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).

TB3 case 2-1

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.

TB3 case 2-2

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).

MP400 case

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?

I wanted to use MP400 as a model of AMR in my simulations, but Gazebo makes working with URDF models a bit hard... How could I fix it?

Relevant issues and links I have found:

I have all used files there:

padhupradheep commented 2 years ago

I wanted to use MP400 as a model of AMR in my simulations, but Gazebo makes working with URDF models a bit hard... How could I fix it?

For your application, you are just utilizing our URDF models and unfortunately, we do not have further resource to help you. This issue is more related with Gazebo and usage of SDF. My suggestion would be to post this issue in answers.ros.org ! I'm pretty sure someone can help you over there.

Closing the issue. Feel free to open a new issue, if you have any trouble with the pre-existing pipeline setup we have for the simulation.

ljaniec commented 2 years ago

Relevant issue: https://github.com/ros-simulation/gazebo_ros_pkgs/issues/1272#issuecomment-857513366