Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lidar image problem #31

Open
dotzou opened this issue Mar 16, 2021 · 15 comments
Open

Lidar image problem #31

dotzou opened this issue Mar 16, 2021 · 15 comments

Comments

@dotzou
Copy link

dotzou commented Mar 16, 2021

Could anyone tell me why there is such a big difference between my LiDAR images and the author's?
image

@Tangzj2020
Copy link

Hello , Is your CARLA version 0.9.6? Looking at this difference may be that your version is not compatible.

@Morphlng
Copy link

Morphlng commented Nov 2, 2022

Hello , Is your CARLA version 0.9.6? Looking at this difference may be that your version is not compatible.

Yes, this is a problem due to the Carla version. I've tested it on 0.9.6, it works well.

However, we would like to use it on the latest version since other part of our work is already done. I've modified some incompatible api to make the environment error-free, but this lidar display is still wrong (with 0.9.13, it's basically black, you can only see some edges of the pavement). While I'm trying to figure out what changed (data order? data meaning?), I would like to know if somebody has already been through this.

@Tangzj2020
Copy link

Tangzj2020 commented Nov 2, 2022 via email

@Morphlng
Copy link

Morphlng commented Nov 3, 2022

Hi, I am sorry I have not met this problem as you said that ''with 0.9.13,it's basically black...", but I've successfully test the project on 0.9.13, from 0.9.6 to 0.9.13 version, I only add "client.get_trafficmanager().set_synchronous_mode(True)" in ''carla_env.py'' with comments ''Set fixed simulation step for synchronous mode'' this line. Good luck.

Unfortunately, that doesn't help. The only part I've changed relating to rendering lidar data is changing to location.point.x/y/z at this line:

for location in self.lidar_data:
point_cloud.append([location.x, location.y, -location.z])

By "basically black", I mean I can't see the red rings like this:

Lidar render fault

And I've noticed that it seems like the heading of lidar data is not right, it's facing right instead of up.

@YanlinQi
Copy link

Hi, I am sorry I have not met this problem as you said that ''with 0.9.13,it's basically black...", but I've successfully test the project on 0.9.13, from 0.9.6 to 0.9.13 version, I only add "client.get_trafficmanager().set_synchronous_mode(True)" in ''carla_env.py'' with comments ''Set fixed simulation step for synchronous mode'' this line. Good luck.

Unfortunately, that doesn't help. The only part I've changed relating to rendering lidar data is changing to location.point.x/y/z at this line:

for location in self.lidar_data:
point_cloud.append([location.x, location.y, -location.z])

By "basically black", I mean I can't see the red rings like this:

Lidar render fault

And I've noticed that it seems like the heading of lidar data is not right, it's facing right instead of up.

I have the same problem here. Looking forward to solutions for this issue.

@Tangzj2020
Copy link

Tangzj2020 commented Dec 6, 2022

@YanlinQi @Morphlng Hi, you may try to change this line :
point_cloud.append([loaction.x, location.y, -location.z])
to the line:
point_cloud.append([loaction.x, location.y, location.z]) or point_cloud.append([loaction.point.x, location.point.y, location.point.z]),

I've successfully test my project in this setting.

@YanlinQi
Copy link

YanlinQi commented Dec 6, 2022

@ZuojinTang Thanks a lot for providing this solution. It indeed works! I have been wondering why there is a "-" before location.z, but didn't try it out. Many thanks to you!

@Morphlng
Copy link

Morphlng commented Dec 9, 2022

try to change this line : point_cloud.append([loaction.x, location.y, -location.z]) to the line: point_cloud.append([loaction.x, location.y, location.z]) or point_cloud.append([loaction.point.x, location.point.y, location.point.z]),

By changing this line, the lidar image no longer seem black, yet the direction is still incorrect. The BEV and WayPoints is vertically displayed but the lidar image is horizontally displayed, a screenshot below can show this more directly.

Display direction not correct

I think there is still something wrong about those flip and rot90, I'm still trying to fix it.

