Jump to content

[2.11] sync/syncker_console


photo

Recommended Posts

Hello,

In 2.11, the console command "sync" has replaced the "syncker_console" command, but this migration does not appear in the migration documentation. Is it an oversight?

Also, we use the 2.10 "sync_slave_slave" command to specify the name of some slaves (and use it with syncker->setSlavePlayer), but "sync_slave_name" is no longer in 2.11. What has it been replaced with?

Thanks!

Link to comment

Hi Amerio,

Seems like an oversight indeed...


The sync_console command was renamed as  sync.
As for the sync_slave_name it is no longer needed as setSlavePlayer() method now enables you to set an arbitrary player for the specified view:

Syncker::Master::setSlavePlayer(const char *view_name, PlayerPtr player);

So now you can say:  let the Slave having the sync_view = "view_1" take the specified camera regardless of the Slave's name, number, IP, and port:

// commanding Slaves to create a new player and adding it to synchronization
syncker_master->createNode(aux_player);

// setting a new created player for Slave(s) having sync_view = "view_1"
syncker_master->setSlavePlayer("view_1", aux_player);

Slaves are referred to via ID. The ID of the slave combined as follows: IP address (32 bits) + port number (16 bits).

We're sorry for the inconvenience caused! The Syncker section is up-to-date. We'll add missing commands to the Console Migration guide.

Thanks for reporting!

Link to comment

As a matter of fact, it looks that 2.11 also renamed the CLI arguments -ig_master to -sync_master and -ig_count to -sync_count ...

This took me off-guard because it was specifically designed to not look like the syncker option in 2.10 (see 

 

Any other missing renaming I should look for ? ;-)

 

On a related topic, I can't have my slaves connect to the master now:

  1. master is launched with -extern_plugin "IG" -sync_master 1 -sync_count 1 -sync_allow_extra_slaves 1
  2. slaves are launched at will (!) with -extern_plugin "IG" -sync_master 0,

They keep looking for the master (which is on the same PC) with "Slave::try_to_connect(): trying to find master on port 8890..."

What am I missing?

 

Link to comment
37 minutes ago, morbid said:

If you have 1 master and 1 slave type -sync_count 2

My issue here is the number of slaves is unknown when the master starts. Slaves can be added/removed during the lifetime of the simulation. In 2.10, using -sync_count 1 was said to be the way to go for the expected behavior. If this has changed, how should I do it?

Link to comment
2 hours ago, Amerio.Stephane said:

master is launched with -extern_plugin "IG" -sync_master 1 -sync_count 1 -sync_allow_extra_slaves 1

I already tried that: doesn't work (or am I mis-using it?)

Link to comment

Stephane, please accept my apologies. I lost my focus and wasn't attentive enough.

-sync_allow_extra_slaves 1 will work only with asynchronous mode that can be set with -sync_async 1.

So, master should be launched with these arguments:

-sync_master 1 -sync_count 1 -sync_async 1 -sync_allow_extra_slaves 1

Then you can launch auxiliary channels anytime you want.

image.png

However, launching a random number of channels might cause major desynchronization of the scene. You're risking with scene consistency. What I mean is that you can get a different number of entities for different visual channels.

Quote

My issue here is the number of slaves is unknown when the master starts.

May I ask you where this requirement comes from?

Thank you.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
38 minutes ago, morbid said:

-sync_allow_extra_slaves 1 will work only with asynchronous mode that can be set with -sync_async 1

This is clearly missing from the doc. And it looks quite cumbersome for our case, as we really need some slaves to be strictly framerate-synchronized (helicopter sim in a dome).

Alas, I tried it and I get both master and slaves stuck, then they disconnect (attached log files; strangely the master sees 2 slaves while I only started one...)

I'll try to detail our setup more clearly, so you can guide us here:

  • engineers starts the simulation host (cigi) and expect a feedback from the terrain engine, so we start the Unigine master at this time (will answer  to HAT/LOS queries)
  • Sometimes, they don't really need the full dome and sometimes, they'll decide they need to add a human pilot in the loop and they'll start the dome. At this moment, we must start the 12 dome slaves. These ones MUST be strictly synchronized (and they are graphically sync'd with HW Nvidia sync cards)
  • During *the same* session, they may start an embedded equipment that require an additional view (eg. a IR view) so we start up a new slave for each.
  • All slaves are started up with a specific slave name, so the master can assign to each the correct player (which may change at run time, eg. switching the dome from the pilot to the copilot point of view, or the IR from front to back)

Test211SlaveName.zip

Link to comment
19 hours ago, Amerio.Stephane said:

This is clearly missing from the doc. And it looks quite cumbersome for our case, as we really need some slaves to be strictly framerate-synchronized (helicopter sim in a dome).

Yes, we'll update the article.

19 hours ago, Amerio.Stephane said:

Alas, I tried it and I get both master and slaves stuck, then they disconnect (attached log files; strangely the master sees 2 slaves while I only started one...)

-sync_async 1 should be specified both for the master and the slave.

Regarding your use cases.

The best results will be achieved with synchronous mode, so using -sync_allow_extra_slaves looks too risky. Have you considered the following workflow:

  1. Always launch all required channels with specified -sync_count value
  2. Dynamically disable/enable rendering for the required channels with Render::setEnabled();

Will this work for you?

Thanks.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

While I understand the benefit/drawbacks of sync_async, I don't understand why it's tied to a fixed/predefined number of slaves. It feels like an unnecessary constraint (though as a developer I kinda suspect why it's been made this way, though it should have been possible to do it differently).

Please be very explicit in the doc about constraint/rationals on this topic, and how to start it on master/slaves.

I guess we'll have to fallback to a fixed number of slaves, but that adds a burden on the end-user at launch time (we cannot always start a channel on all PC, because some of them are just not always present/turned on).

Link to comment
  • 2 weeks later...

Hi Stephane,

We implemented a number of improvements into Syncker and IG logic. In 2.12 channels can be loaded anytime in sync_async 0 (synchronous) mode. However, stable work may require additional coding on your side because a channel launched with a significant delay can skip some packets sent from the master.

Thanks.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
×
×
  • Create New...