From d630e454d2b009418597adabb72f7292ca776ac2 Mon Sep 17 00:00:00 2001 From: mkabtoul Date: Mon, 25 Nov 2024 19:26:47 +0100 Subject: [PATCH] (fix) Fixes OccupnacyGrid data publishing from numpy --- ros_sugar/io/supported_types.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ros_sugar/io/supported_types.py b/ros_sugar/io/supported_types.py index 194211c..4725f2c 100644 --- a/ros_sugar/io/supported_types.py +++ b/ros_sugar/io/supported_types.py @@ -264,13 +264,7 @@ def convert( # flatten by column # index (0,0) is the lower right corner of the grid in ROS - if output.flags.f_contiguous: - msg.data = output.flatten() - else: - getLogger("OccupancyGrid_Converter").warning( - "OccupancyGrid converter expects a column major numpy array but got a raw major array -> Changing the shape before sending to ROS publisher" - ) - msg.data = output.flatten("F") + msg.data = output.flatten("F") return msg