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

it does not work at the outdoor #4

Closed
xiaoxiaotao opened this issue Oct 12, 2020 · 5 comments
Closed

it does not work at the outdoor #4

xiaoxiaotao opened this issue Oct 12, 2020 · 5 comments

Comments

@xiaoxiaotao
Copy link

Hello,I use polylidar-realsense to detect ground at outdoor, but it not work.when I am at indoor , it work very well. My device is D435.Thank you !.

@JeremyBYU
Copy link
Owner

JeremyBYU commented Oct 12, 2020

Hey Xiao,
First, thanks for looking at Polylidar3D and trying it out with some RealSense cameras.

If its working "very well" inside and "not working" outside then its probably an issue with the depth image from the sunlight. I also have issues with my D435i outside in the sun, it only works for a very limited range. So my advice would be first to improve the depth image by adjusting parameters in RealSense, such as exposure time. After this then adjust post processing filters, Polylidar3D mesh smoothing, and then Polylidar3D polygon extraction parameters

RealSense Parameters

If you are using the default.yaml config file it has a link to load a JSON file which loads parameters to the camera in advanced mode:

advanced: "surfacedetector/config/json/high_accuracy.json" # JSON file path holding advanced settings

Right now it currently links to to high_accuracy.json. It is currently set to manual exposure with 8500 microseconds of exposure time. This works well for me in my house and basement, but outside it would be quite bad.

"controls-autoexposure-manual": "8500",

I would change that to around 1500 or maybe even 1000 if you are outside on a bright day. Also note that you can use RealSense viewer to change these parameters and then save the changes into a JSON file. That JSON could then be loaded by Polylidar-realsense. Note that this doesnt apply to post-processing filters which are specified separately in the config file and are not apart of the cameras advanced parameters.

Post Processing Filters

The realsense filters are very good. Please read up on them if you haven't. I would make sure that you have adjusted them to give the best results for the scene you are interested in. Decimation filters do a really good job at smoothing and will lower the processing time for downstream filters. The temporal filter is very valuable, but be careful to not overuse it! In high movement scenarios it will cause smearing, but if your scene can be roughly static then go ahead and crank it up. The spatial bilateral filter is also really great and will help to preserve edges.

Polylidar3D Mesh Smoothing

I would leave these parameters alone for right now. But you can play with them around later if needed.

Polylidar3D Parameters

Since the polygon extraction is working inside then there probably are not any parameters here that you should change. However maybe you could lower norm_thresh_min here:

norm_thresh_min: 0.96 # triangles must have a minimum amount of planarity.
. Don't really go any lower than 0.92, that allows a arcos(0.92) = 21.5 degree deviation from the estimated plane normal. Lowering that value allows more non-planar triangles into the segment and could help remove lots of small holes that may be generated form very noisy point clouds.

You could also increase z_thresh as well:

z_thresh: 0.1 # enforce point to plane distance constraints during region growing.

Maybe 0.20 or 0.30 at the highest.

@xiaoxiaotao
Copy link
Author

Thank you very much ! I will have a try !

@dorinseggall
Copy link

Hi ,
i am trying to activate the code with the D435i , i am working on Ubuntu (with oracle VM Virtual)
i finish all the clones process and try to run -
python3 -m surfacedetector.capture.py -c urfacedetector/config/default.yaml
and i received the next error :

Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.8/runpy.py", line 111, in _get_module_details
import(pkg_name)
File "/home/dorinse/dorin/polylidar-realsense/surfacedetector/capture.py", line 23, in
from surfacedetector.utility.helper import (plot_planes_and_obstacles, create_projection_matrix,
File "/home/dorinse/dorin/polylidar-realsense/surfacedetector/utility/helper.py", line 83, in
def get_intrinsics(pipeline, stream=rs.stream.color):
AttributeError: module 'pyrealsense2' has no attribute 'stream'
can you help me , any idea ?
thank you !

@sunwell1994
Copy link

@JeremyBYU As you mention, L515 cannot work in the sunlight as well. Do you have the number of the detecting range based on your experience? Thanks.

@JeremyBYU
Copy link
Owner

I think you are asking me to estimate the depth range of the L515 sensor.

In bright sun -> 0-0.5 meters
In medium sun -> 0- 0.9 meters
Dusk -> 0-1.5 meters
Just turned Night -> 0 to 3 meters
Pitch black -> 0 to 5

Inside basement -> 0 to 6

These are just estimates from a foggy memory.

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

4 participants