-
Notifications
You must be signed in to change notification settings - Fork 13
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
Scale in sonar widget not correct #17
Comments
@alcantara09 , could you give us more details? |
@romulogcerqueira , and the script to that produces the error is just running the sonar simulation component and the sonar widget as this one `require 'rock/bundles' include Orocos model_path = File.join(Dir.pwd, 'models','sdf') Execute the taskBundles.run 'imaging_sonar_simulation::ScanningSonarTask' => 'sonar_sim' do
end` |
Hi @alcantara09, I had a look at your script code and apparently it is not a problem in sonar widget and/or sonar simulation. You need to connect the task properties with the sonar widget sliders. Please perform the following steps:
## Set the signals ## sonar_gui.connect(SIGNAL('rangeChanged(int)')) do |value| sonar_sim.range = value end sonar_gui.connect(SIGNAL('gainChanged(int)')) do |value| sonar_sim.gain = value * 1.0 / 100.0 end
Please let me know your attempts. |
You are not computing the ranges from the sonar data ? |
Sorry @doudou, I didn't understand your question. |
The max range is in effect embedded in the sonar data structure (bin_duration * bin_count * speed_of_sound). IMO visualization should match what's there. The max_range control should really only be that, a control. |
The problem here is that the sonar widget is completely broken when used in e.g. rock-display, which is still the primary use case, and due to vizkit limitations there's no way to automatically plug the range to the sonar component when opening a sonar display. |
I agree with you. This makes sense in the most sonar devices (like Tritech DST Micron), however Tritech Gemini and Teledyne Blueview sonars have a range compression which limits the bin_count between 750 -1500 bins, and its value is not proportional to range one (e.g. we can have 1350 bins at 20m and 900 bins at 25m). |
In this case, when the range value is changed, the bin_count will also be changed, right? Currently in sonar simulation the bin_count is not dependent of range value. I can fix it now we have a dynamic shader image. |
Range is controlled by two parameters, the bin_count and the time-per-bin. The latter is usually what's used to control, since one likely uses the max. bin count of the sonar (to get the best resolution) |
(I'm not even sure that one can change the bin count in practice .... I don't see any benefit in doing so) |
My mistake, sorry! As you said, we already have this relationship in the sonar simulation here to define |
@doudou , I'm in vacations in this month, however I will try to keep tracking here as soon as possible. |
Comparing the data from the sonar samples and the visualization in the sonar widget, it is possible to notice that the visualization is not correct. I would say that is 10 times smaller.
The text was updated successfully, but these errors were encountered: