robodhruv / drive-any-robot

Official code and checkpoint release for "GNM: A General Navigation Model to Drive Any Robot".
MIT License
261 stars 41 forks source link

./create_topomap.sh Image with strange color #15

Closed GaHooooo closed 1 year ago

GaHooooo commented 1 year ago

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

ajaysridhar0 commented 1 year ago

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.

chungcode0218 commented 6 months ago

The code you provided solved my problem, thank you!