osrf / rmf_demos

Demos to showcase the capabilities of RMF
Apache License 2.0
69 stars 38 forks source link

RobotState floor name #91

Closed MakinoharaShouko closed 4 years ago

MakinoharaShouko commented 4 years ago

I am now getting the following error in my rmf_demo scenario after pulling the latest rmf_core and rmf_schedule_visualizer. The built in scenarios do not generate this error.

[magni_fleet_adapter-10] [ERROR] [magni_fleet_adapter]: Robot named [magni2] belonging to fleet [magni] is lost because we cannot figure out what floor it is on. Please publish the robot's current floor name in the level_name field of its RobotState.

There seems to be something wrong when the RobotState message is published. I am wondering aspects of the scenario may cause this error. Does it have something to do with how I set the floors?

Yadunund commented 4 years ago

Hi,

Can you ensure your branch of traffic_editor has incorporated this fix https://github.com/osrf/traffic_editor/pull/151

I'm assuming you're seeing this error from the beginning? Can you check if the spawn waypoint of the magni is connected to its navigation graph? Posing a screenshot of your rviz visualizer would be very helpful.

MakinoharaShouko commented 4 years ago

image Here is how it looks like in the traffic editor. My rviz currently does not display anything.
I was on ign_plugins branch which does not have the fix. I just switched to master branch but the problem persists

Yadunund commented 4 years ago
codebot commented 4 years ago

The latest traffic-editor does not render bidirectional arrows; it only renders unidirectional arrows (two-way lanes are painted a solid color to try to de-clutter the UI a bit). So from looking at the screenshot, it seems that the build of traffic-editor is not fully up-to-date.

On Sat, Jun 27, 2020 at 3:03 PM Yadu notifications@github.com wrote:

  • Can you share the output of ros2 topic echo /robot_state for "magni1"?
  • Are you passing the correct navigation graph to the fleet adapter? https://github.com/osrf/rmf_demos/blob/326382d4dae1f73d33822acba734e676e8ef5e23/demos/launch/office.launch.xml#L39
  • Also can you try performing a clean build after switching to master? i.e., removing build/ log/ and install folders and running colcon build again. In the latest traffic_editor master, bidirectional lanes do not have double sided arrows as seen in your image.
  • Are you not able to see robots or lanes in the visualizer even when you pan around? Zooming out and in might help locate where things are visualized. The view can then be saved in the config for subsequent launches. Make sure that Map Name in the Schedule Panel in Rviz is set to "guest_level" as you've created in map.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/osrf/rmf_demos/issues/91#issuecomment-650510843, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIFDWT3DYQ3R75X64UOYTDRYWKUJANCNFSM4OJ4IKDQ .

MakinoharaShouko commented 4 years ago

The latest traffic-editor does not render bidirectional arrows; it only renders unidirectional arrows (two-way lanes are painted a solid color to try to de-clutter the UI a bit). So from looking at the screenshot, it seems that the build of traffic-editor is not fully up-to-date. On Sat, Jun 27, 2020 at 3:03 PM Yadu @.***> wrote: - Can you share the output of ros2 topic echo /robot_state for "magni1"? - Are you passing the correct navigation graph to the fleet adapter? https://github.com/osrf/rmf_demos/blob/326382d4dae1f73d33822acba734e676e8ef5e23/demos/launch/office.launch.xml#L39 - Also can you try performing a clean build after switching to master? i.e., removing build/ log/ and install folders and running colcon build again. In the latest traffic_editor master, bidirectional lanes do not have double sided arrows as seen in your image. - Are you not able to see robots or lanes in the visualizer even when you pan around? Zooming out and in might help locate where things are visualized. The view can then be saved in the config for subsequent launches. Make sure that Map Name in the Schedule Panel in Rviz is set to "guest_level" as you've created in map. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#91 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIFDWT3DYQ3R75X64UOYTDRYWKUJANCNFSM4OJ4IKDQ .

I am editing with another traffic editor outside the rmf_demos_ws which I did not upgrade. In the work space I pulled the latest version

MakinoharaShouko commented 4 years ago

When my rviz starts, it only loads one robot on the map though the map name is correct. I have to manually retype the map name to get the whole map to load correctly. I think that is why the robots would get lost, but I am confused why rviz does not load the navigation graph at the beginning. image

Yadunund commented 4 years ago

The Rviz problems you describe are related to setting up the rviz config file and not pertaining to the original issue of the robot being "lost".

The original problem could be due to the robot not reporting its state information correctly. Hence, it would be helpful if you could share your terminal output of ros2 topic echo /robot_state as suggested previously. If you're using an older implementation of slotcar plugin, the level_name field may not be populated in the publishing RobotState message. It would be helpful to verify this.

With regards to seeing the lanes in rviz at launch, you can to ensure:

MakinoharaShouko commented 4 years ago

The Rviz problems you describe are related to setting up the rviz config file and not pertaining to the original issue of the robot being "lost".

The original problem could be due to the robot not reporting its state information correctly. Hence, it would be helpful if you could share your terminal output of ros2 topic echo /robot_state as suggested previously. If you're using an older implementation of slotcar plugin, the level_name field may not be populated in the publishing RobotState message. It would be helpful to verify this.

With regards to seeing the lanes in rviz at launch, you can to ensure:

  • Your launch file that includes the visualizer.xml file, passes the correct "map_name" argument for your map. In rmf_demos here is a reference for doing this https://github.com/osrf/rmf_demos/blob/7e60aea971a9b36e5b3ff72d070a165441a1756f/demos/launch/common.launch.xml#L24
  • When RViz launches, the "Map Name" field in the SchedulePanel will probably differ from the name supplied above. This is because the Panel does not use the same launch parameters. You should overwrite the field with the appropriate map name and save the Rviz config file so that subsequent launches will load the correct map name.

Thank you for the suggestion on RViz, now I get the map load when it starts.
For the floor map error, I cloned the packages again and rebuilt my workspace. Now I don't have the error. I think probably something did not update when I pulled before.