Unable to Visualize map & navgraphs in RViz
ganatsh opened this issue · 12 comments
Bug report
Required information:
- Operating system and version: Ubuntu 20.04
- OpenRMF installation type: From source, binaries
- OpenRMF version or commit hash: foxy
- ROS installation type: binaries
- Package or library, if applicable: N/A
Description of the bug
When we are trying to run the RMF office demo. We are not able to visualize the map and navgraph in the RViZ window that opens up.
Where as when we try to run the RMF office demo along with the gazebo. We are able to visualize the map and navgraph in RViZ window.
Sometimes the map and navgraph is visible when we reboot our system, and then run the RMF. After that when we try to run the RMF file, It doesn't shows the map and navgraph.
Steps to reproduce the bug
- Launch RMF using
ros2 launch rmf_demos office_demo.launch.xml
- After that, when the RViZ Window open's up we can't visualize the map.
- Launch RMF using
ros2 launch rmf_demos_gz office_demo.launch.xml
- We can visualize the map and navgraph in RViZ
Expected behavior
When we launch the RMF demo file. It open ups a RViZ window in order to show the
map as well as the Navgraph for particular robots.
Actual behavior
What actually is happening is that, When ever we try to run the RMF demo file. It open ups the RViZ
window but is not showing the map and the Navgraph for the robots. Whereas just keeps on displaying a black screen in the RViZ window. Without anything to display.
try to change the <arg name="use_sim_time" default="false"/>
from false to true <arg name="use_sim_time" default="true"/>
in the /opt/ros/foxy/share/rmf_demos/office.launch.xml
file.
Thank You, Asem it worked for me.
Hi @ganatsh ,
The launch files in rmf_demos_gz
are supersets of those in rmf_demos
. The latter ones can be thought of as launch files for testing with real robots while the ones in rmf_demos_gz
launch up a gazebo environment for testing in simulation. So you Steps to Reproduce
is not a valid workflow. You would either launch from rmf_demos
or rmf_demos_gz
depending on whether you're testing in the real world or simulation, but not both.
Having said that, it is strange that you were not able to visualize the map and traffic lanes in RViz after running ros2 launch rmf_demos office_demo.launch.xml
. Even with use_sim_time
set to false
, you should be able to see these in RViz. Are you able to share the contents on your office_demos.launch.xml
file?
Thank-you for replying @Yadunund ,
We actually are using the files, in a similar manner that you have mentioned above.
I also am having the same doubt. That it should be working, with use_sim_time
set to false
.
Yes, i can share the contents of office_demos.launch.xml
. But, i don't think we made any changes to the file itself
office.ODT
You can find the contents of the office.launch.xml in the above attached file.
Thanks for sharing. There file looks okay. There was a similar discussion here. Looks like the issue was DDS related for another user. Perhaps you could try switching DDS implementations as suggested to see if that solves the problem.
Hi
If i am using the system on real robot, i shall set use_sim_time
to false
, right? But i couldn't see anything on RVIZ, except /fleet_markers
. Any idea how to have others (/floorplan
, /map_markers
, /schedule_markers
, /building_systems_markers
) to be seen?
Best,
Samuel
Did you make sure to set use_sim_time
to false
for all the nodes that you launched?
Hi @Yadunund
Yes all my nodes are having use_sim_time
with false
. What else shall i check?
Best,
Samuel
Does the Map Name
in your SchedulePanel in RViz match the level name in the navgraph exported from rmf_traffic_editor
? For example, if you defined a level named "Level1" in traffic editor with navigation lanes for your robot and you're feeding in this navigation graph to your fleet adapter, then the Map Name
textbox should be set to this value.
Hi @Yadunund
Yes, map name
in SchedulePanel on RVIZ match the level name in navgraph exported from rmf_traffic_editor
.
Best,
Samuel
Could you share your system/workspace configuration? Refer to the "Required Information" in the original description. Describe how you built the workspace and launched RMF.
Also attach the entire terminal output in a gist or txt file
Hi Guys,
I resolved this error by downgrading int numpy version below 1.16. There is some error in numpy.
"AttributeError: module 'numpy' has no attribute 'asscalar'"
because of
Deprecated since version 1.16: Deprecated, use numpy.ndarray.item() instead.