Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rviz crash when load our own map. #908

Closed
MengNan-Li opened this issue Jul 3, 2019 · 6 comments
Closed

Rviz crash when load our own map. #908

MengNan-Li opened this issue Jul 3, 2019 · 6 comments
Labels
1 - High High Priority

Comments

@MengNan-Li
Copy link

Bug report

Required Info:

  • Operating System:
    • Ubuntu18.04
  • Installation type:
    • binaries
  • Version or commit hash:
    • 0.2.0
  • DDS implementation:
    -Fast-RTPS, OpenSplice
  • Client library (if applicable):
    • rclcpp

Steps to reproduce issue

Use turtlebot3_world map to display properly in Rviz: 
ros2 launch nav2_bringup nav2_bringup_launch.py autostart:=True map:=/home/ros/yunji_ros2/src/navigation2/nav2_bringup/launch/turtlebot3_world.yaml use_sim_time:=False map_type:=occupancy

But, Using our own map doesn't display properly:
ros2 launch nav2_bringup nav2_bringup_launch.py autostart:=True map:=/home/ros/yunji_ros2/src/navigation2/nav2_bringup/launch/11/map1.yaml use_sim_time:=False map_type:=occupancy

ros2 run rviz2 rviz2 -d $(ros2 pkg prefix nav2_bringup)/share/nav2_bringup/launch/nav2_default_view.rviz

Expected behavior

Showing the map in Rviz

Actual behavior

ros2 run rviz2 rviz2 -d $(ros2 pkg prefix nav2_bringup)/share/nav2_bringup/launch/nav2_default_view.rviz
[INFO] [rviz2]: Stereo is NOT SUPPORTED
[INFO] [rviz2]: OpenGl version: 3 (GLSL 1.3)
[INFO] [rviz2]: Stereo is NOT SUPPORTED
[INFO] [rviz2]: Creating 1 swatches_
[ERROR] [rviz2]: InvalidParametersException: Stream size does not match calculated image size in Image::loadRawData at /tmp/binarydeb/ros-dashing-rviz-ogre-vendor-6.1.1/obj-x86_64-linux-gnu/ogre-master-ca665a6-prefix/src/ogre-master-ca665a6/OgreMain/src/OgreImage.cpp (line 283)
[ERROR] [rviz2]: Failed to create 1 swatches_
[INFO] [rviz2]: Creating 2 swatches_
[ERROR] [rviz2]: InvalidParametersException: Stream size does not match calculated image size in Image::loadRawData at /tmp/binarydeb/ros-dashing-rviz-ogre-vendor-6.1.1/obj-x86_64-linux-gnu/ogre-master-ca665a6-prefix/src/ogre-master-ca665a6/OgreMain/src/OgreImage.cpp (line 283)
[ERROR] [rviz2]: Failed to create 2 swatches_
[INFO] [rviz2]: Creating 4 swatches_
[ERROR] [rviz2]: InvalidParametersException: Stream size does not match calculated image size in Image::loadRawData at /tmp/binarydeb/ros-dashing-rviz-ogre-vendor-6.1.1/obj-x86_64-linux-gnu/ogre-master-ca665a6-prefix/src/ogre-master-ca665a6/OgreMain/src/OgreImage.cpp (line 283)
[ERROR] [rviz2]: Failed to create 4 swatches_
[INFO] [rviz2]: Creating 8 swatches_
[ERROR] [rviz2]: InvalidParametersException: Stream size does not match calculated image size in Image::loadRawData at /tmp/binarydeb/ros-dashing-rviz-ogre-vendor-6.1.1/obj-x86_64-linux-gnu/ogre-master-ca665a6-prefix/src/ogre-master-ca665a6/OgreMain/src/OgreImage.cpp (line 283)
[ERROR] [rviz2]: Failed to create 8 swatches_
[ERROR] [rviz2]: InvalidParametersException: Stream size does not match calculated image size in Image::loadRawData at /tmp/binarydeb/ros-dashing-rviz-ogre-vendor-6.1.1/obj-x86_64-linux-gnu/ogre-master-ca665a6-prefix/src/ogre-master-ca665a6/OgreMain/src/OgreImage.cpp (line 283)
terminate called after throwing an instance of 'Ogre::InvalidParametersException'
what(): InvalidParametersException: Stream size does not match calculated image size in Image::loadRawData at /tmp/binarydeb/ros-dashing-rviz-ogre-vendor-6.1.1/obj-x86_64-linux-gnu/ogre-master-ca665a6-prefix/src/ogre-master-ca665a6/OgreMain/src/OgreImage.cpp (line 283)

Additional information


Feature request

Feature description

Implementation considerations

@MengNan-Li
Copy link
Author

The map file:
git clone https://github.com/MengNan-Li/map.git

@mkhansenbot mkhansenbot added the 1 - High High Priority label Jul 3, 2019
@mkhansenbot
Copy link
Collaborator

@MengNan-Li - I've seen these error messages before with Rviz2, I think there is an Rviz2 bug here. Usually those messages seem to be harmless, but in your case is rviz2 actually crashing? If so, if you restart rviz2 does it crash again? Also, is the nav2 bringup window showing any error messages? If things are working correctly, you should see the lifecycle_manager bring up map_server and amcl to the active state. It should then be printing messages that it's waiting for an initial pose.

@MengNan-Li
Copy link
Author

@mkhansen-intel - I don't know if it is a map format problem. Because Rviz2 can display map normally when i load navigation2/nav2_bringup/launch/turtlebot3_world.yaml. You can test this using the map i provided.

1. ros2 launch nav2_bringup nav2_bringup_launch.py map:=/home/ros/yunji_ros2/src/navigation2/nav2_bringup/launch/map1.yaml
2. ros2 run rviz2 rviz2 -d $(ros2 pkg prefix nav2_bringup)/share/nav2_bringup/launch/nav2_default_view.rviz

@rotu
Copy link
Contributor

rotu commented Jul 5, 2019

I think this is related to the map image dimensions. I have isolated a similar crash down to only changing the map size and scale. ros2/rviz#424

@MengNan-Li
Copy link
Author

@rotu Think you update the issue. Martin-Idel's branch can isolate the crash down.

@mkhansenbot
Copy link
Collaborator

Thanks for the help @rotu!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - High High Priority
Projects
None yet
Development

No branches or pull requests

3 participants