Jump to content

syncker on IG


photo

Recommended Posts

Does IG project not need to add a syncker plug-in separately?

image.png.e406b7f7e81866722ebdbb5b90f0fbb0.pngimage.png.e47aad7222fc7a48de3ac33899c31e3c.png

 

and this camera setting is just only for slave cam?

image.png.d2fbb1c9ebb38af39fff882c97a10132.png

Edited by dongju.jeong
Link to comment

Hi! 

4 hours ago, dongju.jeong said:

Does IG project not need to add a syncker plug-in separately?

yes, you need to add Syncker plugin in SDK if you want to use IG + Syncker, 
but you don't need to specificate the Syncker in -extern_plugin command. just set -sync_master 1/0 and IG will automatically load and initialize the Syncker plugin. 

 

4 hours ago, dongju.jeong said:

and this camera setting is just only for slave cam?

this should work for master too

  • Like 1
Link to comment

thank you.

I have a question about how to apply synker in my case. 

 

we will make two IG exe(two computer). one is driver view(main cam), the other is Car's CCTV( front, rear,IR cam)

image.png.fffafcdba2177f4cd99edf726997c8b6.png

image.png.6af64a8c6c8040772b3a91ebf8f95375.png

I configured code the view to be created  according to each setting (CarMode), when the ownship is created.  I didn't use View control packet.

The value of CarMode is read from a custom txt file.

image.thumb.png.f1634a172a553bb871e1a9ac4158daad.png

(* when CarMode is 1, view can be changed from 1 to 3 later.)

 

I want to use the computer with CarMode 0 as a master, and the View of the computer with CarMode 1 as a slave.

 

Please let me know what to do after this setting.

image.png.b3bf9b78ef121a0d93b9035416fbfe66.png

 

 Do I just add setSlaveView(int slave_index, int view_id) function for slave?

in case AppSystemLogic::ig_manager->setCurrentView(1),  What values should be put in the parameters of the setSlaveView function?

Edited by dongju.jeong
Link to comment
21 hours ago, dongju.jeong said:

Do I just add setSlaveView(int slave_index, int view_id) function for slave?

yes. on master you can set view to any slave. it will be enougth 

21 hours ago, dongju.jeong said:

AppSystemLogic::ig_manager->setCurrentView(1),  What values should be put in the parameters of the setSlaveView function?

setCurrentView(view_id)

 

also if you use syncker projection you can specify it in ig_config.xml and view will be set on slaves automaticaly
 

  • Like 1
Link to comment

image.png.287fd579b2122d0bdce1cd24b2c28f81.png

1. I am not sure about the relationship between channel tag and syncker projection setting.

For example, for an attached image, one computer uses view id 0. If three monitors are connected at this time, will three images be automatically rendered?

 

 

2. in one slave computer, The view id changes depending on the situation.( in my case, view id can change to 1,2,3) (* master use view id 0).

then,  what code should I write on the master?

 

may be setSlaveView(0, 1);  setSlaveView(0, 2);  setSlaveView(0, 3);    (write this in master)

and       setcurrentView(1~3); ( just use this in slave);

 

 

 

Edited by dongju.jeong
Link to comment

1.
`syncker_channels` in ig_config.xml helps to match between ig_view and syncker_channel

link_views.png

 

this happens during the initialization phase - after that you can change this link at runtime:
2. 

//void Manager::setSlaveView(const char * slave_name, int view_id)
ig_manager->setSlaveView("additional", 2);

 

  • Like 1
Link to comment

thank you.

I understand like this when use_syncker_projection is 1, the view_id parameter in the channel tag mean the base view.

maybe is it right?

 

then after this setting

image.png.f39f3fda62a3a98f8c3dcb15bc9af6ae.png

master pc and all slave pc use same view(view id 0)?

 

 

 

 

 

 

and in case "additional" syncker (use use_syncker_projection 0)

16 hours ago, cash-metall said:

this happens during the initialization phase - after that you can change this link at runtime:
2. 


//void Manager::setSlaveView(const char * slave_name, int view_id)
ig_manager->setSlaveView("additional", 2);

Is it not necessary to create a view object with the getView() function and to use the setCurrentView() function?

The document has its contents.

image.png.d480671fbb78d8cad97046c06ee42e81.png

 

 

Link to comment

use_syncker_projection 1 - this means that the IG::View will use the syncker projection (i.e. it will distort the image in accordance with the position of the screen in the syncker configuration) 

4 hours ago, dongju.jeong said:

master pc and all slave pc use same view(view id 0)?

yes. 

 

4 hours ago, dongju.jeong said:

Is it not necessary to create a view object with the getView() function and to use the setCurrentView() function?

yes. the view will be created automatically. and you don't need to use setCurrentView 

  • Thanks 1
Link to comment

I'm sorry. I'm a little confused.
In the setSlaveView (const char * slave_name, intview_id) function, does the parameter "slave_name" have nothing to do with the channel?

 

image.png.11b4752fe821b252f5d08290d878453c.png

 

If irrelevant is correct, the "additional" in setSlaveView ("additional", 2) function appears to have just the name of the current slave.

so I can use setSlaveView("additional", 1~3)

and <channel view_id="4" use_syncker_projection="0" syncker_name="additional"/> in ig_confing <-There is no problem if I delete this line.


maybe it is correct?

 

 

 

Link to comment

The things got tangled somewhere, so I've decided to start from the very beginning to summarize it all and make it clear. May be it will help to avoid all the misunderstandings (if any).

We have two notions:

