Skip to content

Commit

Permalink
(fix) Fixes OccupnacyGrid data publishing from numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
mkabtoul committed Nov 25, 2024
1 parent 3273cc4 commit d630e45
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions ros_sugar/io/supported_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit d630e45

Please sign in to comment.