@YanlinQi
Copy link

YanlinQi commented Dec 9, 2022

try to change this line : point_cloud.append([loaction.x, location.y, -location.z]) to the line: point_cloud.append([loaction.x, location.y, location.z]) or point_cloud.append([loaction.point.x, location.point.y, location.point.z]),

By changing this line, the lidar image no longer seem black, yet the direction is still incorrect. The BEV and WayPoints is vertically displayed but the lidar image is horizontally displayed, a screenshot below can show this more directly.

Display direction not correct

I think there is still something wrong about those flip and rot90, I'm still trying to fix it.

I just tried to change the rotation of y, and it works for the rotation problem:

  • self.lidar_trans = carla.Transform(carla.Location(x=0.0, y=0.0, z=self.lidar_height), carla.Rotation(0, 90, 0))
    but the slip problem still exists.

@wzr6009
Copy link

wzr6009 commented Dec 11, 2022

i try to fix this problem, but it slit.
飞书20221211-162625

@wzr6009
Copy link

wzr6009 commented Dec 11, 2022

Brothers, I have solved this problem, you need to adjust the following parameters,my carla is 0.9.13
'd_behind': 16, # distance behind the ego vehicle (meter)
x_bins = np.arange(-(self.obs_range - self.d_behind), self.d_behind+self.lidar_bin, self.lidar_bin)
y_bins = np.arange(-self.obs_range/2, self.obs_range/2+0.01, self.lidar_bin)
飞书20221211-173111

@YanlinQi
Copy link

Brothers, I have solved this problem, you need to adjust the following parameters,my carla is 0.9.13 'd_behind': 16, # distance behind the ego vehicle (meter) x_bins = np.arange(-(self.obs_range - self.d_behind), self.d_behind+self.lidar_bin, self.lidar_bin) y_bins = np.arange(-self.obs_range/2, self.obs_range/2+0.01, self.lidar_bin) 飞书20221211-173111

Awesome! It works pretty well now. I am highly appreciated for that!

@wzr6009
Copy link

wzr6009 commented Dec 15, 2022

兄弟,我已经解决了这个问题,你需要调整以下参数,我的carla是0.9.13 'd_behind': 16, # ego vehicle后面的距离(米) x_bins = np.arange(-(self.obs_range - self .d_behind), self.d_behind+self.lidar_bin, self.lidar_bin) y_bins = np.arange(-self.obs_range/2, self.obs_range/2+0.01, self.lidar_bin) 飞书20221211-173111

惊人的! 现在效果很好。 对此我深表感谢!

朋友你也复现他这个论文吗,要不要认识交流一下啊,我这里遇到一些问题

@YanlinQi
Copy link

兄弟,我已经解决了这个问题,你需要调整以下参数,我的carla是0.9.13 'd_behind': 16, # ego vehicle后面的距离(米) x_bins = np.arange(-(self.obs_range - self .d_behind), self.d_behind+self.lidar_bin, self.lidar_bin) y_bins = np.arange(-self.obs_range/2, self.obs_range/2+0.01, self.lidar_bin) 飞书20221211-173111

惊人的! 现在效果很好。 对此我深表感谢!

朋友你也复现他这个论文吗,要不要认识交流一下啊,我这里遇到一些问题

好啊,怎么加你呢^_^

@wzr6009
Copy link

wzr6009 commented Dec 16, 2022

兄弟,我已经解决了这个问题,你需要调整以下参数,我的carla是0.9.13 'd_behind': 16, # ego vehicle后面的距离(米) x_bins = np.arange(-(self.obs_range - self .d_behind), self.d_behind+self.lidar_bin, self.lidar_bin) y_bins = np.arange(-self.obs_range/2, self.obs_range/2+0.01, self.lidar_bin) 飞书20221211-173111

惊人的! 现在效果很好。 对此我深表感谢!

朋友你也复现他这个论文吗,要不要认识交流一下啊,我这里遇到一些问题

好啊,怎么加你呢^_^

加我微信吧 18734916009

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants