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

在gazebo中新建了个办公室环境,把mid360加入机器人中,发现明显卡顿 #20

Closed
seanXMU opened this issue Sep 13, 2023 · 8 comments

Comments

@seanXMU
Copy link

seanXMU commented Sep 13, 2023

我在gazebo中新建了个简单的办公室环境,把mid360加入机器人中,移动机器人发现明显卡顿;gazebo仿真大概两三秒动一次,我把mid360移除后立马就正常了。请问是怎么回事呢?
图片

@seanXMU
Copy link
Author

seanXMU commented Sep 14, 2023

图片
real time factor仅有0.7左右而无法提升,gazebo模型再丰富点可以掉到0.07

@georgflick
Copy link

The simulation of the livox mid360 is not GPU based, so it is only running on the CPU and that could be slow (depending on your CPU etc.)

@seanXMU
Copy link
Author

seanXMU commented Sep 15, 2023

The simulation of the livox mid360 is not GPU based, so it is only running on the CPU and that could be slow (depending on your CPU etc.)

Is there any relevant information that I can refer to to modify it to be based on GPU?

@georgflick
Copy link

We have implemented a GPU based simulator for the mid360 sensor. But it is tricky to build and we do not give support for it. If you want to use it as a base or something, here are the repos:

  1. You need to build gazebo from that PR Re-implement GpuLaser with cube map to lift vFOV limit gazebosim/gazebo-classic#3205
  2. Use our forked repo https://github.com/enwaytech/livox_laser_simulation

@seanXMU
Copy link
Author

seanXMU commented Sep 20, 2023

Thank you very much for your answer!But I encountered the following error when compiling this repos:
/home/seanxxcheng/tool/gpu_livox/src/livox_laser_simulation/include/livox_laser_simulation/livox_gpu_points_plugin.h:36:30: error: ‘ConstLaserScanAnglesStampedPtr’ has not been declared 36 | void OnNewLaserAnglesScans(ConstLaserScanAnglesStampedPtr& _msg);
Can https://github.com/enwaytech/livox_laser_simulation be compiled and used directly? Or do I need to rebuild gazebo based on gazebosim/gazebo-classic#3205?

@georgflick
Copy link

georgflick commented Sep 20, 2023

Thank you very much for your answer!But I encountered the following error when compiling this repos: /home/seanxxcheng/tool/gpu_livox/src/livox_laser_simulation/include/livox_laser_simulation/livox_gpu_points_plugin.h:36:30: error: ‘ConstLaserScanAnglesStampedPtr’ has not been declared 36 | void OnNewLaserAnglesScans(ConstLaserScanAnglesStampedPtr& _msg); Can https://github.com/enwaytech/livox_laser_simulation be compiled and used directly? Or do I need to rebuild gazebo based on gazebosim/gazebo-classic#3205?

Oh, true, you need to build our fork with the modifications from here:
https://github.com/enwaytech/gazebo branch devel-enway to have also the laser scan message with angles.

@seanXMU
Copy link
Author

seanXMU commented Sep 21, 2023

Thank you very much! Now I can run it.

@seanXMU seanXMU closed this as completed Sep 21, 2023
@shenhayi
Copy link

Sorry, I also tried to use this GPU-accelerated simulation. The environment is in docker and the Nvidia support is fine. I build the gazebo and the package successfully, but the result didn't look like GPU-accelerated and I didn't see any processes in the docker's Nvidia-smi, do you guys know how to fix this?

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

3 participants