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

How to set the advanced control parameters using the realsense-ros wrapper? #871

Closed
Kaju-Bubanja opened this issue Jul 30, 2019 · 6 comments

Comments

@Kaju-Bubanja
Copy link

I opened the dynamic reconfigure with rosrun rqt_reconfigure rqt_reconfigure, but looking at the options in the stereo module there are no post processing options like in the realsense-viewer:
Screenshot from 2019-07-30 17-34-14
Screenshot from 2019-07-30 17-38-46

I looked at the stereo_module with following command: rosrun dynamic_reconfigure dynparam get /camera/stereo_module with following output:
{'laser_power': 183.6, 'groups': {'laser_power': 183.6, 'parent': 0, 'global_time_enabled': True, 'inter_cam_sync_mode': 0.0, 'gain': 16, 'groups': {}, 'id': 0, 'output_trigger_enabled': False, 'exposure': 33000, 'name': 'Default', 'parameters': {}, 'emitter_enabled': True, 'enable_auto_exposure': True, 'error_polling_enabled': True, 'state': True, 'visual_preset': 4, 'enable_auto_white_balance': False, 'type': '', 'frames_queue_size': 16}, 'emitter_enabled': True, 'enable_auto_exposure': True, 'frames_queue_size': 16, 'global_time_enabled': True, 'inter_cam_sync_mode': 0.0, 'visual_preset': 4, 'error_polling_enabled': True, 'gain': 16, 'exposure': 33000, 'output_trigger_enabled': False, 'enable_auto_white_balance': False} but there is no persistency_index parameter.
The rs_rgbd.launch file has the argument filter and I set it to "temporal" and it is mentioned in the docs, but I can't figure out how to actually set the values described in the docs, like the persistency index and others. I tried rosrun dynamic_reconfigure dynparam set /camera/stereo_module persistency_index 8 but get following error: error updating parameters: don't know parameter: persistency_index
How do I set the advanced control parameters using the realsense-ros wrapper?

@doronhi
Copy link
Contributor

doronhi commented Jul 31, 2019

As you already found out, the post processing options are there only if stated with the filters param.
All the options of the filters should automatically be present with rqt_dynamic_reconfigure. The names may differ though.
The option listen in realsense-viewer as persistency_mode appears in ROS as holes_fill.
you can change it with the following command:
rosrun dynamic_reconfigure dynparam set /camera/temporal holes_fill 8

@Kaju-Bubanja
Copy link
Author

Kaju-Bubanja commented Aug 2, 2019

Thanks for the respons, two questions:

  • Is there a list of mappings between the names? Or how are we supposed to know what the parameters are called?

  • And second, then why didn't holes_fill show up for me? I launched the rs_rgbd file with the param filters set to temporal. From the launch file: <arg name="filters" default="temporal"/>

@Kaju-Bubanja
Copy link
Author

Kaju-Bubanja commented Aug 5, 2019

rosrund dynamic_reconfigure dynparam list Does not show that there is a /camera/temporal param. I tried the above command and it just hangs and waits. Also the param is not in the rqt_reconfigure gui. Looking at the source code I found the names of the filters. Currently I have this in the launch file: <arg name="filters" default="decimation,spatial,hole_filling,temporal,disparity"/>, and the realsense node outputs: Add Filter: spatial [ INFO] [1564991640.917722386]: Add Filter: hole_filling [ INFO] [1564991640.920259533]: Add Filter: temporal [ INFO] [1564991640.922273055]: Add Filter: disparity [ INFO] [1564991640.924789337]: Done Add Filter: disparity [ INFO] [1564991640.924850621]: Add Filter: decimation [ INFO] [1564991640.926778718]: num_filters: 6
But even with all the filters added no new parameters show up in dynamic_reconfigure list or rqt_qui, so the question remains, how does one set these parameters?

@Kaju-Bubanja
Copy link
Author

Kaju-Bubanja commented Aug 5, 2019

Haha, I found the error and you @doronhi actually fixed it in the last commit #5ef502ebcee5508adc073d228b4ed52d07acd5f7. The question for me now is why the README.md tells me to check out the second last commit and not the last? Could this line > git checkout git tag | sort -V | grep -P "^\d+\.\d+\.\d+" | tail -1
be removed from the installation instruction? Because why should people not use the latest commit?

@doronhi
Copy link
Contributor

doronhi commented Aug 6, 2019

The installation instructions refer to the latest release.
The last commit often is ahead of the latest release.
A new release should be out shortly and include this bug fix.

@RealSenseCustomerSupport
Copy link
Collaborator


Please let us know if there is any further question. Thank you.

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