Lifts not showing up in Rviz when simulation runs (#463)

Posted by @Jerrybaoyilei:

Hi,

I am setting up my own simulation based on the demo simulations in the rmf_demos repo. I added the lifts in the traffic editor. When I run the simulation, the lifts are rendered in Gazebo. However, unlike the demo simulations (i.e., the hotel or the clinic), I don’t see the lift visualized as blue boxes in Rviz.

When I send a delivery task to another floor, the robot’s planned path goes inside the elevator, but the robot just stops at the elevator door and refuses to enter the elevator. My guess is that this behavior is related to the “lift not visualized in Rviz” problem.

This is my .rviz file for the simulation.
This is my .building.yaml file for the simulation.

I am using the Humble binary for both ROS 2 and RMF. Thanks in advance for any help!

Edit:
Below is the screenshot for the Rviz window when running my own simulation. You can see that there are no lift showing up in the red circled area:


Below is the screenshot for the Gazebo Classic window when running my own simulation. You can see that I’ve already added lifts.

Below is the screenshot for the Rviz window when running the hotel simulation from rmf_demos. You can see that lifts are visualized by blue boxes.


Edited by @Jerrybaoyilei at 2024-05-14T19:27:58Z

Posted by @Jerrybaoyilei:

I found out why. When launching the simulation, need to add an argument initial_map:=<map_name>. For example, if your map name is L20 instead of the default L1, then you need to add initial_map:=L20 as an argument to the launch command.

Also, make sure your lift’s names are like Lift<x>, for example, Lift1. At first I named them as elevator1, and robots refuse to enter the lifts. Very strange detail but it’s what it is.