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

Any docs indicates available filters? #742

Closed
lucasjinreal opened this issue Apr 26, 2019 · 14 comments
Closed

Any docs indicates available filters? #742

lucasjinreal opened this issue Apr 26, 2019 · 14 comments
Labels
wait_to_close wait to see if problem is solved.

Comments

@lucasjinreal
Copy link

I want set a detph filters in launch file:

  <arg name="filters"             default="hole_filling"/>

But this filter method actually does not exist.

How many filter methods exist now?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Apr 26, 2019

Documentation for the post-processing filter types can be found here:

https://github.com/IntelRealSense/librealsense/blob/master/doc/post-processing-filters.md

@lucasjinreal
Copy link
Author

@MartyG-RealSense Thanks Sir. Could u provide which string it allowed in realsense_ros that can set inside launch files?

From those docs I don't know which string mapping which method

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Apr 26, 2019

ROS launch parameters for the filters are listed in the section linked to below.

https://github.com/intel-ros/realsense#launch-parameters

disparity - convert depth to disparity before applying other filters and back.
spatial - filter the depth image spatially.
temporal - filter the depth image temporally.
hole_filling - apply hole-filling filter.
decimation - reduces depth scene complexity.

The launch format is to put the word filters:= and then the filter name that you want to launch. If there is more than one filter name, separate them with commas. For example:

roslaunch realsense2_camera rs_camera.launch filters:=hole_filling

@doronhi doronhi added the wait_to_close wait to see if problem is solved. label Jun 11, 2019
@zinan93
Copy link

zinan93 commented Jun 13, 2019

Hi, how would I set the parameters in the launch file then? For example setting the decimation factor to 4? and also how to use disparity filter if I want to filter in the following sequence for the depth stream: decimation(4)->disparity transfrom->spatial->temporal->disparity->hole_filling ?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Jun 13, 2019

You can set the general filter type in the roslaunch instruction, and then set the specifics of the filter in a 'rosrun' instruction after the roslaunch command, using dynamic reconfigure.

#583

@zinan93
Copy link

zinan93 commented Jun 26, 2019

Okay I see, thanks. I ll try dynamic reconfigure.

@adrianramospeon
Copy link

adrianramospeon commented Jul 22, 2019

I've got the same question. Can I set the parameters for the filters in the launch file, and if so, how? Or where else could I set them programatically (not in rqt_reconfigure), since I understand that the json params file doesn't support post-processing parameters? We could use dynamic_reconfigure dynaparam set and individually configure each post-processing reconfigurable-node, but I'm thinking there might (should?) be an easier way. Thanks for your feedback :)

@doronhi
Copy link
Contributor

doronhi commented Jul 31, 2019

@adrianramospeon ,
Check #817 ,
Does that works for you?

@adrianramospeon
Copy link

adrianramospeon commented Jul 31, 2019

@doronhi
That works nicely for the emitter (and many other parameters). Unfortunately, I haven't seen the same way of setting the post-processing filtering parameters. Right now I'm using something like follows for each post-processing filter.

<node name="configure_temporal_filter" pkg="dynamic_reconfigure" type="dynparam"
	args="set_from_parameters camera/temporal">
    <param name="filter_smooth_delta" value="50" />
    <param name="filter_smooth_alpha" value="0.1"/>
    <param name="holes_fill"          value="3"  />
  </node>

It works, and I'm satisfied with it, but it's a different style and a bit messier than the rest of the parameters (like infra_width, depths_fps, etc...). I now understand that these post-processing parameters are meant to be fiddled with, while the of the others described in https://github.com/IntelRealSense/realsense-ros#launch-parameters are rather static, and hence the difference. Thanks and thumbs up for your work on this project!

@doronhi
Copy link
Contributor

doronhi commented Aug 6, 2019

Thank you.
The last commit of #858 fixed that issue as well. You can change the initial values of the filters by adding the following code to your launch file:

  <rosparam>
      /camera/stereo_module/emitter_enabled: true
      /camera/stereo_module/enable_auto_exposure: true
      /camera/temporal/filter_smooth_delta: 50
  </rosparam>

It will be incorporated in the upcoming release.

@RealSenseCustomerSupport
Copy link
Collaborator


@adrianramospeon Any other questions about this? Looking forward to your update. Thanks!

@adrianramospeon
Copy link

@adrianramospeon Any other questions about this? Looking forward to your update. Thanks!

No further questions, previous reply by @doronhi provided exactly what I was looking for. Thanks for the great support. It might be useful for newcomers to add a couple of documentation lines about this in https://github.com/IntelRealSense/realsense-ros#launch-parameters ?

@eibalazs
Copy link

@doronhi
Where can I find the list of parameter names? I tried to find out the filter parameter namings based on the realsense-viewer namings, but there are diffferences. Is there a page where parameters like "/camera/temporal/filter_smooth_delta" are listed?

@doronhi
Copy link
Contributor

doronhi commented Nov 2, 2020

The list of supported filters is available, as @MartyG-RealSense commented above.
If you type: rosrun dynamic_reconfigure dynparam list you'll get a list of all the reconfigurable nodes, including the ones for the filters you have chosen.
For instance, when we add the "temporal" filter, the list we get is something like that:

/camera/rgb_camera
/camera/rgb_camera/auto_exposure_roi
/camera/stereo_module
/camera/stereo_module/auto_exposure_roi
/camera/temporal

To get a list of available parameters for the temporal filter run: rosrun dynamic_reconfigure dynparam get /camera/temporal
You then get the following list:

{'filter_smooth_alpha': 0.4000000059604645, 'stream_index_filter': -1, 'groups': {'filter_smooth_alpha': 0.4000000059604645, 'parent': 0, 'stream_index_filter': -1, 'groups': {}, 'id': 0, 'name': 'Default', 'parameters': {}, 'state': True, 'stream_format_filter': 1, 'stream_filter': 1, 'filter_smooth_delta': 20, 'type': '', 'holes_fill': 3, 'frames_queue_size': 16}, 'stream_format_filter': 1, 'stream_filter': 1, 'filter_smooth_delta': 20, 'holes_fill': 3, 'frames_queue_size': 16}

Where you can find the available parameters and their current value.

All those parameters are not mentioned in the realsense2_camera's documentation because they are inherited, in runtime, from the librealsense2's objects. The documentation regarding each filter is maintained in librealsense2's documentation. Names were changed to follow ROS conventions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wait_to_close wait to see if problem is solved.
Projects
None yet
Development

No branches or pull requests

7 participants