- camera (it has a certain position and direction in the world)
- monitor (more precisely, it's the app window, in which the images from the camera are displayed)

When Syncker is disabled, we have one monitor and can have an unlimited number of cameras.
Cameras are controlled by the server.

We are to decide images from which camera need to be displayed at the moment.
To do that, we can write in ig_config.xml
default_view_id = camera_number (from now on we can call the camera "view", and the camera number is view_id)

That's actually here:

image_2021_02_03T11_52_28_261Z.png

If you want to switch to another camera, do setCurrentView(view_id)


When we have several monitors, the situation is the same:
I need to decide the image from which camera is going to be shown on every monitor.

Monitors can be connected to different computers.
To differentiate between these computers, we introduce the notion monitor name / computer name, which is "slave_name".
It is set when the app is run, to set it we use the command -sync_view "computer_1" (unfortunately, the word "view" is present both in "view_id" and in "sync_name", but that's just a coincidence, please disregard that, these two notions are different)


If there are several monitors connected to the same PC, then we can assign a different name to every monitor, like this:
-sync_view_0 "computer1_monitor_0" -sync_view_1 "computer1_monitor_0"
You can set any names, they don't need to created or declared anywhere in advance.

 

Then we decide, images from which camera are to be displayed on every monitor.
By default (if you don't specify anything for monitors), the monitors will display the images from the camera that is specified as default_view_id. This means, that all monitors are going to display the same images.

This been said, we can assign any camera to any monitor. This is done in ig_config.xml:

<syncker_channels>
    <channel view_id="1" use_syncker_projection="1" syncker_name="monitor1"/>
    <channel view_id="2" use_syncker_projection="1" syncker_name="monitor2"/>
    <channel view_id="3" use_syncker_projection="0" syncker_name="monitor3"/>
</syncker_channels>

(at the moment, we won't discuss use_syncker_projection)

or via code (it performs the same as the above from ig_config.xml, so you actually can delete it from the config file, as you asked above, and nothing will happen):
ig->setSlaveView("monitor1", 1);
ig->setSlaveView("monitor2", 2);
ig->setSlaveView("monitor3", 3);

 

This means, that the application which has been run with the argument -sync_view "monitor1" will use camera 1 (view_id 1), the application run with the argument -sync_view "monitor2" will use camera 2 (view_id 2), etc.
You can connect cameras with monitors in any way you want.

Even like this:
<channel view_id="0" use_syncker_projection="1" syncker_name="monitor1"/>
<channel view_id="0" use_syncker_projection="1" syncker_name="monitor2"/>
<channel view_id="0" use_syncker_projection="0" syncker_name="monitor3"/>
<channel view_id="1" use_syncker_projection="0" syncker_name="monitor4"/>

Here we will have the monitors from 1 to 3 display the same image from camera 0, and monitor4 will display the image from camera with view_id 1.

That's generally it.

 

Then, we can use Syncker Configuration.
In Syncker Configuration, we specify additional warping for any monitor. This may be required for monitors that are of an unusual form, or that are positioned at some angle to the spectator, and the spectator wants to see this perspective projection undistorted.
image_2021_02_03T10_47_57_385Z.png

use_syncker_projection is what should be used, if this is required. If we set 1, the monitor will apply warping from the Syncker Configuration, if 0 - then no warping is applied.
Distortion can also be enabled/disabled via code, like this:
ig->getView(0)->setSynckerProjectionEnable(true)

Now I hope, it's all become clear.

If there are some things that are still unclear, feel free to ask. I just wanted to summarize everything to have a common ground. From now on, I hope we'll share a common picture.

Thank you for setting these questions, you really give us an understanding what to improve.

  • Like 3
  • Thanks 1
Link to comment

Thank you for your detailed explanation. I've learned a lot.
I have a question after doing some tests.

 

What happens if I do not set -sync_view in the master pc and slave pc?

Testing shows that nothing happened at Masterpc. (setSlaveView function did not work)

 

In slave pc, the parameter "slave_name" of the setSlaveView function(first be called) seems to be set to sync_view.

void setSlaveView(const char * slave_name, int view_id)

Link to comment

Yeah, that's right.

1. If you don't set -sync_view (the name of master/slave), the system doesn't know, who it is and what it shall do, so nothing happens.

2. "slave_name" should be the same as "sync_view" of the slave computer. That's how you let the system know what slave you address to.

Does it work as intended on your side?

If something doesn't work, please, tell us. Maybe we misunderstand what's your concerns are...

  • Thanks 1
Link to comment

ok, thank you.  I think it will be over if I just know about the master pc.

 

When -sync_view is not set, setSlaveView() is not work in master pc. (I can't switch currentView to other View)

then, is there no problem with syncker synchronization if the master pc switches views using the setCurrentView function?

 

 

Edited by dongju.jeong
Link to comment
3 hours ago, dongju.jeong said:

When -sync_view is not set, setSlaveView() is not work in master pc. (I can't switch currentView to other View)

Well, yes, because the master is not the slave, so you cannot use setSlaveView() for the master PC. If the master has a name (which is, frankly speaking, very unexpected behavior), then it might be possible, but we don't recommend doing that.

 

3 hours ago, dongju.jeong said:

then, is there no problem with syncker synchronization if the master pc switches views using the setCurrentView function?

setCurrentView() changes the view on the PC where this method is called, i.e. if setCurrentView() is called on the master, the view on the master should be changed, if called on a slave, the view of the slave will be changed.

So there shouldn't be any problem. If you have any issues with this case, please inform us and provide a more detailed description of your case.

 

  • Thanks 1
Link to comment
×
×
  • Create New...