Skip to content

Conversation

@m3d
Copy link
Member

@m3d m3d commented Jan 29, 2026

PUB/SUB modes are useful for remote control operations. Moreover based on the team experience actually Pull/Push is not recommended in this scenario as the receiver is not able to easily control the throughput.

I was not really sure if to create 2 new OSGAR drivers with one line difference of type selection. Would you go for this self.use_pubsub_mode = config.get("pubsub", False) "hack" or what would be the recommendation?

I will also start PR in osgar-apps as user of this functionality for remote control with streaming video.

@zbynekwinkler
Copy link
Member

Don't you need some changes also at other places? Sending, receiving...

@m3d
Copy link
Member Author

m3d commented Jan 30, 2026 via email

@zbynekwinkler
Copy link
Member

Well, I am sure the send a receive calls need/return multipart messages that deal with subscriptions.

@tajgr
Copy link
Collaborator

tajgr commented Jan 30, 2026

It looks save regarding to old features. I am not sure if I can test the new mode now. Hopefully, I will try something during weekend.
Otherwise, I agree with the expansion of pull and push.
Are you in a hurry for this PR?

@m3d
Copy link
Member Author

m3d commented Jan 31, 2026 via email

@tajgr
Copy link
Collaborator

tajgr commented Jan 31, 2026

I used this older sample for test and it worked fine.

@m3d
Copy link
Member Author

m3d commented Feb 2, 2026

I used this older sample for test and it worked fine.

OK, but be aware that if you do zmq.SUB you also need to add one more call with zmq.SUBSCRIBE similarly to what is in PR. Thanks

@m3d
Copy link
Member Author

m3d commented Feb 2, 2026

p.s. the test with remote control on robot works fine ...

@m3d
Copy link
Member Author

m3d commented Feb 4, 2026

note, that the FAIL: test_environ (osgar.test_logger.LoggerStreamingTest) is also on master. I actually see the warning, but it is in RED (?!) and I guess this was not before?? Can it have an influence? On the other hand if I run just the test itself it does not print the message and passes

...............Environment variable OSGAR_LOGS is not set - using working directory
F...
(python) md@md-ThinkPad-P50:~/git/osgar$ python test.py osgar/test_logger.py
...........................
----------------------------------------------------------------------
Ran 27 tests in 0.332s

OK

@m3d
Copy link
Member Author

m3d commented Feb 4, 2026

the problem with logging is caused by np.testing.assert_almost_equal(mat[:2, :2], np.identity(2)) ... i.e. numpy.testing

@m3d
Copy link
Member Author

m3d commented Feb 6, 2026

OK, I do not see any complains, so merging ...

@m3d m3d merged commit fddcf85 into master Feb 6, 2026
2 checks passed
@m3d m3d deleted the feature/zmq-pub-sub branch February 6, 2026 11:50
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

Successfully merging this pull request may close these issues.

3 participants