Skip to content

fix RVIZ error for lanelet_map_rviz topic when there is no crosswalk lanelet

mitsudome-r requested to merge mitsudome-r/common:fix/lanelet2_rviz_error into master

bug

Fixed bug

This MR removes unintended error given from RVIZ when there is no road lanelet or crosswalk lanelet in a Lanelet2 map.

Required information:

  • Operating system and version:
    • Ubuntu 16.04
  • Autoware installation type:
    • From source
  • Autoware version or commit hash
    • master branch (2019/11/18)
  • ROS distribution and version:
    • ROS Kinetic
  • ROS installation type:
    • From binary
  • Package or library, if applicable:
    • lanelet2_extension, map_file

Description of the bug

Rviz gives error when there is no crosswalks in a map. This is because visualization marker is published with no points.

Steps to reproduce the bug

  1. Download lanelet2_tf.launchno_crosswalk.osm
  2. Start runtime_manager
  3. Load downloaded map and tf.launch from Map Tab.
  4. Start rviz.

Expected behavior

Map loads without any error.

Actual behavior

Rviz shows following error:

TriMesh marker [crosswalk_lanelets/0] has no points.

Fix applied

This MR avoid to add empty marker for visualization.

Merge request reports