ament_target_dependencies(rviz_hallway_publisher rclcpp visualization_msgs Eigen3 ament_index_cpp) target_link_libraries(rviz_hallway_publisher ${ament_LIBRARIES})
by removing the second line above and adding ament_index_cpp to the first, this issue is resolved