robodhruv/drive-any-robot

./create_topomap.sh Image with strange color

GaHooooo opened this issue · 2 comments

I use carla to deploy gnm,the image which rosbag's camera:
图片

the image ./create_topomap.sh create

图片

It looks different,that's right?
Thanks for you reply

It looks like the image is in the BGR color format rather than the RGB color format with the ROS topic you are using. Can you try adding this line at the end of the callback_obs() function in the drive-any-robot/deployment/src/create_topomap.py file:

img = img[:,:,::-1] # flip the color channels of the PIL Image

Let me know if this works or not.

The code you provided solved my problem, thank you!