GithubHelp home page GithubHelp logo

Comments (8)

baalexander avatar baalexander commented on June 19, 2024

Thanks for taking a look into this @maxired.

If you see a better way for communicating between node.js, topic.js, and tcpros.js while working on the issue, please let me know. I think it's a tad confusing right now.

from rosnodejs.

baalexander avatar baalexander commented on June 19, 2024

I included your commits in my API update to master. I did this because otherwise you would have merge conflicts since I got rid of node.js and changed up topic.js.

That said, I had to comment out most your multiple socket code because it wasn't working for me. I kept most of it in there, just commented out. Sorry for the change midway during your change, but hopefully my commit made the code a little easier to manage and work with.

from rosnodejs.

maxired avatar maxired commented on June 19, 2024

Hi,

It appears that I can't fix this without changing the way the publish method works. (publish only to currently connected subscribers)

https://github.com/baalexander/rosnodejs/commit/6839c1dfcd5b690a4d813ea96b120946da8250f3#L5L28#L5L32 seems to show that you don't really want my proposal, so I don't know exactly what to do.

from rosnodejs.

baalexander avatar baalexander commented on June 19, 2024

@maxired - You can change the implementation of publish().

However, I'd still prefer being able to call topic.publish() directly like so:

var publisher = new ros.topic({
  node        : 'talker'
, topic       : 'publish_example'
, messageType : String
});

var message = new String({ data: 'howdy' });
publisher.publish(message);

Will that work? Or does calling publish() directly like mentioned above create a problem?

from rosnodejs.

maxired avatar maxired commented on June 19, 2024

@baalexander : It will be easy if you are Okay with the fact that only currently connected nodes will receive the message.

from rosnodejs.

baalexander avatar baalexander commented on June 19, 2024

That works for me for me for now. I'll have better thoughts on supporting unconnected nodes after your pull request.

from rosnodejs.

baalexander avatar baalexander commented on June 19, 2024

I merged the fixes for this into master. Please let me know if it didn't work in your testing.

I'll update the npm version to 0.1.2 tomorrow if everything looks good.

from rosnodejs.

maxired avatar maxired commented on June 19, 2024

Hi, I'll try today and let you know

from rosnodejs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.